Skip to content

"mbs-build submit" crashes with AssertionError #3

@contyk

Description

@contyk

I was trying out the new mbs-build script that utilized python-openidc-client to submit a build of Base Runtime module. The first time I called it, the script told me that my token has expired and exited. The second time I called it it opened a browser and crashed with the following output:

% mbs-build submit -w
INFO: You have not provided SCM URL or branch. Trying to get it from current working directo
INFO: Submitting module build git://pkgs.fedoraproject.org/modules/base-runtime?#464026abf9cc4d01975
INFO: Trying to get the token from https://id.fedoraproject.org/openidc/
Please visit https://id.fedoraproject.org/openidc/Authorization?scope=openid+https%3A%2F%2FiFscope%2Fgroups+https%3A%2F%2Fmbs.fedoraproject.org%2Foidc%2Fsubmit-build&redirect_uri=http%3747%2F&response_mode=query&response_type=code&client_id=mbs-authorizer to grant authorizati
Traceback (most recent call last):
  File "/usr/lib64/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/lib/python2.7/site-packages/openidc_client/__init__.py", line 424, in _token_app
    kv = dict([v.split('=', 1) for v in split])
ValueError: dictionary update sequence element #0 has length 1; 2 is required
127.0.0.1 - - [07/Apr/2017 19:13:35] "GET /favicon.ico HTTP/1.1" 500 59
Traceback (most recent call last):
  File "/home/contyk/bin/mbs-build", line 321, in <module>
    main()
  File "/home/contyk/bin/mbs-build", line 302, in main
    args.idprovider, args.pyrpkg_client)
  File "/home/contyk/bin/mbs-build", line 207, in submit_module_build
    body)
  File "/home/contyk/bin/mbs-build", line 142, in send_authorized_request
    scopes=scopes, **kwargs)
  File "/home/contyk/bin/mbs-build", line 88, in _send_oidc_request
    token = oidc.get_token(scopes, new_token=new_token)
  File "/usr/lib/python2.7/site-packages/openidc_client/__init__.py", line 144, in get_token
    uuid = self._get_new_token(scopes)
  File "/usr/lib/python2.7/site-packages/openidc_client/__init__.py", line 457, in _get_new_token
    assert self._retrieved_code is not None
AssertionError

The browser displayed a generic error message. I'm not sure where the error really is or whether I was just doing something wrong; the user experience wasn't the best :)

Note when I kept the browser open and ran the same thing for the third time, it worked fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions