W
Wasp-langโ€ข9mo ago
yanchok

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
mihoโ€ข9mo 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
yanchokOPโ€ข9mo ago
gitpod /workspace/open-saas (main) $ wasp version 0.12.4
No description
No description
yanchok
yanchokOPโ€ข9mo ago
No errors in the terminal
miho
mihoโ€ข9mo ago
Do you have something else running on port 3001? ๐Ÿ™ƒ
yanchok
yanchokOPโ€ข9mo ago
No, I don't
miho
mihoโ€ข9mo 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
yanchokOPโ€ข9mo ago
I'm running it on Gitpod
MEE6
MEE6โ€ข9mo ago
Wohooo @yanchok, you just became a Waspeteer level 1!
miho
mihoโ€ข9mo 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)โ€ข9mo 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
yanchokOPโ€ข9mo ago
Thanks a lot! I'll try to copy the settings ๐Ÿ™‚
martinsos
martinsosโ€ข9mo ago
Yeah Gitpod will be a bit tricky, any specific reason why you wnat to run it on Gitpod?
yanchok
yanchokOPโ€ข9mo 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)โ€ข9mo 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
yanchokOPโ€ข9mo ago
Yes
Vinny (@Wasp)
Vinny (@Wasp)โ€ข9mo ago
maybe if you share some more details we can help further, for example, what errors you're getting
yanchok
yanchokOPโ€ข9mo ago
the errors are on the browser console only (first image i shared)
Vinny (@Wasp)
Vinny (@Wasp)โ€ข9mo 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)โ€ข9mo 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)โ€ข9mo 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
yanchokOPโ€ข9mo ago
Wow I got it to work! Thanks a lot for the help!
Vinny (@Wasp)
Vinny (@Wasp)โ€ข9mo ago
oh that's great! how did you resolve the issue?
yanchok
yanchokOPโ€ข9mo ago
As you said I added the env vars. That was the thing i was missing.
MEE6
MEE6โ€ข9mo ago
Wohooo @yanchok, you just became a Waspeteer level 2!
yanchok
yanchokOPโ€ข9mo 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)โ€ข9mo ago
sure that would be great. Ill take a look at it tomorrow :godfatherboi:
yanchok
yanchokOPโ€ข9mo 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)โ€ข9mo 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
yanchokOPโ€ข9mo ago
oh, ok
yanchok
yanchokOPโ€ข9mo ago
Only on the browser console
No description
Vinny (@Wasp)
Vinny (@Wasp)โ€ข9mo 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)โ€ข9mo 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
nitish30โ€ข9mo 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
MEE6โ€ข9mo ago
Wohooo @nitish30, you just became a Waspeteer level 1!
nitish30
nitish30โ€ข9mo ago
Appreciate the insights to fix this issue.
miho
mihoโ€ข9mo ago
This is probably what you are looking for
nitish30
nitish30โ€ข9mo ago
Hi @miho, I already did it. However same problem persist.
miho
mihoโ€ข9mo 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
nitish30โ€ข9mo 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
nitish30โ€ข9mo ago
No description
nitish30
nitish30โ€ข8mo 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
mihoโ€ข8mo 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
nitish30โ€ข8mo ago
Ah, okay. thank you
miho
mihoโ€ข8mo ago
Could you share the Gitpod app with me somehow so I can try to debug it?
Vinny (@Wasp)
Vinny (@Wasp)โ€ข8mo ago
hey @nitish30 give it a try now. Should work! https://websockets-client-production.up.railway.app/
Y. Fernandez
Y. Fernandezโ€ข8mo 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