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

Opening jupiter lab/notebook doesn't auto-launch into browser but gets stuck on unhelpful "opening jupyter application page" #16221

Closed
drmikecooke opened this issue Apr 22, 2024 · 7 comments
Labels
bug status:Needs Info status:Needs Triage Applied to new issues that need triage

Comments

@drmikecooke
Copy link

I am using a raspberry pi4 with 64bit bookworm os (installed in the past few days).

I have used jupyter lab before, but pip installed new version (4.1.6) in a virtual environment (venv) and I can get it to work after quitting the unhelpful "opening jupyter application page" (curses-type menu interface using keyboard arrows etc.) and doing a right click "open URL" on the tokenized URLs showing in terminal.

The unhelpful page also pops up in notebook launch.

I thought it might be a firewall problem (ufw) but the rotten page popped up when ufw was disabled.

The unhelpful page seems to want me to set up cookies and so on, but I don't really understand why they are involved.

Not sure what else to add.

Copy link

welcome bot commented Apr 22, 2024

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! 🎉

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Apr 22, 2024
@JasonWeill
Copy link
Contributor

@drmikecooke Thank you for opening this issue! You can prevent JupyterLab from opening a browser by running jupyter lab --no-browser. This will only cause the URL to appear in the terminal, so you can click or copy it as you're doing above.

Do you see any other errors when you run jupyter lab (without the --no-browser flag)? If so, could you please comment with the output of this command or screen shots of any unexpected UI elements that pop up? Thanks!

@drmikecooke
Copy link
Author

Hi there https://github.com/JasonWeill,

20240424_08h53m43s_grim

Thanks for getting back to me so quickly. Hopefully the image above will help in understanding my problem. What you see is a request about cookies and then a message from the server about the skipped servers, and that the build is up to date.

Before (bullseye) I used to get these messages continuously, and once I started work in the auto-launched browser window, there would be a log of my actions in jlab.

Answering the cookie question "A" for always, allows me to continue suggesting I may want "help", which gets me:

20240424_09h03m41s_grim

If you know the code it may tell you what's happening. It doesn't tell me much of use.

If I now quit "q" I get back to the traditional log.

As a bit of extra information I have set up a bookmark in my browser, which seems to work if I just launch jupyter-lab without me having to right click in the terminal.

Hope there are enough breadcrumbs here.

Mike

@drmikecooke
Copy link
Author

Hi again,

20240424_09h14m55s_grim

I've just run in no-browser mode, and it just launches the server, but as expected doesn't try to launch the browser and none of the cookie stuff (as above). So I guess it''s something to do with the interaction with the browser?

So here's the info on that:

Chromium
Version 122.0.6261.89 (Official Build) Built on Debian , running on Debian 12 (64-bit)

Mike

@JasonWeill
Copy link
Contributor

@drmikecooke Aha! In your first screen shot, that cookie warning against a blue background is coming from a text mode browser, like Lynx or Links, that seems to be detected as your system's default web browser. JupyterLab won't work in a text mode browser; you need to configure it to spawn a GUI browser like Chromium.

You can set the BROWSER environment variable, or the c.ServerApp.browser configuration setting (docs) to force a particular app to launch as your default web browser. Please let me know if that works for you!

@drmikecooke
Copy link
Author

I tried both, and both worked.

Had to generate a configuration to access c.ServerApp.browser:

jupyter server --generate-config

and editing the file ~/.jupyter/jupyter_server_config.py to uncomment the line (226 in the version I have):

c.ServerApp.browser = 'chromium-browser'

The environment variable is set using:

BROWSER=chromium-browser
export BROWSER

For this option to be permanent, I guess you would have to put these lines into .bashrc (for command-line launch of jupyter-lab) and .profile (for launch from menu without terminal).

Of course, if users want to use firefox or something else, that is up to them.

I'm not sure why the system (bookworm) is defaulting to lynx rather than chromium. It's a relatively new debian release, so I guess it is a little rough around the edges?

Thanx anyway Jason for helping me out here. I guess the thread is now closed? Is that something I should do?

Mike

@JasonWeill
Copy link
Contributor

@drmikecooke Thank you for your communication on this issue! I'll close this issue, but hopefully, others who find the same issue will be able to find this discussion to help themselves out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:Needs Info status:Needs Triage Applied to new issues that need triage
Projects
None yet
Development

No branches or pull requests

2 participants