Connexion: Regression bug: unexpected keyword argument 'token_info'

Created on 5 Apr 2017  路  4Comments  路  Source: zalando/connexion

Connexion 1.1.7 breaks my app https://github.com/zalando-incubator/aws-credentials-service (it worked with Connexion 1.1.4 and earlier):

[2017-04-05 11:03:07,029] ERROR in app: Exception on /aws-account-roles/jdoe [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.5/dist-packages/connexion/decorators/decorator.py", line 66, in wrapper
    response = function(request)
  File "/usr/local/lib/python3.5/dist-packages/connexion/decorators/security.py", line 90, in wrapper
    return function(request)
  File "/usr/local/lib/python3.5/dist-packages/connexion/decorators/validation.py", line 299, in wrapper
    return function(request)
  File "/usr/local/lib/python3.5/dist-packages/connexion/decorators/decorator.py", line 42, in wrapper
    response = function(request)
  File "/usr/local/lib/python3.5/dist-packages/connexion/decorators/parameter.py", line 188, in wrapper
    return function(**kwargs)
TypeError: get_account_roles() got an unexpected keyword argument 'token_info'

There is no parameter token_info defined, but Connexion tries to pass it to my handler function now :disappointed:

bug

Most helpful comment

My app now works again with https://github.com/zalando/connexion/releases/tag/1.1.8 :tada:

All 4 comments

This is pretty bad as I suspect other apps using Token Info to break too when upgrading to 1.1.7...

Same bug can be reproduced with Connexion's OAuth example: https://github.com/zalando/connexion/tree/master/examples/oauth2

@hjacobs It should be ok after #432 . Users should not even notice after that gets merged. 馃憤

My app now works again with https://github.com/zalando/connexion/releases/tag/1.1.8 :tada:

Was this page helpful?
0 / 5 - 0 ratings