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

notFoundUrl pageConfig persisted #314

Open
mbektas opened this issue Oct 10, 2022 · 1 comment
Open

notFoundUrl pageConfig persisted #314

mbektas opened this issue Oct 10, 2022 · 1 comment
Labels

Comments

@mbektas
Copy link
Member

mbektas commented Oct 10, 2022

Description

notFoundUrl resent to browser with pageConfig with every JupyterLab load.

Reproduce

Expected behavior

  • Error message should be shown possibly once, and only if the non-existing URL was the initial JupyterLab URL being loaded.

Context

JupyterLab 3.4.8

Hi, while debugging some JupyterLab Desktop issues related to new features I am developing, I realized that jupyter server keeps returning previously not found URLs as part of pageConfig and that results in a dialog with the error message as shown below. If user mistakenly types an invalid path, this message would be shown at every JupyterLab reload since pageConfig persists the notFoundUrl config.

It seems to be caused by this line:

page_config["notFoundUrl"] = self.request.path

Also, if the non-existing path is part of initial URL entry then the popup is shown at that particular JupyterLab load. However, if the path was requested by javascript via fetch for example, then the popup will be shown at the subsequent JupyterLab loads, if any. The way I discovered the issue was, I opened dev tools and it requested source map file but couldn't load due to desktop app specific reasons, and next time I loaded JupyterLab it showed this "Path Not Found" error message.

I guess a solution could be to set page_config["notFoundUrl"] only for the initial JupyterLab URL load, if that was possible to detect.

jlab server path not found

@mbektas mbektas added the bug label Oct 10, 2022
@welcome
Copy link

welcome bot commented Oct 10, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

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

No branches or pull requests

1 participant