question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NDB Crashes with CharacterIdMap ran out of capacity!

See original GitHub issue

Environment:

  • ndb version: 1.1.3
  • Platform / OS version: macOS 10.14.5
  • Node.js version: 10.16 (also 12.6)

Problem

After opening NDB it crashes within a few seconds with a “CharacterIdMap ran out of capacity!” error.

Full stack trace

Error: Error: CharacterIdMap ran out of capacity!
Error: CharacterIdMap ran out of capacity!
    at Common.CharacterIdMap.toChar (https://domain/ndb.js:1:141718)
    at https://domain/ndb.js:3:160732
    at Array.map (<anonymous>)
    at Persistence.PathEncoder.encode (https://domain/ndb.js:3:160711)
    at Persistence.Automapping.FilePathIndex.addPath (https://domain/ndb.js:3:142687)
    at Persistence.Automapping._onUISourceCodeAdded (https://domain/ndb.js:3:137592)
    at https://domain/ndb.js:3:135752
    at Workspace.Workspace.dispatchEventToListeners (https://domain/ndb.js:1:91157)
    at Persistence.FileSystemWorkspaceBinding.FileSystem.addUISourceCode (https://domain/ndb.js:1:658103)
    at Persistence.FileSystemWorkspaceBinding.FileSystem._fileChanged (https://domain/ndb.js:3:134868)
    at Rpc.dispatchMessageLocally_ (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:423:16)
    at Rpc.routeMessage_ (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:371:12)
    at process.emit (events.js:198:13)
    at emit (internal/child_process.js:832:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/child_process.js:636:16) at Rpc.routeMessage_ (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:379:9) at page_.exposeFunction.data (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/carlo/lib/carlo.js:388:71) at Page._onBindingCalled (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Page.js:548:56) at CDPSession.Page.client.on.event (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Page.js:136:54) at CDPSession.emit (events.js:198:13) at CDPSession._onMessage (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Connection.js:200:12) at Connection._onMessage (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Connection.js:112:17) at PipeTransport._dispatch (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/puppeteer-core/lib/PipeTransport.js:59:22) at Socket.PipeTransport._eventListeners.helper.addEventListener.buffer (/Users/jamesernator/.nvm/versions/node/v10.16.0/lib/node_modules/ndb/node_modules/puppeteer-core/lib/PipeTransport.js:30:64) Emitted ‘error’ event at: at process.nextTick (internal/child_process.js:640:35) at process._tickCallback (internal/process/next_tick.js:61:11)

This is almost certainly due to the number of files in the repository (280687 or 100247 without node_modules/) as the issue does not occur in more narrow folders.

It’s still a pain though because if navigating to inner folders npm scripts cannot be used from NDB and it also changes the working directory breaking some of the scripts.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:10
  • Comments:8

github_iconTop GitHub Comments

4reactions
maddie-jcommented, Jul 1, 2020

Getting this issue too. Running ndb against a bundle in a big repo. Unfortunately, just putting ndb in a different folder isn’t a solution here as I’m using it as part of the debug mode for a tool I’m making and I don’t know where the people using the tool are going to have ndb installed.

Version of ndb: v1.1.5 (latest) OS: MacOS 10.15.5

Crashes when files load, ether loading in the sidebar or when certain files are already open in the editor, but haven’t been able to identify exact pattern.

Will crash when I try to load with sourcemaps, although it is possible that I’m loading them incorrectly. I can’t check though because ndb keeps crashing before any sourcemaps have the ability to load!

Sometimes crashes in two stages, with Error: CharacterIdMap ran out of capacity! appearing first without the window crashing, and then when the window is closed normally it’ll show Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed. Still haven’t figured out the pattern for when it outright crashes and when it throws but doesn’t crash.

If I just run ndb (no arguments) and leave the window open, it will eventually either err or completely crash.

1reaction
wmertenscommented, Feb 19, 2020

@Whoaa512 I keep my “global” installs in my home directory, under ~/bin/node_modules, and I add ~/bin/node_modules/.bin to my PATH environment variable.

That way

  • I keep all my state in my home directory for easy backups (I also have a ~/Applications)
  • the node_modules aren’t in the parent paths of development folders
  • I can use a clean path if I need it
Read more comments on GitHub >

github_iconTop Results From Across the Web

92434: NDB node keep crashing due to Backup.cpp bug
Description: Hello, Since I upgraded my cluster to the latest available version at the end of July, I get my data nodes randomly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found