Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] prevent crash when no user id is found #1349

Merged

Conversation

sanderegg
Copy link
Member

@sanderegg sanderegg commented Mar 5, 2020

What do these changes do?

  • prevent following assertion from happening in webserver and logs error instead as this should not be hapenning
message
ERROR:engineio.server:disconnect async handler error
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/engineio/asyncio_server.py", line 410, in _trigger_event
    ret = await self.handlers[event](*args)
  File "/usr/local/lib/python3.6/site-packages/socketio/asyncio_server.py", line 518, in _handle_eio_disconnect
    await self._handle_disconnect(sid, '/')
  File "/usr/local/lib/python3.6/site-packages/socketio/asyncio_server.py", line 423, in _handle_disconnect
    await self._trigger_event('disconnect', '/', sid)
  File "/usr/local/lib/python3.6/site-packages/socketio/asyncio_server.py", line 466, in _trigger_event
    ret = await self.handlers[namespace][event](*args)
  File "/usr/local/lib/python3.6/site-packages/simcore_service_webserver/socketio/handlers_utils.py", line 18, in wrapped
    return await func(*args, **kwargs, app=app)
  File "/usr/local/lib/python3.6/site-packages/simcore_service_webserver/socketio/handlers.py", line 109, in disconnect
    user_id = socketio_session["user_id"]
KeyError: 'user_id'

Related issue number

How to test

Checklist

  • Did you change any service's API? Then make sure to bundle document and upgrade version (make openapi-specs, git commit ... and then make version-*)
  • Unit tests for the changes exist
  • Runs in the swarm
  • Documentation reflects the changes
  • New module? Add your github username to .github/CODEOWNERS

@sanderegg sanderegg added this to the Mithos milestone Mar 5, 2020
@sanderegg sanderegg requested review from pcrespov and mguidon March 5, 2020 20:32
@sanderegg sanderegg self-assigned this Mar 5, 2020
@codecov
Copy link

codecov bot commented Mar 5, 2020

Codecov Report

Merging #1349 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1349      +/-   ##
==========================================
- Coverage   72.75%   72.73%   -0.02%     
==========================================
  Files         201      201              
  Lines        8356     8358       +2     
  Branches      938      939       +1     
==========================================
  Hits         6079     6079              
- Misses       2004     2005       +1     
- Partials      273      274       +1     
Flag Coverage Δ
#integrationtests 57.82% <75.00%> (-0.03%) ⬇️
#unittests 67.06% <75.00%> (-0.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 118e87b...b759be7. Read the comment docs.

@pcrespov pcrespov changed the title prevent crash when no user id is found [bugfix] prevent crash when no user id is found Mar 5, 2020
@sanderegg sanderegg requested review from odeimaiz and mguidon and removed request for mguidon March 6, 2020 08:20
@sanderegg sanderegg merged commit 10f98f6 into ITISFoundation:master Mar 6, 2020
@sanderegg sanderegg deleted the bugfix/sidecar_return_values branch March 6, 2020 12:29
@sanderegg sanderegg linked an issue Apr 6, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

platform stability
4 participants