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

App crashes immediately in Heroku #2281

Open
HorseJump opened this issue Apr 22, 2023 · 5 comments
Open

App crashes immediately in Heroku #2281

HorseJump opened this issue Apr 22, 2023 · 5 comments
Labels
C-bug Type: Bug

Comments

@HorseJump
Copy link

Describe the bug
A clear and concise description of what the bug is.
App crashes immediately upon deployment in Heroku. Says expected path to be of type "string" but is undefined.

To Reproduce
Steps to reproduce the behavior:
Deploy from Github pulling from main

Expected behavior
A clear and concise description of what you expected to happen.
App should deploy without crashing.

Platform (please complete the following information):

  • Browser: Firefox
  • Desktop or Mobile? Desktop
  • Version: Spoke v13
@HorseJump HorseJump added the C-bug Type: Bug label Apr 22, 2023
@lperson
Copy link
Collaborator

lperson commented Apr 22, 2023

What do you see in the logs?

@HorseJump
Copy link
Author

2023-04-24T23:14:27.681249+00:00 heroku[web.1]: Restarting
2023-04-24T23:14:27.695712+00:00 heroku[web.1]: State changed from up to starting
2023-04-24T23:14:29.117570+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2023-04-24T23:14:29.494037+00:00 heroku[web.1]: Process exited with status 143
2023-04-24T23:14:44.400214+00:00 heroku[web.1]: Starting process with command `npm run start:heroku`
2023-04-24T23:14:45.875218+00:00 app[web.1]:
2023-04-24T23:14:45.875225+00:00 app[web.1]: > [email protected] start:heroku
2023-04-24T23:14:45.875225+00:00 app[web.1]: > BASE_URL=$(node ./build/server/heroku/print-base-url) npm start
2023-04-24T23:14:45.875225+00:00 app[web.1]:
2023-04-24T23:14:46.190574+00:00 app[web.1]:
2023-04-24T23:14:46.190589+00:00 app[web.1]: > [email protected] start
2023-04-24T23:14:46.190589+00:00 app[web.1]: > node ./build/server/server
2023-04-24T23:14:46.190590+00:00 app[web.1]:
2023-04-24T23:14:46.472308+00:00 app[web.1]: node:internal/validators:162
2023-04-24T23:14:46.472333+00:00 app[web.1]: throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
2023-04-24T23:14:46.472333+00:00 app[web.1]: ^
2023-04-24T23:14:46.472333+00:00 app[web.1]:
2023-04-24T23:14:46.472334+00:00 app[web.1]: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
2023-04-24T23:14:46.472335+00:00 app[web.1]: at new NodeError (node:internal/errors:387:5)
2023-04-24T23:14:46.472335+00:00 app[web.1]: at validateString (node:internal/validators:162:11)
2023-04-24T23:14:46.472336+00:00 app[web.1]: at Object.join (node:path:1172:7)
2023-04-24T23:14:46.472336+00:00 app[web.1]: at Object.<anonymous> (/app/build/server/server/middleware/app-renderer.js:25:173)
2023-04-24T23:14:46.472356+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1155:14)
2023-04-24T23:14:46.472357+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
2023-04-24T23:14:46.472357+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:1033:32)
2023-04-24T23:14:46.472357+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:868:12)
2023-04-24T23:14:46.472357+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1057:19)
2023-04-24T23:14:46.472358+00:00 app[web.1]: at require (node:internal/modules/cjs/helpers:103:18) {
2023-04-24T23:14:46.472358+00:00 app[web.1]: code: 'ERR_INVALID_ARG_TYPE'
2023-04-24T23:14:46.472358+00:00 app[web.1]: }
2023-04-24T23:14:46.623610+00:00 heroku[web.1]: Process exited with status 1
2023-04-24T23:14:46.658300+00:00 heroku[web.1]: State changed from starting to crashed
2023-04-24T23:14:46.666153+00:00 heroku[web.1]: State changed from crashed to starting
2023-04-24T23:14:55.425794+00:00 heroku[web.1]: Starting process with command `npm run start:heroku`
2023-04-24T23:14:57.171914+00:00 app[web.1]:
2023-04-24T23:14:57.171943+00:00 app[web.1]: > [email protected] start:heroku
2023-04-24T23:14:57.171946+00:00 app[web.1]: > BASE_URL=$(node ./build/server/heroku/print-base-url) npm start
2023-04-24T23:14:57.171946+00:00 app[web.1]:
2023-04-24T23:14:57.551401+00:00 app[web.1]:
2023-04-24T23:14:57.551417+00:00 app[web.1]: > [email protected] start
2023-04-24T23:14:57.551417+00:00 app[web.1]: > node ./build/server/server
2023-04-24T23:14:57.551417+00:00 app[web.1]:
2023-04-24T23:14:57.981487+00:00 app[web.1]: node:internal/validators:162
2023-04-24T23:14:57.981517+00:00 app[web.1]: throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
2023-04-24T23:14:57.981517+00:00 app[web.1]: ^
2023-04-24T23:14:57.981518+00:00 app[web.1]:
2023-04-24T23:14:57.981518+00:00 app[web.1]: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
2023-04-24T23:14:57.981518+00:00 app[web.1]: at new NodeError (node:internal/errors:387:5)
2023-04-24T23:14:57.981519+00:00 app[web.1]: at validateString (node:internal/validators:162:11)
2023-04-24T23:14:57.981519+00:00 app[web.1]: at Object.join (node:path:1172:7)
2023-04-24T23:14:57.981520+00:00 app[web.1]: at Object.<anonymous> (/app/build/server/server/middleware/app-renderer.js:25:173)
2023-04-24T23:14:57.981522+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1155:14)
2023-04-24T23:14:57.981523+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
2023-04-24T23:14:57.981523+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:1033:32)
2023-04-24T23:14:57.981523+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:868:12)
2023-04-24T23:14:57.981523+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1057:19)
2023-04-24T23:14:57.981524+00:00 app[web.1]: at require (node:internal/modules/cjs/helpers:103:18) {
2023-04-24T23:14:57.981524+00:00 app[web.1]: code: 'ERR_INVALID_ARG_TYPE'
2023-04-24T23:14:57.981524+00:00 app[web.1]: }
2023-04-24T23:14:58.141077+00:00 heroku[web.1]: Process exited with status 1
2023-04-24T23:14:58.184639+00:00 heroku[web.1]: State changed from starting to crashed
2023-04-24T23:14:59.619454+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fnbeastcle.org request_id=3cee19c4-8e25-42e1-b7a1-3d00533b8751 fwd="173.91.5.103" dyno= connect= service= status=503 bytes= protocol=https
2023-04-24T23:15:00.116052+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fnbeastcle.org request_id=d6cc7136-24a5-4d65-a645-404da1bdc4b6 fwd="173.91.5.103" dyno= connect= service= status=503 bytes= protocol=https
2023-04-24T23:15:29.000000+00:00 app[api]: Build succeeded
2023-04-24T23:15:36.976786+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fnbeastcle.org request_id=0ae24bf6-f37e-4461-9069-e8aedc361cee fwd="173.91.5.103" dyno= connect= service= status=503 bytes= protocol=https
2023-04-24T23:15:37.826025+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fnbeastcle.org request_id=9fe66895-4abd-44ce-9c0a-6ac69db5e6db fwd="173.91.5.103" dyno= connect= service= status=503 bytes= protocol=https
2023-04-24T23:15:38.255986+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fnbeastcle.org request_id=018f4c4b-2e0c-4e4f-ab87-4ff66498036c fwd="173.91.5.103" dyno= connect= service= status=503 bytes= protocol=https
```

@HorseJump
Copy link
Author

I found out that 2 environment variables were not being set in app-renderer.jsx: ASSETS_DIR and ASSETS_MAP_FILE. After setting these manually after they are printed to the console I get the following error:

2023-04-25T01:37:04.080750+00:00 app[web.1]: > [email protected] start
2023-04-25T01:37:04.080754+00:00 app[web.1]: > node ./build/server/server
2023-04-25T01:37:04.080754+00:00 app[web.1]:
2023-04-25T01:37:04.397597+00:00 app[web.1]: ASSETS_DIR:undefined
2023-04-25T01:37:04.397933+00:00 app[web.1]: ASSETS_MAP_FILE:undefined
2023-04-25T01:37:04.397957+00:00 app[web.1]: __dirname:/app/build/server/server/middleware
2023-04-25T01:37:05.724072+00:00 heroku[web.1]: State changed from starting to up
2023-04-25T01:37:05.562929+00:00 app[web.1]: Successfully loaded legacy job runner
2023-04-25T01:37:05.665850+00:00 app[web.1]: backend info Node app is running on port 35489
2023-04-25T01:37:05.733650+00:00 app[web.1]: backend error Error: ENOENT: no such file or directory, scandir '/spoke/build/server/migrations'
2023-04-25T01:37:05.882266+00:00 heroku[web.1]: Process exited with status 1
2023-04-25T01:37:05.917308+00:00 heroku[web.1]: State changed from up to crashed

@Arique1104
Copy link
Collaborator

A new update to the json file will solve this issue is in QA currently. We have scheduled a release to drop this Friday to resolve this issue - however those changes are dependent on passing of retrogressive QAing.

@HorseJump
Copy link
Author

Just upgraded to 13.1.0 and this is still happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants