Template Signup Network Error

Hey, I cloned the open-saas template, connected external DB, migrated and seeded it successfully. When I start the server and try to signup (username and pass), I get a Network Error and some errors in the console that I can't figure out where they are coming from Please help :sadboi:
No description
47 Replies
miho
miho8mo ago
Howdy 👋 could you check your terminal and see if there are any server errors there? Also, could you check your Wasp version with wasp version and share it here.
yanchok
yanchok8mo ago
gitpod /workspace/open-saas (main) $ wasp version 0.12.4
No description
No description
yanchok
yanchok8mo ago
No errors in the terminal
miho
miho8mo ago
Do you have something else running on port 3001? 🙃
yanchok
yanchok8mo ago
No, I don't
miho
miho8mo ago
I guess you are running this in WSL 😄 maybe there are some weird connectivity issues with the port 3001 🤷‍♂️ @Boris pls help, how to debug further?
yanchok
yanchok8mo ago
I'm running it on Gitpod
MEE6
MEE68mo ago
Wohooo @yanchok, you just became a Waspeteer level 1!
miho
miho8mo ago
Okay, now I understand the setup much better. - You probably need to open the 3001 port on Gitpod and set the WASP_WEB_CLIENT_URL env var in .env.server to match your client URL. - You also probably need to set the REACT_APP_API_URL to your server URL on Gitpod @Vinny (@Wasp) might be able to offer some extra info
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
oh we haven't tested openSaaS on gitpod yet @yanchok, but we have an older version of wasp running on gitpod. maybe you can check the settings here and bring them over to your open saas instance, specifically the .gitpod.Dockerfile and .gitpod.yml >> https://github.com/wasp-lang/gitpod-template
GitHub
GitHub - wasp-lang/gitpod-template
Contribute to wasp-lang/gitpod-template development by creating an account on GitHub.
yanchok
yanchok8mo ago
Thanks a lot! I'll try to copy the settings 🙂
martinsos
martinsos8mo ago
Yeah Gitpod will be a bit tricky, any specific reason why you wnat to run it on Gitpod?
yanchok
yanchok8mo ago
Because my pc is windows and I don't have admin rights to install wsl... So far i can't get the open-saas template run on gitpod, do you have any ideas?
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
have you copied .env.server.example to .env.server ? you can do that via the terminal with cp .env.server.example .env.server ?
yanchok
yanchok8mo ago
Yes
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
maybe if you share some more details we can help further, for example, what errors you're getting
yanchok
yanchok8mo ago
the errors are on the browser console only (first image i shared)
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
your gitpod server won't be running on localhost:3001 thats only for local development as Miho said you need to update these env vars in your gitpod instance
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
GitHub
gitpod-template/.gitpod.yml at main · wasp-lang/gitpod-template
Contribute to wasp-lang/gitpod-template development by creating an account on GitHub.
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
if you have that at the root of your github repo and gitpod project then it should work try restarting it perhaps so when I run our wasp gitpod template example, I see the server url is https://3001-wasplang-gitpodtemplate-n2go826pn44.ws-eu110.gitpod.io/auth/me rather than localhost maybe test things out with this first, to get a feel for how it works but if you can install WSL on windows, that will make your life a lot easier 🙂
yanchok
yanchok8mo ago
Wow I got it to work! Thanks a lot for the help!
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
oh that's great! how did you resolve the issue?
yanchok
yanchok8mo ago
As you said I added the env vars. That was the thing i was missing.
MEE6
MEE68mo ago
Wohooo @yanchok, you just became a Waspeteer level 2!
yanchok
yanchok8mo ago
I can make it easier to start with gitpod and make a pull request. There could be an easy button "open on gitpod" in the readme as well. What do you think @Vinny (@Wasp) ? :boi:
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
sure that would be great. Ill take a look at it tomorrow :godfatherboi:
yanchok
yanchok8mo ago
Hmm, turns out it only works with email/password but not username/password. When you use a username, the instance starts, but there is only blank screen.
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
you can try it out with username/password but for stripe payments to work you need to use Google, Github, or Email auth are you seeing any errors when using username/password?
yanchok
yanchok8mo ago
oh, ok
yanchok
yanchok8mo ago
Only on the browser console
No description
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
it looks like you're importing the Email Verification method in the main.wasp file but you haven't uncommented out the code in that file
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
make sure you read about it in the docs here https://docs.opensaas.sh/guides/authentication/
OpenSaaS.sh
Authentication
Open SaaS is a free, open-source, full-stack SaaS starter kit for React + NodeJS.
nitish30
nitish307mo ago
Hi, I am using gitpod. It seems there is CORS issue. Access to XMLHttpRequest at 'https://3001-nitishymtpl-helm-8yx30aljes6.ws-us110.gitpod.io/auth/me' from origin 'https://3000-nitishymtpl-helm-8yx30aljes6.ws-us110.gitpod.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
MEE6
MEE67mo ago
Wohooo @nitish30, you just became a Waspeteer level 1!
nitish30
nitish307mo ago
Appreciate the insights to fix this issue.
miho
miho7mo ago
This is probably what you are looking for
nitish30
nitish307mo ago
Hi @miho, I already did it. However same problem persist.
miho
miho7mo ago
What did you try doing so far? We need a bit more information to be able to help you 😄 Besides that error above, what else are you seeing? Did you create .env.client with the REACT_APP_API_URL to your server URL? Did you try basic stuff like restarting the app?
nitish30
nitish307mo ago
In .env.server, I added: WASP_WEB_CLIENT_URL=https://3000-nitishymtpl-helm-98clwhfoi7c.ws-us110.gitpod.io In .env.client, I added: REACT_APP_SOME_VAR_NAME=foo REACT_APP_API_URL=https://3001-nitishymtpl-helm-98clwhfoi7c.ws-us110.gitpod.io
nitish30
nitish307mo ago
No description
nitish30
nitish307mo ago
I did research a bit, it seems this is frequent error. https://websockets-client-production.up.railway.app/login this is app which is hosted on official website shows the same errorhttps://wasp-lang.dev/
miho
miho7mo ago
It's a different cause of the error, the server is not running for this app! We have to fix that 😄 thank you for letting us know It's midnight where I am, so I'll get back to you in the morning on your error, thank you for the details
nitish30
nitish307mo ago
Ah, okay. thank you
miho
miho7mo ago
Could you share the Gitpod app with me somehow so I can try to debug it?
Vinny (@Wasp)
Vinny (@Wasp)7mo ago
hey @nitish30 give it a try now. Should work! https://websockets-client-production.up.railway.app/
Y. Fernandez
Y. Fernandez7mo ago
How did you get to run wasp on your PC? I'd like to do it too
Want results from more Discord servers?
Add your server