Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit will not deploy #278

Closed
justin-hackin opened this issue Mar 30, 2024 · 11 comments
Closed

Initial commit will not deploy #278

justin-hackin opened this issue Mar 30, 2024 · 11 comments

Comments

@justin-hackin
Copy link

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

When I clone this project, and follow all setup instructions, the deployment happens but the healthcheck is never healthy. The prisma db call to count errors out:

The table `main.User` does not exist in the current database.

on the call to count.

I made my demo app public so you can see for yourself: https://github.com/justin-hackin/test-indie-stack

I tried many times. One time I didn't use the app name with the randomly generated string (I removed that). I assumed if the cli let me create an app, the name was as unique as it needs to be. However, I noticed that it complained about having the wrong region set and I was able to fix it by adding primary_region = "yyz" to my config. Does the app ensure the name is globally unique as I hear is required?

this post says create command deprecated. Could this be the cause?

Expected Behavior

The initial repo should deploy successfully after init/setup

Actual Behavior

see steps

@justin-hackin
Copy link
Author

I tried fly launch after attempting all this and it's the same problem with that too.

@justin-hackin
Copy link
Author

Although the fly launch hung on the healthcheck, when I pushed the changes, the github action was able to deploy. Sadly, I wasted many hours on this. I expected more from a supported stack with a paid subscription business behind it.

@justin-hackin
Copy link
Author

Here's what happened in the logs when the cli launch run hangs on healthcheck:

2024-03-30T22:06:49.877 app[9080e30dae94d8] yyz [info] > start

2024-03-30T22:06:49.877 app[9080e30dae94d8] yyz [info] > remix-serve ./build/index.js

2024-03-30T22:06:50.227 app[9080e30dae94d8] yyz [info] /myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10

2024-03-30T22:06:50.227 app[9080e30dae94d8] yyz [info] throw new Error(prefix);

2024-03-30T22:06:50.227 app[9080e30dae94d8] yyz [info] ^

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] Error: Invariant failed

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at invariant (/myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10:15)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at Object.<anonymous> (/myapp/build/index.js:186:35)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at Module._compile (node:internal/modules/cjs/loader:1364:14)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1422:10)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at Module.load (node:internal/modules/cjs/loader:1203:32)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at Function.Module._load (node:internal/modules/cjs/loader:1019:12)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:203:29)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at ModuleJob.run (node:internal/modules/esm/module_job:195:25)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at ModuleLoader.import (node:internal/modules/esm/loader:337:24)

2024-03-30T22:06:50.228 app[9080e30dae94d8] yyz [info] at importModuleDynamicallyWrapper (node:internal/vm/module:432:15)

2024-03-30T22:06:50.984 app[9080e30dae94d8] yyz [info] INFO Main child exited normally with code: 1

2024-03-30T22:06:50.998 app[9080e30dae94d8] yyz [info] INFO Starting clean up.

2024-03-30T22:06:50.999 app[9080e30dae94d8] yyz [info] INFO Umounting /dev/vdb from /data

2024-03-30T22:06:51.000 app[9080e30dae94d8] yyz [info] [ 4.354386] reboot: Restarting system

2024-03-30T22:06:51.190 runner[9080e30dae94d8] yyz [info] machine has reached its max restart count (10)

@justin-hackin
Copy link
Author

So, it gets worse, although the action reported a success, the app's requests all hang indefinitely 😖 I have reproduced this in 2 different projects.

@justin-hackin
Copy link
Author

I started a discussion about this cursed process here: https://community.fly.io/t/have-you-ever-successfully-deployed-a-remix-js-app-using-the-indie-stack-whats-your-secret/19017

@julianosirtori
Copy link

I had the same problem, the workaround was scaling the machine's memory

fly scale memory 1024

I fink this issue is related: #276

@MichaelDeBoey
Copy link
Member

CC/ @rubys

@frimmy
Copy link

frimmy commented Apr 14, 2024

guess... i'll just stand up a remix app on aws? 😅

I started a discussion about this cursed process here: https://community.fly.io/t/have-you-ever-successfully-deployed-a-remix-js-app-using-the-indie-stack-whats-your-secret/19017

cursed indeed

@frimmy
Copy link

frimmy commented Apr 14, 2024

https://fly.io/docs/js/frameworks/remix/ - seems like fly's docs are more up to date?

@justin-hackin
Copy link
Author

I've thought about porting my code again to this https://github.com/epicweb-dev/epic-stack which is pretty similar and more scaffolded, I would be curious to know if it "just works".

@justin-hackin
Copy link
Author

I'm closing this because when I was testing deploys there was a service outage with fly.io. I may have mistaken very long cold starts for the app hanging as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants