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.

I started 5 clients and immediately I’m seeing this error:

libc++abi.dylib: terminating with uncaught exception of type Napi::Error
Abort trap: 6

Any suggestions?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:22 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
Banneretscommented, Oct 13, 2018

In version 5.1.0 I added pause() and resume() functions. You can use multiple clients, but not at the same time. Example:

const client1 = new Client(...)
const client2 = new Client(...)

;(async () => {
  await client1.connect()
  await client1.login(...)

  console.log('Client 1', await client1.invoke({ _: 'getMe' }))
  client1.pause()

  await client2.connect()
  await client2.login(...)

  console.log('Client 2', await client2.invoke({ _: 'getMe' }))
  client2.pause()

  client1.resume()
  console.log('Client 1 again', await client1.invoke({ _: 'getMe' }))
})()
1reaction
Banneretscommented, Apr 1, 2019

@denisakov You need tdl v6 (npm install tdl@6.0.0-rc.2). tdl-tdlib-addon is mostly just a proof-of-concept, and it most likely won’t work from npm. You can copy it from the repository into your app.

Also there is no big profit in using it, as it limited to libuv threadpool (better implementation could create a thread per client without using libuv threadpool). You can just create a process for each client instance (described above in the issue). Otherwise someone need to write tdlib-client-actor<->node.js binding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

napi::NapiError - Rust - Docs.rs
API documentation for the Rust `NapiError` struct in crate `napi`.
Read more >
Error - nodejs/node-addon-api - GitHub
The Napi::Error class is a representation of the JavaScript Error object that is thrown when runtime errors occur. The Error object can also...
Read more >
c++ - Node API throws it's own error message instead of own ...
Napi::Error ::New(env, "Example exception").ThrowAsJavaScriptException(); return;. Calling ThrowAsJavaScriptException() will not throw a C++ ...
Read more >
Napi error IV 114 - YouTube
Napi error IV 114. 54 views54 views. Apr 29, 2018. 0. Dislike. Share. Save. putu saix. putu saix. 10 subscribers. Subscribe. Show less...
Read more >
Internal Server Error...mkdir /var/lib/glance: file exists
APIError(e, response, explanation=explanation)\nAPIError: 500 Server Error: Internal Server Error ("{"message":"mkdir /var/lib/glance: file ...
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