Uncaught TypeError: Cannot read property 'setStateIdle' of null
See original GitHub issueI’m getting the following error in Chrome 66 when accessing a pad in our instance (running 1.6.6). Meanwhile, access with Firefox 60 works without problems. Any tips?
An error occurred
The error was reported with the following id: 'qZF4pJdMtrdhNgDJlfp0'
Please press and hold Ctrl and press F5 to reload this page, if the problem persists please send this error message to your webmaster:
'ErrorId: qZF4pJdMtrdhNgDJlfp0
URL: https://pad.example.com/padname
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
Uncaught TypeError: Cannot read property 'setStateIdle' of null in https://pad.example.com/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define at line 3'
It seems to stem from this code section, where pad.collabClient
seems to be null:
socket.on("error", function(e) {
pad.collabClient.setStateIdle(),
pad.collabClient.setIsPendingRevision(!0)
});
When pausing with a breakpoint, the error e
is undefined.
According to the call stack, the error occurred in this call:
io.connect(n, {
path: exports.baseURL + "socket.io",
resource: a,
reconnectionAttempts: 5,
reconnection: !0,
reconnectionDelay: 1e3,
reconnectionDelayMax: 5e3
})
P.S.: It’s actually suprising that pad.collabClient
is already used in the handshake()
, while it is only initialized in _afterHandshake()
.
P.P.S.: Troubleshooting information as follows:
Etherpad version
Version number: 1.6.6
Git sha: 7e69a82
Installed plugins
ep_etherpad-lite
Installed parts
ep_etherpad-lite/swagger
ep_etherpad-lite/adminsettings
ep_etherpad-lite/adminplugins
ep_etherpad-lite/admin
ep_etherpad-lite/tests
ep_etherpad-lite/socketio
ep_etherpad-lite/errorhandling
ep_etherpad-lite/importexport
ep_etherpad-lite/apicalls
ep_etherpad-lite/webaccess
ep_etherpad-lite/padreadonly
ep_etherpad-lite/padurlsanitize
ep_etherpad-lite/specialpages
ep_etherpad-lite/i18n
ep_etherpad-lite/static
ep_etherpad-lite/express
Installed hooks
Server side hooks
expressCreateServer
ep_etherpad-lite/node/hooks/express/swagger:expressCreateServer from ep_etherpad-lite/swagger
expressCreateServer
ep_etherpad-lite/node/hooks/express/adminsettings:expressCreateServer from ep_etherpad-lite/adminsettings
expressCreateServer
ep_etherpad-lite/node/hooks/express/adminplugins:expressCreateServer from ep_etherpad-lite/adminplugins
expressCreateServer
ep_etherpad-lite/node/hooks/express/admin:expressCreateServer from ep_etherpad-lite/admin
expressCreateServer
ep_etherpad-lite/node/hooks/express/tests:expressCreateServer from ep_etherpad-lite/tests
expressCreateServer
ep_etherpad-lite/node/hooks/express/socketio:expressCreateServer from ep_etherpad-lite/socketio
expressCreateServer
ep_etherpad-lite/node/hooks/express/errorhandling:expressCreateServer from ep_etherpad-lite/errorhandling
expressCreateServer
ep_etherpad-lite/node/hooks/express/importexport:expressCreateServer from ep_etherpad-lite/importexport
expressCreateServer
ep_etherpad-lite/node/hooks/express/apicalls:expressCreateServer from ep_etherpad-lite/apicalls
expressCreateServer
ep_etherpad-lite/node/hooks/express/padreadonly:expressCreateServer from ep_etherpad-lite/padreadonly
expressCreateServer
ep_etherpad-lite/node/hooks/express/padurlsanitize:expressCreateServer from ep_etherpad-lite/padurlsanitize
expressCreateServer
ep_etherpad-lite/node/hooks/express/specialpages:expressCreateServer from ep_etherpad-lite/specialpages
expressCreateServer
ep_etherpad-lite/node/hooks/i18n:expressCreateServer from ep_etherpad-lite/i18n
expressCreateServer
ep_etherpad-lite/node/hooks/express/static:expressCreateServer from ep_etherpad-lite/static
socketio
ep_etherpad-lite/node/hooks/express/adminsettings:socketio from ep_etherpad-lite/adminsettings
socketio
ep_etherpad-lite/node/hooks/express/adminplugins:socketio from ep_etherpad-lite/adminplugins
expressConfigure
ep_etherpad-lite/node/hooks/express/webaccess:expressConfigure from ep_etherpad-lite/webaccess
createServer
ep_etherpad-lite/node/hooks/express:createServer from ep_etherpad-lite/express
restartServer
ep_etherpad-lite/node/hooks/express:restartServer from ep_etherpad-lite/express
Client side hooks
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:34 (19 by maintainers)
Top Results From Across the Web
Etherpad - Cannot read property 'setStateIdle' of null
Hello,. once again I have a quick workaround for issues we've been noticing recently with Google Chrome. Google has changed their cookie policy...
Read more >Uncaught TypeError: Cannot read property of null - iDiallo
This will result in Uncaught TypeError: Cannot read property 'value' of null . The reason will be that the element with id input...
Read more >Embedding the board.net boards stopped working on Chrome
... like Gecko) Chrome/84.0.4147.105 Safari/537.36 Uncaught TypeError: Cannot read property 'setStateIdle' of null in ...
Read more >TypeError: Cannot read property state of null - Stack Overflow
The first time the component renders, this.state.financials is null , because you are initializing it with null : state = { financials: null...
Read more >uncaught typeerror: cannot read properties of null ... - You.com
Uncaught TypeError : Cannot read properties of null (reading 'querySelector'). At this step the tags input is showing NULL. It does not contain...
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
Good news, @fralix. Good documentation is precious.
I leave the issue open, since I continue being curious about the “phantom” initialization uncovered by @caugner.
I am starting to think about how to improve the codebase without rewriting it (more tests, linters, static analyzers, maybe even gradually migrating to TypeScript…), and this sort of issues interest me a lot.
This error is reproduced on different instances of the etherpads in the android and chrome. Tested on my own server and on https://etherpad.wikimedia.org, https://video.etherpad.com.
Steps to reproduce