Skip to content

App crashes immediately in Heroku #2281

Description

@HorseJump

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

Activity

  1. lperson commented on Apr 22, 2023

    @lperson
    Collaborator

    What do you see in the logs?

  2. HorseJump commented on Apr 24, 2023

    @HorseJump
    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]: > spoke@13.0.0 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]: > spoke@13.0.0 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]: > spoke@13.0.0 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]: > spoke@13.0.0 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
    ```
    
  3. HorseJump commented on Apr 25, 2023

    @HorseJump
    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]: > spoke@13.0.0 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
    
  4. Arique1104 commented on Jul 10, 2023

    @Arique1104
    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.

  5. HorseJump commented on Dec 29, 2023

    @HorseJump
    Author

    Just upgraded to 13.1.0 and this is still happening

  6. self-assigned this
    on Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions