Coder Social home page Coder Social logo

ndb wont start about ndb HOT 11 CLOSED

googlechromelabs avatar googlechromelabs commented on May 13, 2024
ndb wont start

from ndb.

Comments (11)

b0o avatar b0o commented on May 13, 2024 5

@ak239 I checked the troubleshooting link you provided and figured out that this seems to be a sandboxing issue with Puppeteer.

Details Modifying the Puppeteer launch arguments here:

ndb/ndb.js

Lines 35 to 38 in 97d893c

args: [
'--app=data:text/html,<style>html{background:#242424;}</style>',
'--enable-features=NetworkService'
]

To include --no-sandbox fixed the issue for me:

diff --git a/ndb.js b/ndb.js
index 13fa599..6947312 100755
--- a/ndb.js
+++ b/ndb.js
@@ -34,7 +34,8 @@ updateNotifier({pkg: require('./package.json')}).notify();
     userDataDir: await setupUserDataDir(configDir),
     args: [
       '--app=data:text/html,<style>html{background:#242424;}</style>',
-      '--enable-features=NetworkService'
+      '--enable-features=NetworkService',
+      '--no-sandbox',
     ]
   });

Enabling kernel.unprivileged_userns_clone fixed this for me (via puppeteer/puppeteer#290 (comment)):

sudo sysctl -w kernel.unprivileged_userns_clone=1

from ndb.

alexkozy avatar alexkozy commented on May 13, 2024 3

Thanks a lot! I created PR that added --no-sandbox flag by default. Sandboxing is not as useful as it is inside Chromium in our environment so we can switch it off for now.

from ndb.

gerbus avatar gerbus commented on May 13, 2024 3

After installing the above suggested dependencies, I get:

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at Pipe.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

from ndb.

FedericoBiccheddu avatar FedericoBiccheddu commented on May 13, 2024 2

Having the same issue in a docker environment.

node: 10.7.0
ndb: 1.0.6
puppeteer: 1.6.0 (installed as a devDependency too)

This is the output:

ndb nodemon -L -r ts-node/register 'src/index.ts'
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.afterWrite [as oncomplete] (net.js:836:14)
Emitted 'error' event at:
    at onwriteError (_stream_writable.js:431:12)
    at onwrite (_stream_writable.js:456:5)
    at _destroy (internal/streams/destroy.js:40:7)
    at Socket._destroy (net.js:606:3)
    at Socket.destroy (internal/streams/destroy.js:32:8)
    at WriteWrap.afterWrite [as oncomplete] (net.js:838:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there any possibile solution?

Thank you 😄

from ndb.

b0o avatar b0o commented on May 13, 2024

Same exact issue here on Arch Linux (Linux 4.17.8-1-ARCH x86_64 GNU/Linux).

I tried Node 10.0.7 and 9.11.2 as well as ndb 1.0.0, 1.0.1, 1.0.2, and 1.0.3.

from ndb.

alexkozy avatar alexkozy commented on May 13, 2024

Ndb uses puppeteer. Most likely this issue is related to pptr issue: puppeteer/puppeteer#290. Could you please try to install all required dependencies and try to launch ndb again?

from ndb.

alexkozy avatar alexkozy commented on May 13, 2024

fix is available in 1.0.4 and already published to npm 😄

from ndb.

abalmos avatar abalmos commented on May 13, 2024

@ak239 thanks, it is working now

from ndb.

colbin8r avatar colbin8r commented on May 13, 2024

Having the same issue as @FedericoBiccheddu with
Node 10.8.0
npm 6.2.0
ndb 1.0.19

from ndb.

alexkozy avatar alexkozy commented on May 13, 2024

Could you try to install all dependencies mentioned in puppeteer thread?

RUN apt-get update && \
apt-get install -yq gconf-service libasound2 libatk1.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```

from ndb.

gerbus avatar gerbus commented on May 13, 2024

Having the same issue as @FedericoBiccheddu with
Node 10.10.0
npm 6.4.1
ndb 1.0.26
Ubuntu 14.04

from ndb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.