You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a problem with the automatic reconnection of the WebSocket client on the NodeJS 22 version.
constprovider=newWsProvider('ws://127.0.0.1:9944');constapi=awaitApiPromise.create({ provider });api.on('disconnected',()=>{console.log(`Disconnected`);});api.on('connected',()=>{console.log(`Connected`);});api.on('error',(err)=>{// When the API is disconnected, it will emit an error eventconsole.error(err);// ErrorEvent {// type: 'error',// defaultPrevented: false,// cancelable: false,// timeStamp: 9766.533212// }console.error(err.message);// Received network error or non-101 status code.});
When I stop the blockchain node, I receive an error event in the “error” listener.
When the node is restarted, the WebSocket client is never reconnected.
Versions :
NodeJS version : 22.12
"@polkadot/api": "^15.1.1"
The same code downgraded to NodeJS version 20.18.2 does not trigger this issue.
There seems to be a problem with the automatic reconnection of the WebSocket client on the NodeJS 22 version.
When I stop the blockchain node, I receive an error event in the “error” listener.
When the node is restarted, the WebSocket client is never reconnected.
Versions :
NodeJS version : 22.12
"@polkadot/api": "^15.1.1"
The same code downgraded to NodeJS version 20.18.2 does not trigger this issue.
I found similar issues with other packages :
Has anyone experienced this bug ?
Thanks for your answers
The text was updated successfully, but these errors were encountered: