#Error when deployed on Digital Ocean App Platform

13 messages · Page 1 of 1 (latest)

formal niche
#

I'm using this package with RemoteAuth strategy connected to Mongodb Atlas.

It works great locally and when deployed on Digital Ocean Droplet.

But when I try to run it on Digital Ocean App Platform I get:

Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (982053).

How this can be fixed?

clever echo
#

It’s config error, check you got chrome browser installed on your system and use headless mode

formal niche
#

My configuration is:

    client = new Client({
      puppeteer: {
        headless: true,
        args: ['--no-sandbox']
      },
      authStrategy: new RemoteAuth({
        store: store,
        backupSyncIntervalMs: 60000,
        dataPath: './temp/'
      })
    });

How do I install chrome using npm?

formal niche
fading tendon
#

In DigitalOcean u need to use dockerfile and install all the dependencies

formal niche
fading tendon
#

when creating your application, there is a point where it asks u if u want to use a dockerfile or not, u should enable that so that it is not ignored on the build process

formal niche
#

Ah damn! Thanks

formal niche
formal niche
spice sapphire
#

Try to install al of this dependencies,
Puppeter need it to run correctly.

gconf-service
libasound2
libatk1.0-0
libatk-bridge2.0-0
libc6
libcairo2
libcups2
libdbus-1-3
libexpat1
libfontconfig1
libgcc1
libgconf-2-4
libgdk-pixbuf2.0-0
libglib2.0-0
libgtk-3-0
libnspr4
libpango-1.0-0
libpangocairo-1.0-0
libstdc++6
libx11-6
libx11-xcb1
libxcb1
libxcomposite1
libxcursor1
libxdamage1
libxext6
libxfixes3
libxi6
libxrandr2
libxrender1
libxss1
libxtst6
ca-certificates
fonts-liberation
libappindicator1
libnss3
lsb-release
xdg-utils
wget

formal niche
#

Now it works but I can never get the state with await client.getState()

#

What I notice is that the /tempfolder is written but the .wwebjs_cache file is not