question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to use cookies with HubOAuth error

See original GitHub issue

Hello,

I feel that this issue is simple but I’m missing something important here. After I finish with the instructions and I can access the manager node and is able to login (tried both the vanilla devel. way and using Github OAuth), then I can’t quite spawn new notebooks. The request is sent and a new instance is created, however, I get an error on the instance. When I open jupyter.log in the worker instance I get the following:


/usr/local/lib/python3.5/dist-packages/traitlets/config/configurable.py:84: UserWarning: Config option `cookie_name` not recognized by `HubOAuth`.
  self.config = config
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 528, in get
    value = obj._trait_values[self.name]
KeyError: 'oauth_client_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/jupyterhub-singleuser", line 6, in <module>
    main()
  File "/usr/local/lib/python3.5/dist-packages/jupyterhub/singleuser.py", line 455, in main
    return SingleUserNotebookApp.launch_instance(argv)
  File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/notebook/notebookapp.py", line 1364, in initialize
    self.init_webapp()
  File "/usr/local/lib/python3.5/dist-packages/jupyterhub/singleuser.py", line 393, in init_webapp
    self.init_hub_auth()
  File "/usr/local/lib/python3.5/dist-packages/jupyterhub/singleuser.py", line 388, in init_hub_auth
    if not self.hub_auth.oauth_client_id:
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 593, in _validate
    value = self._cross_validate(obj, value)
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 599, in _cross_validate
    value = obj._trait_validators[self.name](obj, proposal)
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 907, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/jupyterhub/services/auth.py", line 439, in _ensure_not_empty
    raise ValueError("%s cannot be empty." % proposal.trait.name)
ValueError: oauth_client_id cannot be empty.

Please let me know if you know what’s going on wrong.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
farassadekcommented, Mar 20, 2018

Hi Hassan This issue solved and the instance spawner works with the new design of Jupyterhub8 Faras

0reactions
farassadekcommented, Mar 20, 2018

Fix jupyterhub instance spawner with the jupyterhub 8 OAuth

Read more comments on GitHub >

github_iconTop Results From Across the Web

Question: OAuth state missing from cookies #1519 - GitHub
I am using kubernetes with jupyterhub. When I use Auth0 as an authentication API, I always get the error "OAuth state missing from...
Read more >
JupyterHub "400 : Bad Request OAuth state missing from ...
I am using Jupyterhub version 1.2.1 and nginx 1.19.6 and all the services are running in the Docker container in Swarm mode. However,...
Read more >
500 Internal Server Error / 400 OAuth state missing from ...
Within Dashboard checking out the network messages gave me “State missing from cookies”. Attempting login through JupyterHub itself I get no ...
Read more >
OAuth cookie expiring, causing "Forbidden" errors upon ...
OAuth cookie expiring, causing "Forbidden" errors upon saving files. Symptoms: In the notebook: saving failed, showing a "Forbidden" error ...
Read more >
OAuth 2.0 Authorization in Hub - Help - JetBrains
An ID of the registered in Hub service associated with the resource server. For example, if the client wants to access issues in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found