this.pingIntervalTimer.refresh is not a function
See original GitHub issueDescribe the bug socket.js:108 Uncaught TypeError: this.pingIntervalTimer.refresh is not a function at Socket.onPacket (socket.js:108)
To Reproduce engine.io: 6.1.0 engine.io-client: 6.1.1 socket.io: 4.4.0 socket.io-client: 4.4.0
Platform:
- OS: windows 10
Additional context
Adding
console.log(typeof this.pingIntervalTimer)
just before line 108 shows that it’s a number, not a Timer.
this.pingIntervalTime.refresh()
was added here it seems:
https://github.com/socketio/engine.io/commit/37474c7e67be7c5f25f9ca2d4ea99f3a256bd2de
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
this.pingIntervalTimer.refresh is not a function · Issue #4390 ...
Describe the bug There seems to be some dependency-issues: /app/node_modules/browser-sync/node_modules/engine.io/build/socket.js:109 this.
Read more >socket.io TypeError: socket.on is not a function - Stack Overflow
To fix that you can just add socket to the arguments on your callback function. Like this: io.on('connection',function(socket) { console.
Read more >Introduction to Sockets.IO in Node.js - GeeksforGeeks
Earlier, websites used to reload every-time a resource was requested. ... the client to know when the other one is not responding anymore....
Read more >"TypeError: require(...).listen is not a function" in socket.io
In this video I have shown "TypeError: require(...).listen is not a function "that you might face with connecting to ...
Read more >socket.io - npm
IO client will not be able to connect to a WebSocket server (like ... the Server to socket.io , and not the express...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it would be best to explicitly import
setTimeout
andclearTimeout
from Node’s timers module, by adding this in lib/socket.ts:import { setTimeout, clearTimeout } from "timers";
That would make sure compilers don’t mistaken those functions for javascript timers, of which setTimeout doesn’t have arefresh
function. Hence the error in my scenario.I can also make a PR for that tomorrow if you like.
Closed by https://github.com/socketio/engine.io/pull/632.