App Platform: unable to retrieve container logs

Posted November 11, 2020 1.9k views
Node.jsTypeScriptDigitalOcean App Platform

I’m trying to migrate a typescript node.js app from Heroku to the App Platform.

It looks like the build phase completes correctly. But it seems that there is an error during the deploy phase.
Unfortunately when I try to access the deploy logs, I get this error:

lindale-xxx unable to retrieve container logs for containerd://2ef...3f8

I get this error both from the dashboard, and from doctl.

Also, while deployment is running, the live logs work fine up until the line => Build complete. Then nothing is appended to the live logs anymore.

Is this expected when deploy fails?
If not, is there another way to access the logs?


edited by MattIPv4

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
2 answers

Hi @Lindale,

Sorry about that. This is a known issue that we’re currently working on addressing. Under certain conditions where the app container crashes very quickly after starting, you may receive the unable to retrieve container logs error message. You might still be able to retrieve the logs using doctl by passing the --type RUN and --follow flags to the doctl apps logs command.

If you open a support ticket we can look at your app specifically and may be able to retrieve the logs for you until the issue is fixed. I hope that helps!

  • Thanks for your reply.

    If I do that, I either get a timeout error if the deploy is already finished, or a 400 error if it’s still running, with this message: cannot get running logs from failed deployment

    I contacted support, and I’m waiting for a reply. So far, they’ve not been able to fix the issue.

  • On some tries, the deploy logs do seem to exist (not sure why…). But I’m not sure if it’s complete or if I can only see a few lines at the end:

      throw err;
    Error: Cannot find module '/workspace/build/start.js'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
        at Function.Module._load (internal/modules/cjs/loader.js:864:27)
        at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
        at internal/main/run_main_module.js:18:47 {
      code: 'MODULE_NOT_FOUND',
      requireStack: []

    Any idea what I might be doing wrong here?

    • ​The outDir in tsconfig.json is ./build
    • The build command is tsc
    • And the run command is node build/start.js

    This works fine on Heroku​. Should I use different paths on the App Platform? What is the “workspace” directory? Is there any documentation about it (I can’t seem to find any)?


    • /workspace is the path that your git repo is cloned to. It is also the working directory for the build and runtime environments. Based on what you’ve described it should work. If you look at the deployment’s build logs, do you see the output of the tsc command? And does it look proper?

I am getting the same errors here, its really frustrating