Question

2 Exact Same Apps, One Deploys, The Other Does Not

Posted January 3, 2022 55 views
Node.jsDeployment

Hello,

On my personal account, I prototyped this App with 1 NodeJS web service and 1 NodeJS worker (using 2 $5.00/mo Basic containers), auto-deployed from Github. This app deployed successfully within a few minutes.

Later, I tried to set up the same App on my company’s account (and then I’ll remove the app on my personal account). This deployment seems to be stuck in “Building…” for hours. The Activity log is shown below (cron-jobs and express-server are the 2 containers)

[express-server] [2022-01-03 20:40:44] => Initializing build
[express-server] [2022-01-03 20:40:44] => Retrieving source code to /workspace
[express-server] [2022-01-03 20:40:44] => Selecting branch "main"
[express-server] [2022-01-03 20:40:45] => Checking out commit "dcad46991cc733a2f7bb8e8a46e88adeb1ffffb4"
[express-server] [2022-01-03 20:40:45] => Got source_dir: /
[express-server] [2022-01-03 20:40:45] => Using workspace root /workspace
[express-server] [2022-01-03 20:40:45] 
[express-server] [2022-01-03 20:40:45] => Building app using buildpacks
[express-server] [2022-01-03 20:40:45] => Injecting app environment variables:
[express-server] [2022-01-03 20:40:45]      HASURA_ADMIN_SECRET HASURA_SERVER_URL GAS_REDIRECT_URI GAS_REFRESH_TOKEN GAS_TOKEN_CONTEXT GAS_CLIENT_SECRET THIS_SERVER_SECRET GAS_CLIENT_ID GAS_DEPLOYMENT_ID SLACK_TOKEN
[express-server] [2022-01-03 20:40:46] => Running buildpack detection
[express-server] [2022-01-03 20:40:46] 
[express-server] [2022-01-03 20:40:46] 3 of 4 buildpacks participating
[express-server] [2022-01-03 20:40:46] heroku/nodejs-engine  0.5.0
[express-server] [2022-01-03 20:40:46] digitalocean/node     0.3.4
[express-server] [2022-01-03 20:40:46] digitalocean/procfile 0.0.3
[express-server] [2022-01-03 20:40:46] 
[cron-jobs] [2022-01-03 20:40:44] => Initializing build
[cron-jobs] [2022-01-03 20:40:44] => Retrieving source code to /workspace
[cron-jobs] [2022-01-03 20:40:44] => Selecting branch "main"
[cron-jobs] [2022-01-03 20:40:44] => Checking out commit "dcad46991cc733a2f7bb8e8a46e88adeb1ffffb4"
[cron-jobs] [2022-01-03 20:40:45] => Got source_dir: /
[cron-jobs] [2022-01-03 20:40:45] => Using workspace root /workspace
[cron-jobs] [2022-01-03 20:40:45] 
[cron-jobs] [2022-01-03 20:40:45] => Building app using buildpacks
[cron-jobs] [2022-01-03 20:40:45] => Injecting app environment variables:
[cron-jobs] [2022-01-03 20:40:45]      GAS_CLIENT_SECRET GAS_DEPLOYMENT_ID GAS_REDIRECT_URI SLACK_TOKEN THIS_SERVER_SECRET HASURA_ADMIN_SECRET HASURA_SERVER_URL GAS_CLIENT_ID GAS_REFRESH_TOKEN GAS_TOKEN_CONTEXT
[cron-jobs] [2022-01-03 20:40:45] => Configuring custom build command to be run at the end of the build:
[cron-jobs] [2022-01-03 20:40:45]      node scripts/cronJobs.js
[cron-jobs] [2022-01-03 20:40:46] => Running buildpack detection
[cron-jobs] [2022-01-03 20:40:46] 
[cron-jobs] [2022-01-03 20:40:46] heroku/nodejs-engine  0.5.0
[cron-jobs] [2022-01-03 20:40:46] digitalocean/node     0.3.4
[express-server] [2022-01-03 20:40:46] For documentation on the buildpacks used to build your app, please see:
[express-server] [2022-01-03 20:40:46]    Node.js: https://do.co/apps-buildpack-node
[express-server] [2022-01-03 20:40:46] 
[express-server] [2022-01-03 20:40:46] => Building app
[express-server] [2022-01-03 20:40:46] 
[express-server] [2022-01-03 20:40:47] ---> Node.js Buildpack
[express-server] [2022-01-03 20:40:47] ---> Installing toolbox
[express-server] [2022-01-03 20:40:47] ---> - jq
[express-server] [2022-01-03 20:40:47] ---> - yj
[express-server] [2022-01-03 20:40:49] ---> Getting Node version
[express-server] [2022-01-03 20:40:49] ---> Resolving Node version
[express-server] [2022-01-03 20:40:51] ---> Downloading and extracting Node v17.3.0
[express-server] [2022-01-03 20:41:07] ---> Parsing package.json
[express-server] [2022-01-03 20:41:08] ---> Installing yarn@1.22.17
[express-server] [2022-01-03 20:41:12] ---> No file to start server
[express-server] [2022-01-03 20:41:12] ---> either use 'docker run' to start container or add index.js or server.js
[express-server] [2022-01-03 20:41:12] Project contains yarn.lock, using yarn
[express-server] [2022-01-03 20:41:12] Installing node_modules using yarn (from yarn.lock)
[express-server] [2022-01-03 20:41:13] Running yarn install
[express-server] [2022-01-03 20:41:13] 
[express-server] [2022-01-03 20:41:13] yarn install v1.22.17
[express-server] [2022-01-03 20:41:13] [1/5] Validating package.json...
[cron-jobs] [2022-01-03 20:40:46] digitalocean/procfile 0.0.3
[cron-jobs] [2022-01-03 20:40:46] digitalocean/custom   0.1.0
[cron-jobs] [2022-01-03 20:40:46] 
[cron-jobs] [2022-01-03 20:40:46] For documentation on the buildpacks used to build your app, please see:
[cron-jobs] [2022-01-03 20:40:46]    Node.js: https://do.co/apps-buildpack-node
[cron-jobs] [2022-01-03 20:40:46] 
[cron-jobs] [2022-01-03 20:40:46] => Building app
[cron-jobs] [2022-01-03 20:40:46] 
[cron-jobs] [2022-01-03 20:40:47] ---> Node.js Buildpack
[cron-jobs] [2022-01-03 20:40:47] ---> Installing toolbox
[cron-jobs] [2022-01-03 20:40:47] ---> - jq
[cron-jobs] [2022-01-03 20:40:47] ---> - yj
[cron-jobs] [2022-01-03 20:40:49] ---> Getting Node version
[cron-jobs] [2022-01-03 20:40:49] ---> Resolving Node version
[cron-jobs] [2022-01-03 20:40:51] ---> Downloading and extracting Node v17.3.0
[cron-jobs] [2022-01-03 20:41:07] ---> Parsing package.json
[cron-jobs] [2022-01-03 20:41:09] ---> Installing yarn@1.22.17
[express-server] [2022-01-03 20:41:13] [2/5] Resolving packages...
[express-server] [2022-01-03 20:41:13] [3/5] Fetching packages...
[express-server] [2022-01-03 20:41:25] [4/5] Linking dependencies...
[express-server] [2022-01-03 20:41:27] [5/5] Building fresh packages...
[express-server] [2022-01-03 20:41:27] Done in 13.40s.
[express-server] [2022-01-03 20:41:27] 
[express-server] [2022-01-03 20:41:31] 
[express-server] [2022-01-03 20:41:31] => Uploading the built Docker image to the container registry...
[express-server] [2022-01-03 20:41:37] Adding layer 'heroku/nodejs-engine:nodejs'
[express-server] [2022-01-03 20:41:41] Adding layer 'heroku/nodejs-engine:yarn'
[express-server] [2022-01-03 20:41:46] Adding 2/2 app layer(s)
[express-server] [2022-01-03 20:41:46] Adding layer 'launcher'
[express-server] [2022-01-03 20:41:46] Adding layer 'config'
[express-server] [2022-01-03 20:41:46] Adding label 'io.buildpacks.lifecycle.metadata'
[express-server] [2022-01-03 20:41:46] Adding label 'io.buildpacks.build.metadata'
[express-server] [2022-01-03 20:41:46] Adding label 'io.buildpacks.project.metadata'
[express-server] [2022-01-03 20:41:47] *** Images (sha256:1c5d2454981ca70ee345d88c7844efa112bc580a5bf87212c4f5c046318aeb83):
[express-server] [2022-01-03 20:41:47]       <image-1>
[express-server] [2022-01-03 20:41:47] Layer cache not found
[express-server] [2022-01-03 20:41:48] Adding cache layer 'heroku/nodejs-engine:nodejs'
[express-server] [2022-01-03 20:41:51] Adding cache layer 'heroku/nodejs-engine:toolbox'
[cron-jobs] [2022-01-03 20:41:13] ---> No file to start server
[cron-jobs] [2022-01-03 20:41:13] ---> either use 'docker run' to start container or add index.js or server.js
[cron-jobs] [2022-01-03 20:41:13] Project contains yarn.lock, using yarn
[cron-jobs] [2022-01-03 20:41:13] Installing node_modules using yarn (from yarn.lock)
[cron-jobs] [2022-01-03 20:41:14] Running yarn install
[cron-jobs] [2022-01-03 20:41:14] 
[cron-jobs] [2022-01-03 20:41:14] yarn install v1.22.17
[cron-jobs] [2022-01-03 20:41:14] [1/5] Validating package.json...
[cron-jobs] [2022-01-03 20:41:14] [2/5] Resolving packages...
[cron-jobs] [2022-01-03 20:41:14] [3/5] Fetching packages...
[cron-jobs] [2022-01-03 20:41:26] [4/5] Linking dependencies...
[cron-jobs] [2022-01-03 20:41:28] [5/5] Building fresh packages...
[cron-jobs] [2022-01-03 20:41:28] Done in 13.71s.
[cron-jobs] [2022-01-03 20:41:28] 
[cron-jobs] [2022-01-03 20:41:29] Running custom build command: node scripts/cronJobs.js
[cron-jobs] [2022-01-03 20:41:30] Running cron jobs...
[express-server] [2022-01-03 20:41:51] Adding cache layer 'heroku/nodejs-engine:yarn'
[express-server] [2022-01-03 20:41:54] Adding cache layer 'digitalocean/node:node_modules'
[express-server] [2022-01-03 20:41:57] => Uploaded the built image to the container registry
[express-server] [2022-01-03 20:41:57] => Build complete

I watched the log reach the last line quickly, and it has been stuck for hours. I have tried to Force Rebuild and Deploy, but it always ends up in the same situation above.

Is there anything we can do to find out if this deployment is stuck or just still going really slowly, and why this is happening?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

It’s been 3 days now. Any update on this?

If it couldn’t build on the company account, is there likely a permission issue related? Because if it all worked fine on your personal which you had absolute control over, then maybe there’s some kind of limitation of what’s possible on the company account, unless you have admin rights on the company account yet it still fails

  • Thanks for checking. The problem was I messed up in the settings and put the run command (which runs forever) in the build command, so the build could never complete. I have fixed the problem, and the app deploys just fine now.