CamBlackwood
CamBlackwood
Explore posts from servers
WWasp-lang
Created by CamBlackwood on 9/16/2024 in #🙋questions
Stripe Webhook not firing when relevant events fire
I am trying to use the standard OpenSaaS implementation and have noticed that the stripe webhook does not fire at all even when the events are happening (I am testing it locally) - I've tried both just having it running and manually triggering the events and manually firing the events via the command line, but the stripe webhook doesn't run at all. I've added my STRIPE_WEBHOOK_SECRET to my env variables.
5 replies
WWasp-lang
Created by CamBlackwood on 9/16/2024 in #🙋questions
Deployed Server and Client appear "Disconnected"
I am deploying via the Wasp CLI with fly.io, and after trying to debug some unrelated deployment issues I now have a problem where it appears the client cannot connect to the database at all. The initial auth request is hanging and nothing involving the database works at all. I can see via listing the secrets that all the environment variables are correct (or at least present) on the server. Additionally, everything I try locally all works so I am unable to debug it locally. Looking at fly.io's dashboard, the server seems to be online and successfully receiving releases. I can also connect to it via the command line. Are there any steps I can take to figure out what's going on? I currently don't have a database backup so I'd like to avoid totally re-launching my app if possible.
21 replies
WWasp-lang
Created by CamBlackwood on 9/15/2024 in #🙋questions
Accidentally deleted database url from production environment while debugging - how to proceed
I have been debugging an issue and inadvertadly deleted my database url from my production environment whilst debugging a different issue. What's the best way of retireiving it?
84 replies
WWasp-lang
Created by CamBlackwood on 9/15/2024 in #🙋questions
Issue deploying with secrets
wasp deploy fly deploy cmd --context server secrets set $SECRETS This is giving me an error - error: unknown option '--context' The secrets are correct for sure - I am following this guide https://wasp-lang.dev/docs/advanced/deployment/cli
46 replies
WWasp-lang
Created by CamBlackwood on 9/13/2024 in #🙋questions
Is there a way to test run a job with a command in wasp?
I'd like to test a script that I wrote but as it only runs once a day it's not practical. I could try and use it in a different file but wanted to check if there was an easy way first
6 replies
WWasp-lang
Created by CamBlackwood on 9/3/2024 in #🙋questions
After deploying, my wasp app says "This site can’t be reached" - it was previously working
I had my wasp app working as expected after deploying to my domain last week, but now when I try and visit it (https://www.microinfluencer.club/), I get this error - www.microinfluencer.club’s server IP address could not be found. It was working last week, and I noticed the app says it is suspended on fly (but the client app is accessible on fly). The domain itself was previously configured to vercel, but as far as I know I removed everything related to that in my DNS settings.
15 replies
WWasp-lang
Created by CamBlackwood on 8/26/2024 in #🙋questions
Best Way of Migrating DB on deployed project?
When I'm running locally and my schema changes, I just run wasp db migrate-dev - what's the best approach for this when I have a production environment deployed?
20 replies
WWasp-lang
Created by CamBlackwood on 8/9/2024 in #🙋questions
Getting network errors when trying to authenticate when running app with remote database locally
I'm currently trying to test out some functionality locally that requires using the production database - I'm proxying requests to to a localhost port and can access the right data for sure (I can see it when I run wasp db studio) The specifc error I get is "ERR_CONNECTION_REFUSED"
15 replies
WWasp-lang
Created by CamBlackwood on 8/7/2024 in #🙋questions
Correct way of using environment variables when deploying via CLI
I've been looking at the documentation and am slightly confused around the way to deploy. I don't know if I'm overthinking it, but according to the docs the server secrets are set like this:
wasp deploy fly cmd secrets set GOOGLE_CLIENT_ID=<...> GOOGLE_CLIENT_SECRET=<...> --context=server
wasp deploy fly cmd secrets set GOOGLE_CLIENT_ID=<...> GOOGLE_CLIENT_SECRET=<...> --context=server
Does that mean you basically go through the .env.server file and add all the variables in one long command?
8 replies
WWasp-lang
Created by CamBlackwood on 7/5/2024 in #🙋questions
Link Components having typescript errors when linking to a path with a slug
When I try and use the "to" prop of a Link component, I get a typescript error on wasp start saying that it is not of the correct type if it contains a slug - eg profile/123 fails as the 123 is dynamic. What's the best way around this?
6 replies
WWasp-lang
Created by CamBlackwood on 6/29/2024 in #🙋questions
Issues deploying to fly (server + client specifically)
Hi team, just having a few issues attempting to deploy onto fly - the database has gone up totally fine, but the client and server are stuck on "pending". I've tried to redeploy by adding the db connection string to my server env file, but still getting this error Your server app does not have a DATABASE_URL secret set. Perhaps you need to create or attach your database? And both client + server are stuck on pending after several hours
11 replies
WWasp-lang
Created by CamBlackwood on 6/5/2024 in #🙋questions
Issues with MailGun
I'm attempting to add MailGun as my email provider, but running into some issues - whenever I attempt to use mailgun, I get a dependency error from ts-mailgun:
Uncaught TypeError: Cannot read properties of undefined (reading '__agent_base_https_request_patched__')
at ../../../node_modules/proxy-agent/node_modules/agent-base/patch-core.js (ts-mailgun.js?v=6165f70e:822:23)
Uncaught TypeError: Cannot read properties of undefined (reading '__agent_base_https_request_patched__')
at ../../../node_modules/proxy-agent/node_modules/agent-base/patch-core.js (ts-mailgun.js?v=6165f70e:822:23)
I investigated this and whilst there's little info online, I did find this on stackoverflow which says that version 0.5 (the version of wasp) has the issue, and 0.18 fixes it - https://stackoverflow.com/questions/50906419/cannot-read-property-validate-of-undefined-in-mailgun-js I am using wasp v0.13.2
23 replies
WWasp-lang
Created by CamBlackwood on 5/31/2024 in #🙋questions
Optimal approach to fire a second query that depends on the result of a first query?
I'm building out the messaging portion of my SaaS, and first I send a query for the chats, and then after that I retreive the details of those involved in the conversation via a second query. My standard implementation would be to use a useEffect hook with the chats as a dependency, but wondered if there was a better version of doing this in wasp?
34 replies
WWasp-lang
Created by CamBlackwood on 5/25/2024 in #🙋questions
Action expecting two arguments, but context is not passed
This might be a slight misunderstanding from my side about how actions work, but after defining a new action and attempting to call it in the client (it's a create action), it throws an error expecting a second argument (context), but in the examples and elsewhere in the opensaas code I can only see one argument being passed.
20 replies
WWasp-lang
Created by CamBlackwood on 5/15/2024 in #🙋questions
Best practice for adding properties to User entity?
I'm looking at adding a property called isCreator to the existing user entity that comes with OpenSaaS, but when I do it and attempt to migrate the db I get this error
[ Wasp ] ext-src/server/scripts/usersSeed.ts(10,9): error TS2741: Property 'isCreator' is missing in type '{ email: string; username: string; createdAt: Date; lastActiveTimestamp: Date; isAdmin: false; stripeId: string; sendEmail: false; subscriptionStatus: string; datePaid: Date; credits: number; checkoutSessionId: null; subscriptionTier: TierIds; }' but required in type 'Omit<GetResult<{ id: number; email: string; username: string; createdAt: Date; lastActiveTimestamp: Date; isAdmin: boolean; stripeId: string; checkoutSessionId: string; subscriptionTier: string; ... 4 more ...; isCreator: boolean; }, unknown> & {}, "id">'.
[ Wasp ] ext-src/server/scripts/usersSeed.ts(10,9): error TS2741: Property 'isCreator' is missing in type '{ email: string; username: string; createdAt: Date; lastActiveTimestamp: Date; isAdmin: false; stripeId: string; sendEmail: false; subscriptionStatus: string; datePaid: Date; credits: number; checkoutSessionId: null; subscriptionTier: TierIds; }' but required in type 'Omit<GetResult<{ id: number; email: string; username: string; createdAt: Date; lastActiveTimestamp: Date; isAdmin: boolean; stripeId: string; checkoutSessionId: string; subscriptionTier: string; ... 4 more ...; isCreator: boolean; }, unknown> & {}, "id">'.
I'm sure it's something I've done wrong as I am not to familiar with prisma!
7 replies
WWasp-lang
Created by CamBlackwood on 5/14/2024 in #🙋questions
"No Exported Member" Prisma Issues occurring after reinstalled dependencies w/SDK exit code 2
Hey, after running reinstalling dependencies I've had a number of issues suddenly come up, with several wasp warnings (all around prisma seemingly), and sdk build failing with exit code 2. I've gone back and copied the exact package json used in the open saas template to make sure it's not an issue with a wrong dependency version but even with 1:1 replication it still fails
9 replies
WWasp-lang
Created by CamBlackwood on 5/4/2024 in #🙋questions
504 Outdated Optimize Depth when adding any UI library
No description
8 replies
TTCTheo's Typesafe Cult
Created by CamBlackwood on 8/25/2023 in #questions
Quick way to protect all routes under a certain parent route in nextjs (app router)?
Is there any way I can try and automatically run a function (I guess some kind of middleware) to determine a user's level of auth (I'll have access to this via an API call), and then prevent the render of said page and redirect, only under a certain route and its children?
7 replies
TTCTheo's Typesafe Cult
Created by CamBlackwood on 4/14/2023 in #questions
Best Way to Handle Rich Text Input in a NextJS app?
I'm a developer working on an app connecting university/college graduates with job opportunities at startups, and as such the startups need to be able to input rich text for their "company page" and each individual job post - ensuring they're formatted properly and not just huge blocks of text. What I'm essentially after is a rudimentary version of Medium's blogging inputs. I'm currently testing it with React Slate, but has anyone used anything else that they'd recommend, or another approach entirely? Thanks 🙏
8 replies