mesg-foundation / engine

Build apps or autonomous workflows with reusable, shareable integrations connecting any service, app, blockchain or decentralized network.
https://mesg.com/
Apache License 2.0
130 stars 13 forks source link

Service marketplace connection drop #917

Closed antho1404 closed 5 years ago

antho1404 commented 5 years ago

I didn't find a specific way to reproduce this yet, maybe when my computer goes from sleep to awake but it happened many time.

Once this error happens, then I have it non-stop and the marketplace service becomes useless

service | catch polling Error: Invalid JSON RPC response: ""
service |     at Object.InvalidResponse (/app/node_modules/web3-core-helpers/src/errors.js:42:16)
service |     at XMLHttpRequest.request.onreadystatechange (/app/node_modules/web3-providers-http/src/index.js:92:32)
service |     at XMLHttpRequestEventTarget.dispatchEvent (/app/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
service |     at XMLHttpRequest._setReadyState (/app/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
service |     at XMLHttpRequest._onHttpRequestError (/app/node_modules/xhr2-cookies/dist/xml-http-request.js:349:14)
service |     at ClientRequest.<anonymous> (/app/node_modules/xhr2-cookies/dist/xml-http-request.js:252:61)
service |     at ClientRequest.emit (events.js:182:13)
service |     at TLSSocket.socketErrorListener (_http_client.js:391:9)
service |     at TLSSocket.emit (events.js:182:13)
service |     at emitErrorNT (internal/streams/destroy.js:82:8)
service |     at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
service |     at process._tickCallback (internal/process/next_tick.js:63:19)
antho1404 commented 5 years ago

even my calls are rejected, this is not only the polling.

service | error in preparePublishServiceVersion Error: Invalid JSON RPC response: ""
service |     at Object.InvalidResponse (/app/node_modules/web3-core-helpers/src/errors.js:42:16)
service |     at XMLHttpRequest.request.onreadystatechange (/app/node_modules/web3-providers-http/src/index.js:92:32)
antho1404 commented 5 years ago

Might be related to https://github.com/INFURA/infura/issues/58 Infura is displaying some information

Screen Shot 2019-04-29 at 18 38 27

The percentage is really close to 100% but without any explanation. The problem is still unclear but we might have some solution to at least improve it if we don't find the source of the problem:

NicolasMahe commented 5 years ago

I let the core runs on my macbook since yesterday with multiple change of location (so no more wifi). This morning, the logs of the marketplace was showing the Error: Invalid JSON RPC response: "", I tried to execute the task getService but also get the Error: Invalid JSON RPC response: "", tried a second times and it returns the correct result 👍 The listener of new block also reconnect just after the second attempt to execute a task.

I think I was able to reproduce the problem in a shorter time: