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

_solara/cdn is broken in jupyter notebook classic #764

Open
iisakkirotko opened this issue Aug 30, 2024 · 0 comments
Open

_solara/cdn is broken in jupyter notebook classic #764

iisakkirotko opened this issue Aug 30, 2024 · 0 comments

Comments

@iisakkirotko
Copy link
Collaborator

Seems to be because of jupyter server. Tested (and fails) with

solara: development install, ~1.38.0
notebook: 6.4.13 - 6.5.7
server: 2.13.0 - 2.14.2

Works with jupyter_server<2

The error we get is:

GET http://localhost:8889/_solara/cdn/mermaid@10.8.0/dist/mermaid.min.js?v=20240830132155 net::ERR_TOO_MANY_REDIRECTS

We suspect this is caused by the need for authentication in jupyter server, see this warning here

    @property
    def authorizer(self) -> Authorizer:
        if "authorizer" not in self.settings:
            warnings.warn(
                "The Tornado web application does not have an 'authorizer' defined "
                "in its settings. In future releases of jupyter_server, this will "
                "be a required key for all subclasses of `JupyterHandler`. For an "
                "example, see the jupyter_server source code for how to "
                "add an authorizer to the tornado settings: "
                "https://github.com/jupyter-server/jupyter_server/blob/"
                "653740cbad7ce0c8a8752ce83e4d3c2c754b13cb/jupyter_server/serverapp.py"
                "#L234-L256",
                stacklevel=2,
            )
            from jupyter_server.auth import AllowAllAuthorizer

            self.settings["authorizer"] = AllowAllAuthorizer(
                config=self.settings.get("config", None),
                identity_provider=self.identity_provider,
            )

        return cast("Authorizer", self.settings.get("authorizer"))

This is how they advice for it to be implemented:

        if identity_provider is None:
            warnings.warn(
                "identity_provider unspecified. Using default IdentityProvider."
                " Specify an identity_provider to avoid this message.",
                RuntimeWarning,
                stacklevel=2,
            )
            identity_provider = IdentityProvider(parent=jupyter_app)
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

1 participant