Dom
Dom
WWasp
Created by Dom on 1/14/2025 in #🙋questions
Updating CORS settings for myapp-server
Will this overwrite myapp-client.fly.dev or will it add custom-domain.com as an additional entry to the CORS list? I hope it's that easy, I just want to avoid that I break my existing setup by overwriting a variable that should not be overwritten 😄
7 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
Just forgot to also specify my server enironment variables when I ran this for the first time and added them later when I re-deployed two, three times in the hopes of fixing the port issue
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
Yes, I did exactly that, including my client environment variables
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
I initially deployed my app without specifying any environment variables, and the PORT environment variable was still defined under Secrets on fly.io. Since you @NEROX also deployed without any environment variables first, I figure that this is some kind of default value that is set if not specified otherwise.
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
Yes, it sounds like you had the same problem @NEROX . Did you ever figure out why your PORT was set to 8080 before manually changing it?
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
Just one final question before I mark this question as solved: when is the PORT variable set to 8080 and why?
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
Did some more digging and found the solution: the environment variable for PORT was incorrectly set to 8080, so I manually changed it on fly.io under Secrets > PORT to 3000 and re-deployed with my client environment variables and now everything works as intended! 🚀
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
I've also browsed the fly.io forum and found one post talking about the
auto_stop_machines
auto_stop_machines
and
auto_start_machines
auto_start_machines
potentially causing this. While I have not changed my fly-server.toml file to configure the myapp-server app to never shut down, I once manually forced the myapp-server app to start before navigating to the URL of myapp-client, but to no avail. This caused the same instance refused connection message in the logs.
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
I searched my whole project for any code that specifies this port 8080 but did not find anything. Do you have an idea why myapp-server is listening to the wrong port even though it is specified in the fly-server.toml file?
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
What stands out to me is that the myapp-server log has a line stating
Server listening on port 8080
Server listening on port 8080
This would obviously explain why the instance refused connection since it needs my app to listen to
0.0.0.0.3000
0.0.0.0.3000
However, my fly-server.toml file (created during first deployment, I did not make any changes to it since) specifies the internal port to 3000:
app = 'myapp-server'
primary_region = 'fra'

[build]

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 1
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
app = 'myapp-server'
primary_region = 'fra'

[build]

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 1
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
... the myapp-server logs are littered with
instance refused connection
instance refused connection
messages:
2024-12-03 20:56:07.399
[PC01] instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
2024-12-03 20:56:01.448
[PC01] instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
2024-12-03 20:55:58.110
Server listening on port 8080
2024-12-03 20:55:58.063
pg-boss started!
2024-12-03 20:55:57.904
Starting pg-boss...
[...]
2024-12-03 20:55:54.423
Prisma schema loaded from ../db/schema.prisma
2024-12-03 20:55:54.281
[PC01] instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
2024-12-03 20:55:53.433
> prisma migrate deploy --schema=../db/schema.prisma
2024-12-03 20:55:53.433
> [email protected] db-migrate-prod
2024-12-03 20:55:52.636
> npm run db-migrate-prod && NODE_ENV=production npm run start
2024-12-03 20:55:52.636
> [email protected] start-production
2024-12-03 20:55:51.738
2024/12/03 19:55:51 INFO SSH listening listen_address=[fdaa:b:9972:a7b:4e:583:ddd3:2]:22 dns_server=[fdaa::3]:53
2024-12-03 20:55:51.493
machine started in 984.97769ms
[...]
INFO Starting init (commit: 5a7554a5a)...
2024-12-03 20:55:50.609
2024-12-03T19:55:50.609528703 [01JE4R274PZFZQEBXBP920BAC2:main] Running Firecracker v1.7.0
2024-12-03 20:55:50.509
Starting machine
2024-12-03 20:56:07.399
[PC01] instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
2024-12-03 20:56:01.448
[PC01] instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
2024-12-03 20:55:58.110
Server listening on port 8080
2024-12-03 20:55:58.063
pg-boss started!
2024-12-03 20:55:57.904
Starting pg-boss...
[...]
2024-12-03 20:55:54.423
Prisma schema loaded from ../db/schema.prisma
2024-12-03 20:55:54.281
[PC01] instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
2024-12-03 20:55:53.433
> prisma migrate deploy --schema=../db/schema.prisma
2024-12-03 20:55:53.433
> [email protected] db-migrate-prod
2024-12-03 20:55:52.636
> npm run db-migrate-prod && NODE_ENV=production npm run start
2024-12-03 20:55:52.636
> [email protected] start-production
2024-12-03 20:55:51.738
2024/12/03 19:55:51 INFO SSH listening listen_address=[fdaa:b:9972:a7b:4e:583:ddd3:2]:22 dns_server=[fdaa::3]:53
2024-12-03 20:55:51.493
machine started in 984.97769ms
[...]
INFO Starting init (commit: 5a7554a5a)...
2024-12-03 20:55:50.609
2024-12-03T19:55:50.609528703 [01JE4R274PZFZQEBXBP920BAC2:main] Running Firecracker v1.7.0
2024-12-03 20:55:50.509
Starting machine
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
@Killshot @Filip @Vinny (@Wasp) thanks to all of you for pitching in. After correctly configuring my environment variables the error regarding the Stripe API key went away. I have checked the logs on fly.io and can narrow it down to a communication error between the server and client app. While the myapp-client logs look good...
2024-12-03 20:55:51.531
2024/12/03 19:55:51 INFO SSH listening listen_address=[fdaa:b:9972:a7b:4e:19e4:eb35:2]:22 dns_server=[fdaa::3]:53
2024-12-03 20:55:51.443
machine became reachable in 89.159236ms
2024-12-03 20:55:51.411
7:55PM INF Listening at http://0.0.0.0:8043 /...
2024-12-03 20:55:51.354
machine started in 966.844024ms
2024-12-03 20:55:51.353
Machine started in 962ms
2024-12-03 20:55:51.335
INFO [fly api proxy] listening at /.fly/api
2024-12-03 20:55:51.333
INFO Preparing to run: `/goStatic -fallback index.html` as appuser
2024-12-03 20:55:51.261
INFO Starting init (commit: 5a7554a5a)...
2024-12-03 20:55:50.485
2024-12-03T19:55:50.485463439 [01JE4N77228VFPNRCDP0HX0HBB:main] Running Firecracker v1.7.0
2024-12-03 20:55:50.388
Starting machine
2024-12-03 20:55:51.531
2024/12/03 19:55:51 INFO SSH listening listen_address=[fdaa:b:9972:a7b:4e:19e4:eb35:2]:22 dns_server=[fdaa::3]:53
2024-12-03 20:55:51.443
machine became reachable in 89.159236ms
2024-12-03 20:55:51.411
7:55PM INF Listening at http://0.0.0.0:8043 /...
2024-12-03 20:55:51.354
machine started in 966.844024ms
2024-12-03 20:55:51.353
Machine started in 962ms
2024-12-03 20:55:51.335
INFO [fly api proxy] listening at /.fly/api
2024-12-03 20:55:51.333
INFO Preparing to run: `/goStatic -fallback index.html` as appuser
2024-12-03 20:55:51.261
INFO Starting init (commit: 5a7554a5a)...
2024-12-03 20:55:50.485
2024-12-03T19:55:50.485463439 [01JE4N77228VFPNRCDP0HX0HBB:main] Running Firecracker v1.7.0
2024-12-03 20:55:50.388
Starting machine
43 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
Thank you @kapa.ai , I checked the forum posts you mentioned but didn't find an answer. I did check the fly.io logs for my client and server app and found that I keep getting a recurring error about the STRIPE_API_KEY being undefined. This error happens every time the server app is started, so I figure this causes this issue. I do have a Stripe API key in my .env.server file, and locally the Stripe checkout also works already. Do I have to specifically indicate the Stripe API environment variable when deploying? I understood that Wasp takes care of that for me
43 replies