Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 400 : Bad Request #64

Closed
MJKnowling opened this issue Dec 14, 2022 · 16 comments
Closed

HTTP 400 : Bad Request #64

MJKnowling opened this issue Dec 14, 2022 · 16 comments

Comments

@MJKnowling
Copy link

@oschuett

When I launch the "Try it live" AppMode example and I receive the error:

400 : Bad Request

The error was: Cannot create file or directory '/home/jovyan/... .ipynb'

The reason for trying this is because my MyBinder repos are also now returning the same error when launching AppMode.

Is there a new dependency that you are aware of?

Any ideas/suggestions would be much appreciated!

@yakeeliuliu
Copy link

Hi, I am running into the same issue now.

@erobiquee
Copy link

It seems that for some reason jupyter notebook does not have permission to write hidden files anymore. As a workaround you can start the notebook with --ContentsManager.allow_hidden=True or set that in the config file. However, this will also show hidden files in the file browser which is a bit annoying.

@fomightez
Copy link

fomightez commented Feb 28, 2023

To follow on erobiquee's excellent advice for a workaround, you can find an example config file 'jupyter_notebook_config.py' here that allows appmode to work in mybinder again.

Note that if you are using a binder or .binder directory for the configuration files for the mybinder service, the jupyter_notebook_config.py stays in the root of the repo and does NOT belong inside the binder directory. (This is demonstrated by this launch, which corresponds to this particular commit of that repo with jupyter_notebook_config.py in root, in combination with a binder directory.)

The showing the hidden files isn't too much of an issue if you are working in the appmode mode. My example didn't involve interacting with files in the session and so maybe that aspect is messier than usual.

@olivertlord
Copy link

olivertlord commented Mar 15, 2023

Hi, I have tried @fomightez's workaround but I think it is broken again. The launch here now returns "500 : Internal Server Error".

I have a repo that used to launch into appmode using this url, but now I get "404 : Not Found You are requesting a page that does not exist!"

Any suggestions would be greatly appreciated!

@fomightez
Copy link

fomightez commented Mar 16, 2023

Yes, sorry @olivertlord . MyBinder announced a sort of big update like a week after I got the workaround working and I think changing the default server broke it. That's my guess anyways. It was definitely working well with the workaround just a few days before that. (I noted it seemed broken again already here, but since I just had it working again, I was too discouraged to look into it much at the time. I couldn't quite remember where I had posted the related issue on GitHub and so I missed linking this.)

Based on here, I'm wondering if going over into an available terminal by using the URL to switch over to either the JupyterLab or classic interface and running less ~/.jupyter-server-log.txt would shed any light. I think that would be a good place to start before posting at the Jupyter Community Discourse forum since they do say to let them know if we encounter issues. Last time I thought it was that, it turned out not to be and so I'm a little hesitant to pinpoint this as the issue; however, it did seem to coincide.

@olivertlord
Copy link

No need to apologize @fomightez. I have pasted the log below. I am new here. Do you think I should post this at the Jupyter Community Discourse? I don't know hpw to interpret it.

Launching jupyter-lab
[I 2023-03-16 16:44:56.569 ServerApp] jupyter_offlinenotebook | extension was successfully linked.
[I 2023-03-16 16:44:56.570 ServerApp] jupyter_resource_usage | extension was successfully linked.
[W 2023-03-16 16:44:56.573 LabApp] 'base_url' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-03-16 16:44:56.573 LabApp] 'token' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-03-16 16:44:56.574 LabApp] 'trust_xheaders' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-03-16 16:44:56.574 LabApp] 'allow_origin' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-03-16 16:44:56.574 LabApp] 'allow_origin_pat' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-03-16 16:44:56.579 ServerApp] jupyterlab | extension was successfully linked.
[W 2023-03-16 16:44:56.582 NotebookApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-03-16 16:44:56.582 NotebookApp] 'jinja_template_vars' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-03-16 16:44:56.582 NotebookApp] 'allow_origin' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-03-16 16:44:56.582 NotebookApp] 'shutdown_no_activity_timeout' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-03-16 16:44:56.582 NotebookApp] 'tornado_settings' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-03-16 16:44:56.588 ServerApp] nbclassic | extension was successfully linked.
[I 2023-03-16 16:44:56.589 ServerApp] Writing Jupyter server cookie secret to /home/jovyan/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2023-03-16 16:44:57.687 ServerApp] nteract_on_jupyter | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths.
[I 2023-03-16 16:44:57.688 ServerApp] nteract_on_jupyter | extension was successfully linked.
[I 2023-03-16 16:44:57.688 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-03-16 16:44:57.781 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-03-16 16:44:57.782 ServerApp] jupyter_offlinenotebook | extension was successfully loaded.
[I 2023-03-16 16:44:57.783 ServerApp] jupyter_resource_usage | extension was successfully loaded.
[I 2023-03-16 16:44:57.784 LabApp] JupyterLab extension loaded from /srv/conda/envs/notebook/lib/python3.10/site-packages/jupyterlab
[I 2023-03-16 16:44:57.784 LabApp] JupyterLab application directory is /srv/conda/envs/notebook/share/jupyter/lab
[I 2023-03-16 16:44:57.790 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-03-16 16:44:57.859 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-03-16 16:44:57.859 ServerApp] nteract extension loaded from /srv/conda/envs/notebook/lib/python3.10/site-packages/nteract_on_jupyter
[I 2023-03-16 16:44:57.862 ServerApp] nteract_on_jupyter | extension was successfully loaded.
[I 2023-03-16 16:44:57.862 ServerApp] Will shut down after 600 seconds with no kernels or terminals.
[I 2023-03-16 16:44:57.863 ServerApp] Serving notebooks from local directory: /home/jovyan
[I 2023-03-16 16:44:57.863 ServerApp] Jupyter Server 1.23.5 is running at:
[I 2023-03-16 16:44:57.863 ServerApp] http://jupyter-olivertlord-2dhydrous-2dmelts-2d8329teeb:8888/user/olivertlord-hydrous-melts-8329teeb/lab?token=...
[I 2023-03-16 16:44:57.863 ServerApp] or http://127.0.0.1:8888/user/olivertlord-hydrous-melts-8329teeb/lab?token=...
[I 2023-03-16 16:44:57.863 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2023-03-16 16:44:57.868 ServerApp] No web browser found: could not locate runnable browser.
[I 2023-03-16 16:44:58.251 ServerApp] 302 GET /user/olivertlord-hydrous-melts-8329teeb/ (10.0.5.33) 0.91ms
[I 2023-03-16 16:45:06.660 LabApp] Build is up to date
[I 2023-03-16 16:45:12.372 ServerApp] Kernel started: 1bdca68d-4a93-4314-b335-3b354c90645b
[I 2023-03-16 16:45:12.372 ServerApp] Culling kernels with idle durations > 600 seconds at 60 second intervals ...
[I 2023-03-16 16:45:12.372 ServerApp] Culling kernels even with connected clients
[W 2023-03-16 16:45:14.165 ServerApp] Could not destroy zmq context for <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f5b402f2bc0>
[IPKernelApp] ERROR | UNKNOWN CONTROL MESSAGE TYPE: 'usage_request'
[I 2023-03-16 16:45:16.983 ServerApp] New terminal with automatic name: 1
[I 2023-03-16 16:45:16.987 ServerApp] Starting buffering for 1bdca68d-4a93-4314-b335-3b354c90645b:6c3a46b1-0c2c-4828-a60e-b5bcbeb38015
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control
[IPKernelApp] WARNING | No such comm: 31662935-c3e9-4bbf-b29c-b06c6187fd11
/home/jovyan/.jupyter-server-log.txt (END)

@fomightez
Copy link

Had that run included trying to open in the appmode mode?

It may be enough to just tag the post announcing MyBinder switching the server over with a link to your post above and saying Appmode had been working via launches from MyBinder after a setting the config to show hidden files. And then it broke again around the time of this announcement. Then say see this thread for more details.

@olivertlord
Copy link

Sorry - now I understand. The log does not include me attempting to launch in appmode. I will create a new one, and then I will tag the announcement and try and explain things. Thanks for your help.

@fomightez
Copy link

See reply here and the note over at binder-examples/appmode needs workaround to enable appmode to work for now #275. Promising.

@olivertlord
Copy link

Yes, I saw that. Thanks for pointing me in the right direction!

@PabloPiaggi
Copy link

Have you found a solution for this problem? I noticed that the “Try it live” binder launcher is still failing with the above-mentioned error. I have an application that depends on Appmode and this is an important issue for me. When you find a solution, please update the example, so I can update my repository as well. Thank you.

@olivertlord
Copy link

I believe that @pdstack has made a pull request to @oschuett that should fix the problem. Once that is merged and a new version of appmode is released, then we should be up and running again.

@oschuett
Copy link
Owner

Fixed in release v0.9.0.

@olivertlord
Copy link

Thanks @oschuett! I will give it a try.

@oschuett
Copy link
Owner

Yeah, I'm very sorry for the long silence. I hope this resolved the issue. I also tried testing with mybinder, but they seem overloaded at the moment.

@olivertlord
Copy link

@oschuett Presumably related to this: https://blog.jupyter.org/mybinder-org-reducing-capacity-c93ccfc6413f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants