millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 123 forks source link

peculiar error: 403 on ein:notebooklist-login #867

Closed sam-s closed 1 year ago

sam-s commented 1 year ago

browser works fine, but EIN fails (with ein:dev-start-debug as recommended in https://github.com/millejoh/emacs-ipython-notebook/issues/738) *ein:log-all*:

15:36:20:139: [debug] Login attempt #0 in response to nil from http://127.0.0.1:8888. @#<buffer prob.py>
15:36:20:228: [debug] Login attempt #1 in response to 403 from http://127.0.0.1:8888. @#<buffer prob.py>
15:36:20:229: [debug] ein:notebooklist-login--complete STATUS: 403 DATA: nil @#<buffer prob.py>
15:36:20:357: [error] Login to http://127.0.0.1:8888 failed, error-thrown (error http 401), raw-header HTTP/1.1 401 Unauthorized
Server: TornadoServer/6.2
Content-Type: text/html; charset=UTF-8
Date: Mon, 27 Mar 2023 19:36:20 GMT
X-Content-Type-Options: nosniff
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report
Content-Length: 12493
 @#<buffer prob.py>
15:36:20:412: [debug] ein:notebooklist-login--complete STATUS: 401 DATA: (:reprompt t) @#<buffer prob.py>

Additionally, *Messages*:

[error] request--callback: peculiar error: 403
[error] request--callback: peculiar error: 401
sam-s commented 1 year ago

This is, apparently, caused by jupyter notebook list --json returning two lines, the first one referring to a long dead process and the second one to the correct actual process.

sam-s commented 1 year ago

Removing all obsolete files from ~/.local/share/jupyter/runtime solved the problem.