Cannot create terminal in rx-jupyter
camer314 opened this issue · comments
Application or Package Used
rx-jupyter 5.5.21
Describe the bug
Using the rx-jupyter library to programatically connect to Jupyter, everything works as expected except terminals get a CORS error (in my environment it is localhost -> localhost). Unfortunately this CORS error also appears to expose a bug with rxjs in that the observable never completes - the subscription neither fails or gets a response. It would seem that rxjs does not handle this 405 error correctly.
The root cause of the problem with rx-jupyter however is an errant trailing slash on the URL as placed there by the source code when constructing the request, for example http://127.0.0.1:8888/api/terminals/
if I construct my own ajax request without the slash then it works as expected
To Reproduce
Using the rx-jupyter library try creating a terminal:
const request = jupyter.terminals.create(config);
...subscribe...
You will notice the subscription never returns, errors or completes and your developer console will show a 405 error, demonstrating both the issue with rxjs and rx-jupyter
Expected behavior
Terminal request succeeds
Desktop (please complete the following information):
Windows 10
Chrome 102.0.5005.115