[BUG] Investigate: object NoneType can't be used in 'await' expression
Context
As mentioned by @krassowski here: https://github.com/nebari-dev/jhub-apps/pull/220#pullrequestreview-1988770197
Quoting him:
This is not directly related to this PR as it also happens on runs with older JupyterHub, but what is a bit concerning is that the CI passes with green status when there are JupyterHub errors, so if there is a more severe issue in the future it may get by unnoticed.
I have been seeing this for a while, but haven't had the chance to investigate or fix it. It doesn't have any impact on functionality, but CI going green on this error is an issue. I have so far ignored is as this is coming from jhsingle_native_proxy, which will be replaced eventually with out custom proxy using oauth2proxy (to be created).
Value and/or benefit
- More confidence in the CI
- No noise in the logs
Anything else?
No response
This error shows up on every app deployment - even ones that are successful. I've learned to ignore it, but it would be good to get it resolved. Here is a recent deployment log:
2024-05-24 08:23:39 | [D 240524 08:23:39 auth:578] HubAuth cache miss: token:46c1ec774b254eeab818bb94a1b53979:01d5ed589b2d8f3ca45a9f6b602ff93899474db696fceeb55319ceecc461a522
-- | --
| | 2024-05-24 08:23:38 | TypeError: object NoneType can't be used in 'await' expression
| | 2024-05-24 08:23:38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | 2024-05-24 08:23:38 | return await self.oauth_proxy(port, path)
| | 2024-05-24 08:23:38 | File "/opt/conda/envs/default/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 843, in proxy
| | 2024-05-24 08:23:38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | 2024-05-24 08:23:38 | return await self.proxy(self.port, path)
| | 2024-05-24 08:23:38 | File "/opt/conda/envs/default/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 849, in http_get
| | 2024-05-24 08:23:38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | 2024-05-24 08:23:38 | return await self.http_get(*args, **kwargs)
| | 2024-05-24 08:23:38 | File "/opt/conda/envs/default/lib/python3.11/site-packages/jhsingle_native_proxy/websocket.py", line 102, in get
| | 2024-05-24 08:23:38 | ^^^^^^^^^^^^
| | 2024-05-24 08:23:38 | result = await result
| | 2024-05-24 08:23:38 | File "/opt/conda/envs/default/lib/python3.11/site-packages/tornado/web.py", line 1790, in _execute
| | 2024-05-24 08:23:38 | Traceback (most recent call last):
| | 2024-05-24 08:23:38 | HTTPServerRequest(protocol='http', host='nebari.quansight.dev', method='GET', uri='/user/[email protected]/test-cf9b8f6/', version='HTTP/1.1', remote_ip='10.32.3.1')
| | 2024-05-24 08:23:38 | [E 240524 08:23:38 web:1875] Uncaught exception GET /user/[email protected]/test-cf9b8f6/ (10.32.3.1)
| | 2024-05-24 08:23:38 | [D 240524 08:23:38 auth:1398] Redirecting to login url: /hub/api/oauth2/authorize?client_id=jupyterhub-user-kcpevey%2540quansight.com-test-cf9b8f6&redirect_uri=%2Fuser%2Fkcpevey%40quansight.com%2Ftest-cf9b8f6%2Foauth_callback&response_type=code
| | 2024-05-24 08:23:38 | [D 240524 08:23:38 auth:835] No user identified
| | 2024-05-24 08:23:38 | [I 240524 08:23:38 proxyhandlers:848] SuperviseAndProxyHandler http_get 34841
| | 2024-05-24 08:23:38 | TypeError: object NoneType can't be used in 'await' expression
| | 2024-05-24 08:23:38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | 2024-05-24 08:23:38 | return await self.oauth_proxy(port, path)
| | 2024-05-24 08:23:38 | File "/opt/conda/envs/default/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 843, in proxy
| | 2024-05-24 08:23:38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | 2024-05-24 08:23:38 | return await self.proxy(self.port, path)
| | 2024-05-24 08:23:38 | File "/opt/conda/envs/default/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 849, in http_get
| | 2024-05-24 08:23:38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | 2024-05-24 08:23:38 | return await self.http_get(*args, **kwargs)
| | 2024-05-24 08:23:38 | File "/opt/conda/envs/default/lib/python3.11/site-packages/jhsingle_native_proxy/websocket.py", line 102, in get
| | 2024-05-24 08:23:38 | ^^^^^^^^^^^^
| | 2024-05-24 08:23:38 | result = await result
| | 2024-05-24 08:23:38 | File "/opt/conda/envs/default/lib/python3.11/site-packages/tornado/web.py", line 1790, in _execute
| | 2024-05-24 08:23:38 | Traceback (most recent call last):
| | 2024-05-24 08:23:38 | HTTPServerRequest(protocol='http', host='10.32.2.35:8888', method='GET', uri='/user/[email protected]/test-cf9b8f6/api', version='HTTP/1.1', remote_ip='10.32.3.48')
| | 2024-05-24 08:23:38 | [E 240524 08:23:38 web:1875] Uncaught exception GET /user/[email protected]/test-cf9b8f6/api (10.32.3.48)
| | 2024-05-24 08:23:38 | [D 240524 08:23:38 auth:1398] Redirecting to login url: /hub/api/oauth2/authorize?client_id=jupyterhub-user-kcpevey%2540quansight.com-test-cf9b8f6&redirect_uri=%2Fuser%2Fkcpevey%40quansight.com%2Ftest-cf9b8f6%2Foauth_callback&response_type=code
| | 2024-05-24 08:23:38 | [D 240524 08:23:38 auth:835] No user identified
| | 2024-05-24 08:23:38 | [I 240524 08:23:38 proxyhandlers:848] SuperviseAndProxyHandler http_get 34841 api