Report this

What is the reason for this report?

Is there a way to know why a job is failing ?

Posted on April 15, 2021
Sylvain Corsini

By Sylvain Corsini

Lead Dev at Adfinitas

I just have this from a job which is continuously failing: Missing dependencies, incompatible versions, incorrect environment variables or app bugs.

Yeah, that’s great but why ? I don’t have anything more and I can’t debug this because App Platform don’t give logs for jobs.

Is there a way I could know what happenings there ?

I spend my entire afternoon and I still don’t know why I got this. This is running perfectly fine locally…

Here’s my job:

jobs:
  - name: user-migrations
    environment_slug: node-js
    run_command: npx nx run user-service:migration-run
    kind: PRE_DEPLOY
    github:
      branch: main
      deploy_on_push: true
      repo: adfinitas-app/doap-test
    instance_count: 1
    instance_size_slug: basic-xxs
    envs:
      - key: POSTGRES_HOSTNAME
        scope: RUN_TIME
        value: ${user-db.HOSTNAME}
      - key: POSTGRES_PORT
        scope: RUN_TIME
        value: ${user-db.PORT}
      - key: POSTGRES_USERNAME
        scope: RUN_TIME
        value: ${user-db.USERNAME}
      - key: POSTGRES_PASSWORD
        scope: RUN_TIME
        value: ${user-db.PASSWORD}
      - key: POSTGRES_DATABASE
        scope: RUN_TIME
        value: ${user-db.DATABASE}

npx nx run user-service:migration-run does typeorm migration:run under the hood. Does something in envs looks bad ? I tried with run_command: "true" and it works well, meaning it’s surely my command which is failing.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi @scorsi,

You can view the job logs by navigating to your app -> the Deployments tab -> click the Details link for the failed deployment -> select the job under “Deploy logs”

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.