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:
47 Replies
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.gitpod /workspace/open-saas (main) $ wasp version
0.12.4
No errors in the terminal
Do you have something else running on port 3001? ๐
No, I don't
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?
I'm running it on Gitpod
Wohooo @yanchok, you just became a Waspeteer level 1!
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 infooh 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.
Thanks a lot! I'll try to copy the settings ๐
Yeah Gitpod will be a bit tricky, any specific reason why you wnat to run it on Gitpod?
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?
have you copied
.env.server.example
to .env.server
? you can do that via the terminal with cp .env.server.example .env.server
?Yes
maybe if you share some more details we can help further, for example, what errors you're getting
the errors are on the browser console only (first image i shared)
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
that's what is happening in the yml file https://github.com/wasp-lang/gitpod-template/blob/main/.gitpod.yml
GitHub
gitpod-template/.gitpod.yml at main ยท wasp-lang/gitpod-template
Contribute to wasp-lang/gitpod-template development by creating an account on GitHub.
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 ๐
Wow I got it to work! Thanks a lot for the help!
oh that's great! how did you resolve the issue?
As you said I added the env vars. That was the thing i was missing.
Wohooo @yanchok, you just became a Waspeteer level 2!
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:
sure that would be great. Ill take a look at it tomorrow :godfatherboi:
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.
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?
oh, ok
Only on the browser console
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
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.
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.
Wohooo @nitish30, you just became a Waspeteer level 1!
Appreciate the insights to fix this issue.
This is probably what you are looking for
Hi @miho, I already did it. However same problem persist.
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?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
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/
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
Ah, okay. thank you
Could you share the Gitpod app with me somehow so I can try to debug it?
hey @nitish30 give it a try now. Should work! https://websockets-client-production.up.railway.app/
How did you get to run wasp on your PC? I'd like to do it too
if you're using windows check out this guide https://wasp-lang.dev/blog/2023/11/21/guide-windows-development-wasp-wsl