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.

Error when reconnecting to server & Attempting to send messages

See original GitHub issue

We’ve encountered a conditional bug where the NATS client will attempt to send messages, despite no longer being connected to the server. In the code it’s not checking to see if the socket is still attached or not and casuses an error. The side affect appears to prevent the application from completing a reconnect as well. Once completely restarted it can once again reconnect to the server.

You can see our code usage here: https://github.com/nodecraft/appframe-nats.js

[14:34:40] [LOG]: [NATS] Lost connection from server. Reconnecting... at appframe._log (~/node_modules/appframe/appframe.js:882:15)
[14:34:40] [ERROR]: Cannot read property 'resume' of null
TypeError: Cannot read property 'resume' of null
    at Client.processInbound (~/node_modules/nats/lib/nats.js:761:16)
    at Socket.<anonymous> (~/node_modules/nats/lib/nats.js:468:12)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:547:20) at appframe.debug (~/node_modules/appframe/appframe.js:864:15)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:29 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
aricartcommented, May 11, 2017

I don’t want minecraft severs to fail. 😃

0reactions
Cherrycommented, May 17, 2017

Ah, perfect. Thanks @aricart! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix problems sending, receiving or connecting to Messages
If you get a notification that your computer can't connect to Messages, try these steps: On your phone, turn your Wi-Fi off and...
Read more >
Unable to send email - Error with connecting server
The possible reasons are: the server is down/offline, the port number is incorrect (the server is not listening on that port), or a...
Read more >
"Cannot connect the computer to the server" error message ...
Cannot connect the computer to the server because either another software installation is in progress or, the computer has a restart pending.
Read more >
Unable Send Email due to errors 'Cannot connect to SMTP ...
Solution. The 4.4. 1 SMTP Status appears when no answer is received from the host or when the connection is lost. This could...
Read more >
RTC Connecting Discord – How to Fix the Server Error
But sometimes, when you're trying to establish a voice call connection, you'll get an error that says “RTC Connecting Discord”. This message ...
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