etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

socket.io - handshake error Bad session

Open keyndark opened this issue 13 years ago • 33 comments

Hi! I got error when access exists or new pad after update node.js and etherpad-lite from repo. I have sessionKey with value in settings.json.

[2013-04-14 12:07:11.591] [WARN] socket.io - handshake error Bad session / session has expired

$ node -v
v0.10.4

$ git pull
Already up-to-date.

$ ./bin/run.sh
Ensure that all dependencies are up to date...  If this is the first time you have run Etherpad please be patient.
Ensure jQuery is downloaded and up to date...
Clear minfified cache...
ensure custom css/js files are created...
start...
[2013-04-14 12:06:34.527] [INFO] console - Installed plugins: ep_etherpad-lite
[2013-04-14 12:06:34.551] [INFO] console - Your Etherpad Lite git version is 08b54ef
[2013-04-14 12:06:34.552] [INFO] console - Report bugs at https://github.com/ether/etherpad-lite/issues
[2013-04-14 12:06:34.586] [INFO] console -    info  - 'socket.io started'
[2013-04-14 12:06:34.622] [INFO] console - You can access your Etherpad-Lite instance at http://0.0.0.0:9001/
[2013-04-14 12:06:34.622] [INFO] console - The plugin admin page is at http://0.0.0.0:9001/admin/plugins
[2013-04-14 12:06:40.048] [INFO] ueberDB - Flushed 1 values
[2013-04-14 12:06:40.812] [INFO] ueberDB - Flushed 1 values
[2013-04-14 12:06:42.512] [INFO] ueberDB - Flushed 1 values
[2013-04-14 12:06:42.712] [INFO] ueberDB - Flushed 2 values
[2013-04-14 12:06:42.832] [WARN] socket.io - handshake error Bad session / session has expired

keyndark avatar Apr 14 '13 09:04 keyndark

That shouldn't matter, does it affect user experience at all? Sessions are allowed to expire.

JohnMcLear avatar Apr 14 '13 11:04 JohnMcLear

Same here on Ubuntu 12.04 w/ nodejs v0.10.4/0.8.9.

0ip avatar Apr 14 '13 14:04 0ip

Fedora 18 // nodejs v0.10.4 // chrome Version 26.0.14.10.63 Etherpad Lite git version is 08b54ef

same thing

Etherpad stop's at loading text on screen.

rddaz2013 avatar Apr 14 '13 16:04 rddaz2013

Freshly setup nvm (tried node 0.8.23, 0.10.4) and etherpad-lite, running into same problem. I can't get past a loading screen in the browser.

Are the Travis tests misreporting success?

rgbkrk avatar Apr 15 '13 02:04 rgbkrk

yup, same problem here.

OSX // nodejs v 0.10.4

JackPo avatar Apr 15 '13 06:04 JackPo

can also confirm this problem with nodejs 0.8.9 and ubuntu 12.04 with a fresh installed system, stuck on loading screen

Djcd avatar Apr 15 '13 08:04 Djcd

Same problem OS X nodejs v0.10.4

unshorn avatar Apr 15 '13 08:04 unshorn

Struggled with this too after updating on ubuntu 10.04 Commenting out // if (err || !session) return accept('Bad session / session has expired', false); in src/node/hooks/express/socketio.js makes it load again. Admin-Panel is still not functional after this.

interbr avatar Apr 15 '13 09:04 interbr

Fixed in develop, releasing to Master now. Really could do with help releasing if anyone has some spare time to create packages, do blog post etc.. I need to run..

JohnMcLear avatar Apr 15 '13 11:04 JohnMcLear

I am still having this problem, my system is CentOS 6.4, node.js 0.10.4, I am not sure how to view current version, but I have done git pull origin and git show lists: commit 2c8699506d3c1a46a9fd1afae8ec1dcb69811905 Author: John McLear [email protected] Date: Mon Apr 15 12:21:10 2013 +0100

push express back as it breaks sessions

svrkispm avatar Apr 15 '13 11:04 svrkispm

Can anyone else please test?

What does src/package.json show for express?

JohnMcLear avatar Apr 15 '13 11:04 JohnMcLear

Hi John,

deleted the complete etherpad folder and cloned it again. Your commit fixed the error on my installation (Ubuntu 12.04 and Nodejs 0.8.9), the package.json shows
"express" : "3.1.0", therefore it contains your fix ;)

Thank you

Djcd avatar Apr 15 '13 11:04 Djcd

it works now for me!

JackPo avatar Apr 15 '13 12:04 JackPo

now a second problem shows up. It doesn't happen when one user is connected, but when a second user is connected to the same pad, etherpad instantly crashes:

[2013-04-15 08:26:28.913] [INFO] access - [CREATE] Pad "bronx": Client llmovxoCOXAmJbqXqNMx with IP "160.39.240.27" created the pad [2013-04-15 08:26:28.916] [ERROR] console - Error: Not sending the same event twice... at Object.exports.prepareForWire (/opt/etherpad-lite/src/static/js/Changeset.js:1671:11) at /opt/etherpad-lite/src/node/handler/PadMessageHandler.js:991:40 at /opt/etherpad-lite/src/node_modules/async/lib/async.js:486:21 at /opt/etherpad-lite/src/node_modules/async/lib/async.js:185:13 at iterate (/opt/etherpad-lite/src/node_modules/async/lib/async.js:108:13) at /opt/etherpad-lite/src/node_modules/async/lib/async.js:119:25 at /opt/etherpad-lite/src/node_modules/async/lib/async.js:187:17 at /opt/etherpad-lite/src/node_modules/async/lib/async.js:491:34 at /opt/etherpad-lite/src/node_modules/async/lib/async.js:190:13 at /opt/etherpad-lite/src/node_modules/async/lib/async.js:94:25 [2013-04-15 08:26:28.935] [INFO] console - graceful shutdown... [2013-04-15 08:26:28.947] [INFO] ueberDB - Flushed 1 values [2013-04-15 08:26:29.049] [INFO] console - db sucessfully closed.

JackPo avatar Apr 15 '13 12:04 JackPo

Thanks, now can access pads, but update page with opened pad got this error:

[2013-04-15 15:18:17.332] [INFO] socket.io - handshake authorized 'XgbW4vQo9rGQqNtXoXgD'
[2013-04-15 15:18:17.350] [INFO] ueberDB - Flushed 1 values
[2013-04-15 15:18:17.451] [INFO] ueberDB - Flushed 1 values
[2013-04-15 15:18:17.468] [INFO] access - [ENTER] Pad "test": Client XgbW4vQo9rGQqNtXoXgD with IP "127.0.0.1" entered the pad
[2013-04-15 15:18:17.470] [ERROR] console - Error: Not sending the same event twice...
    at Object.exports.prepareForWire (/usr/share/etherpad-lite/src/static/js/Changeset.js:1671:11)
    at /usr/share/etherpad-lite/src/node/handler/PadMessageHandler.js:991:40
    at /usr/share/etherpad-lite/src/node_modules/async/lib/async.js:486:21
    at /usr/share/etherpad-lite/src/node_modules/async/lib/async.js:185:13
    at iterate (/usr/share/etherpad-lite/src/node_modules/async/lib/async.js:108:13)
    at /usr/share/etherpad-lite/src/node_modules/async/lib/async.js:119:25
    at /usr/share/etherpad-lite/src/node_modules/async/lib/async.js:187:17
    at /usr/share/etherpad-lite/src/node_modules/async/lib/async.js:491:34
    at /usr/share/etherpad-lite/src/node_modules/async/lib/async.js:190:13
    at /usr/share/etherpad-lite/src/node_modules/async/lib/async.js:94:25
[2013-04-15 15:18:17.470] [INFO] console - graceful shutdown...
[2013-04-15 15:18:17.551] [INFO] ueberDB - Flushed 1 values
[2013-04-15 15:18:17.651] [INFO] console - db sucessfully closed.

Chrome 26.0.1410.64 m

An error occured
The error was reported with the following id: 'f91UD3vj6wjX5JZyCZGV'

Please send this error message to us:
'ErrorId: f91UD3vj6wjX5JZyCZGV
URL: http://mypad/p/test
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Uncaught TypeError: Cannot call method 'setChannelState' of null in http://mypad/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define at line 3'

Opera 12.15.1748

An error occured
The error was reported with the following id: 'Hj9fRINYGTYYkl3NsE9r'

Please send this error message to us: 
'ErrorId: Hj9fRINYGTYYkl3NsE9r
URL: http://mypad/p/left4dead2
UserAgent: Opera/9.80 (Windows NT 6.1; Win64; x64) Presto/2.12.388 Version/12.15
Uncaught exception: TypeError: Cannot convert 'pad.collabClient' to object in http://mypad/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define at line 3'

keyndark avatar Apr 15 '13 12:04 keyndark

I have deleted whole folder, cloned from git again and now it works fine

svrkispm avatar Apr 15 '13 12:04 svrkispm

I pull down a new clone from git and it doesn't change the error above.

JackPo avatar Apr 15 '13 12:04 JackPo

hrm, crap, will test that.

JohnMcLear avatar Apr 15 '13 13:04 JohnMcLear

Insert expletive here.. Fixing and releasing.. GAH

JohnMcLear avatar Apr 15 '13 13:04 JohnMcLear

946289c221 broke it, right? ;)

0ip avatar Apr 15 '13 13:04 0ip