Skip to content

notFoundUrl pageConfig persisted #314

@mbektas

Description

@mbektas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions