Ricardo Batista
Ricardo Batista
WWasp-lang
Created by Ricardo Batista on 9/27/2024 in #🙋questions
Extremely slow loading on mobile
Not sure tbh. I am using OpenSaaS, but not sure if the origin is OpenSaaS or Wasp
10 replies
WWasp-lang
Created by Ricardo Batista on 9/27/2024 in #🙋questions
Extremely slow loading on mobile
Yes, I already did a few things: for videos I am using lite-youtube React package, but not much more. A lot seems to come out of the JS inside OpenSaaS.
10 replies
WWasp-lang
Created by Ricardo Batista on 5/21/2024 in #🙋questions
Installing Reflio affiliate manager
Thanks for the quick reply!
32 replies
WWasp-lang
Created by Ricardo Batista on 5/21/2024 in #🙋questions
Installing Reflio affiliate manager
hey @miho any plans for this? I have a few users already churning because I can't deploy a fix that depends on the refresh token 😦
32 replies
WWasp-lang
Created by Ricardo Batista on 7/18/2024 in #🙋questions
Undefined identifier: User
It was stuff that was wrong already. Have a look at that code independently.
31 replies
WWasp-lang
Created by Ricardo Batista on 5/21/2024 in #🙋questions
Installing Reflio affiliate manager
Yes, so far so good with the access token 👏
32 replies
WWasp-lang
Created by Ricardo Batista on 7/18/2024 in #🙋questions
Undefined identifier: User
Yes, I followed it - still had the errors I laid out here
31 replies
WWasp-lang
Created by Ricardo Batista on 5/21/2024 in #🙋questions
Installing Reflio affiliate manager
@miho thanks for the 0.14.0 😄 When are you planning to launch 0.14.1 (with the refresh token)?
32 replies
WWasp-lang
Created by Ricardo Batista on 7/18/2024 in #🙋questions
Undefined identifier: User
(sorry to be pasting here these issues, but I am bit lost here)
31 replies
WWasp-lang
Created by Ricardo Batista on 7/18/2024 in #🙋questions
Undefined identifier: User
And now getting:
[ Wasp ] server/operations/actions/index.ts(161,14): error TS2322: Type '(args: unknown, context: { user: AuthUser; }) => Promise<Payload>' is not assignable to type '(args: GenerateArticleParams, context: { user: AuthUser; }) => Promise<GenerateArticleResponse>'.
[ Wasp ] Type 'Promise<Payload>' is not assignable to type 'Promise<GenerateArticleResponse>'.
[ Wasp ] Type 'Payload' is not assignable to type 'GenerateArticleResponse'.
[ Wasp ] Type 'string' is not assignable to type 'GenerateArticleResponse'.
[ Wasp ] server/operations/actions/index.ts(161,57): error TS2344: Type '({ keywords, serviceSlug, name, userEmail, description, sitemapUrl, url, blog, internalLinkingStrength, localization, language, adherence, model, instructions, includeTocAndRelated, debug, frontmatterType, }: GenerateArticleParams) => Promise<GenerateArticleResponse>' does not satisfy the constraint 'GenericAuthenticatedOperationDefinition'.
[ Wasp ] Type 'Promise<GenerateArticleResponse>' is not assignable to type 'Payload | Promise<Payload>'.
[ Wasp ] Type 'Promise<GenerateArticleResponse>' is not assignable to type 'Symbol | Set<SuperJSONValue> | Map<SuperJSONValue, SuperJSONValue> | Promise<Payload>'.
[ Wasp ] Type 'Promise<GenerateArticleResponse>' is not assignable to type 'Promise<Payload>'.
[ Wasp ] Type 'GenerateArticleResponse' is not assignable to type 'Payload'.
[ Wasp ] Type 'GenerateArticleResponse' is not assignable to type 'SuperJSONObject'.
[ Wasp ] Index signature for type 'string' is missing in type 'GenerateArticleResponse'.
[ Wasp ] server/operations/actions/index.ts(161,14): error TS2322: Type '(args: unknown, context: { user: AuthUser; }) => Promise<Payload>' is not assignable to type '(args: GenerateArticleParams, context: { user: AuthUser; }) => Promise<GenerateArticleResponse>'.
[ Wasp ] Type 'Promise<Payload>' is not assignable to type 'Promise<GenerateArticleResponse>'.
[ Wasp ] Type 'Payload' is not assignable to type 'GenerateArticleResponse'.
[ Wasp ] Type 'string' is not assignable to type 'GenerateArticleResponse'.
[ Wasp ] server/operations/actions/index.ts(161,57): error TS2344: Type '({ keywords, serviceSlug, name, userEmail, description, sitemapUrl, url, blog, internalLinkingStrength, localization, language, adherence, model, instructions, includeTocAndRelated, debug, frontmatterType, }: GenerateArticleParams) => Promise<GenerateArticleResponse>' does not satisfy the constraint 'GenericAuthenticatedOperationDefinition'.
[ Wasp ] Type 'Promise<GenerateArticleResponse>' is not assignable to type 'Payload | Promise<Payload>'.
[ Wasp ] Type 'Promise<GenerateArticleResponse>' is not assignable to type 'Symbol | Set<SuperJSONValue> | Map<SuperJSONValue, SuperJSONValue> | Promise<Payload>'.
[ Wasp ] Type 'Promise<GenerateArticleResponse>' is not assignable to type 'Promise<Payload>'.
[ Wasp ] Type 'GenerateArticleResponse' is not assignable to type 'Payload'.
[ Wasp ] Type 'GenerateArticleResponse' is not assignable to type 'SuperJSONObject'.
[ Wasp ] Index signature for type 'string' is missing in type 'GenerateArticleResponse'.
31 replies
WWasp-lang
Created by Ricardo Batista on 7/18/2024 in #🙋questions
Undefined identifier: User
Spot on!
31 replies
WWasp-lang
Created by Ricardo Batista on 7/18/2024 in #🙋questions
Undefined identifier: User
Weird, now when building with wasp start I get
[ Wasp ] ext-src/client/admin/components/Header.tsx(1,15): error TS2305: Module '"wasp/auth/types"' has no exported member 'AuthUser'.
[ Wasp ] ext-src/client/admin/components/Header.tsx(1,15): error TS2305: Module '"wasp/auth/types"' has no exported member 'AuthUser'.
(cc @kapa.ai )
31 replies
WWasp-lang
Created by Ricardo Batista on 7/18/2024 in #🙋questions
Undefined identifier: User
Damn, so simple @IamIconLiving 🌶 - sorry for not following the guide 🙏
31 replies
WWasp-lang
Created by Ricardo Batista on 7/18/2024 in #🙋questions
Undefined identifier: User
When I do wasp version I still get:
Ricardos-MacBook-Pro:app rbatista19$ wasp version
0.13.2

If you wish to install/switch to the latest version of Wasp, do:
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s

If you want specific x.y.z version of Wasp, do:
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s -- -v x.y.z

Check https://github.com/wasp-lang/wasp/releases for the list of valid versions, including the latest one.
Ricardos-MacBook-Pro:app rbatista19$ wasp version
0.13.2

If you wish to install/switch to the latest version of Wasp, do:
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s

If you want specific x.y.z version of Wasp, do:
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s -- -v x.y.z

Check https://github.com/wasp-lang/wasp/releases for the list of valid versions, including the latest one.
31 replies
WWasp-lang
Created by Ricardo Batista on 6/21/2024 in #🙋questions
Error calculating daily stats
Big thanks to @Vinny (@Wasp) for helping out! Got it now, there were three things: 1. I had to use const PRIVATE_KEY = JSON.parse(Buffer.from(process.env.GOOGLE_ANALYTICS_PRIVATE_KEY!, "base64").toString().replace(/\n/g,"")) as per this comment 2. I was encoding with single quotation marks, it should be echo -n ""-----BEGIN PRIVATE KEY---(...)"" | base64 3. I had to enable the Google Analytics Data API in Google Console Maybe you guys can include this in the documentation for future reference?
51 replies
WWasp-lang
Created by Ricardo Batista on 6/21/2024 in #🙋questions
Error calculating daily stats
Man, this is so weird - there must be some small thing I am missing. When I log the key I get exactly the same... Let me send you in private the keys, maybe you can find it
51 replies
WWasp-lang
Created by Ricardo Batista on 6/21/2024 in #🙋questions
Error calculating daily stats
No description
51 replies
WWasp-lang
Created by Ricardo Batista on 6/21/2024 in #🙋questions
Error calculating daily stats
Through GTM it also fires the tag - my point is that you don't need the tag to fire, you need access to the info in GA.
51 replies
WWasp-lang
Created by Ricardo Batista on 6/21/2024 in #🙋questions
Error calculating daily stats
But it is weird that DailyStats needs to the GA tag to fire... I have GTM tag in main.wasp:
// Google tag manager tag
"<!-- Google Tag Manager --><script>window.dataLayer = window.dataLayer || []; function gtag(){window.dataLayer.push(arguments);} gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied'}); gtag('consent', 'update', {'ad_storage': 'denied', 'analytics_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied'});(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-...');</script>",
// Google tag manager tag
"<!-- Google Tag Manager --><script>window.dataLayer = window.dataLayer || []; function gtag(){window.dataLayer.push(arguments);} gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied'}); gtag('consent', 'update', {'ad_storage': 'denied', 'analytics_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied'});(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-...');</script>",
51 replies
WWasp-lang
Created by Ricardo Batista on 6/21/2024 in #🙋questions
Error calculating daily stats
The issue in having the script tag is that it would fire twice (one thru OpenSaaS, another thru GTM). But I do have the key in .env.server:
# (OPTIONAL) get your google service account key at https://console.cloud.google.com/iam-admin/serviceaccounts
GOOGLE_ANALYTICS_CLIENT_EMAIL=google-analytics@meeting-reminder...
# Make sure you convert the private key within the JSON file to base64 first with `echo -n "PRIVATE_KEY" | base64`. see the docs for more info.
GOOGLE_ANALYTICS_PRIVATE_KEY=LS0tLS1CRUdJTiBQUklW...
# You will find your Property ID in the Google Analytics dashboard. It will look like '987654321'
GOOGLE_ANALYTICS_PROPERTY_ID=438..
# (OPTIONAL) get your google service account key at https://console.cloud.google.com/iam-admin/serviceaccounts
GOOGLE_ANALYTICS_CLIENT_EMAIL=google-analytics@meeting-reminder...
# Make sure you convert the private key within the JSON file to base64 first with `echo -n "PRIVATE_KEY" | base64`. see the docs for more info.
GOOGLE_ANALYTICS_PRIVATE_KEY=LS0tLS1CRUdJTiBQUklW...
# You will find your Property ID in the Google Analytics dashboard. It will look like '987654321'
GOOGLE_ANALYTICS_PROPERTY_ID=438..
This should be enough, right?
51 replies