jack0son / woke-dapp

Woke Network 🐦→🌐³ Monorepo containing dApp client, smart-contracts, and back-end services.
http://woke.network
2 stars 0 forks source link

Notifier subscription crashes on lost connection to infura node and does not recover. #53

Closed jack0son closed 4 years ago

jack0son commented 4 years ago

The failed WS connection also causes a large dump of logs from what appears to be the underlying unix socket.

Tue, 03 Mar 2020 06:06:54 GMT websocket:connection 3/3/2020, 6:06:44 AM - 1 - ||| Socket method called:  destroy
Subscription crash
{ type: 'subscribe' }
anfzr8-mtw05w-138x7hn-1wkufwo://woken_contract: The following error was raised when processing message { type: 'subscribe' }:
Error: CONNECTION ERROR: Couldn't connect to node on WS.
    at Object.InvalidConnection (/usr/src/app/@woke/lib/node_modules/web3-core-helpers/src/errors.js:35:16)
    at WebsocketProvider._timeout (/usr/src/app/@woke/lib/node_modules/web3-providers-ws/src/index.js:255:48)
    at W3CWebSocket.connection.onclose (/usr/src/app/@woke/lib/node_modules/web3-providers-ws/src/index.js:155:15)
    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/usr/src/app/@woke/lib/node_modules/yaeti/lib/EventTarget.js:107:17)
    at W3CWebSocket.onClose (/usr/src/app/@woke/lib/node_modules/@web3-js/websocket/lib/W3CWebSocket.js:228:10)
    at WebSocketConnection.<anonymous> (/usr/src/app/@woke/lib/node_modules/@web3-js/websocket/lib/W3CWebSocket.js:201:17)
    at WebSocketConnection.emit (events.js:198:13)
    at WebSocketConnection.handleSocketClose (/usr/src/app/@woke/lib/node_modules/@web3-js/websocket/lib/WebSocketConnection.js:389:14)
    at TLSSocket.emit (events.js:203:15)
    at TLSSocket.socket.emit (/usr/src/app/@woke/lib/node_modules/@web3-js/websocket/lib/WebSocketConnection.js:875:28)
    at _handle.close (net.js:607:12)
    at TCP.done (_tls_wrap.js:388:7)
Terminating faulted actor
anfzr8-mtw05w-138x7hn-1wkufwo://woken_contract/_sub-0-WokeToken-Tx/_watchdog: The following error was raised when processing message { type: 'perform',
  target:
   ActorReference {
     path:
      ActorPath { system: 'anfzr8-mtw05w-138x7hn-1wkufwo', parts: [Array] },
     name: '_sub-0-WokeToken-Tx',
     parent:
      ActorReference {
        path: [ActorPath],
        name: 'woken_contract',
        parent: [ActorSystemReference],
        system: [Object],
        type: 'actor' },
     system: { name: 'anfzr8-mtw05w-138x7hn-1wkufwo' },
     type: 'actor' },
  period: 300000,
  action: 'subscribe',
  args: undefined }:
Error: Query Timeout
    at Timeout.setTimeout [as _onTimeout] (/usr/src/app/@woke/bot/node_modules/nact/lib/actor.js:105:62)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
Terminating faulted actor