mamba-org / gator

Conda environment and package management extension from within Jupyter
Other
260 stars 30 forks source link

"No web browser found: could not locate runnable browser". Pages refuse to connect to launch Jupyter notebook. #199

Closed tedmoorman closed 1 year ago

tedmoorman commented 1 year ago

Description

Using the classical notebook, I receive the following message: "No web browser found: could not locate runnable browser". When clicking on browser extensions given in terminal, pages refuse to connect to launch Jupyter notebook.

Do I need to add some kind of firewall or port forwarding? I do this to create the initial Jupyter notebook that I'm launching from.

Reproduce

  1. Install mamba_gator in conda environment.
  2. Activate conda environment.
  3. Run 'gator' command.
  4. See message: "No web browser found: could not locate runnable browser".
  5. Go to IP addresses in terminal, but they refuse to connect.

Expected behavior

I expected to be able to successfully launch a Jupyter notebook in the browser in which I could use mamba_gator.

Context

Command Line Output
(base) [ ~]$ gator
bash: gator: command not found
(base) [ ~]$ conda activate ~/.conda/envs/alt
(alt) [ ~]$ gator
[I 15:07:36.204 MambaNavigator] The port 8888 is already in use, trying another port.
[I 15:07:36.205 MambaNavigator] The port 8889 is already in use, trying another port.
[I 15:07:36.206 MambaNavigator] The port 8890 is already in use, trying another port.
[I 15:07:36.218 MambaNavigator.mamba_gator] Server extension enabled
[I 15:07:36.222 MambaNavigator] Serving notebooks from local directory: /home/xxxxx
[I 15:07:36.222 MambaNavigator] The Jupyter Notebook is running at:
[I 15:07:36.222 MambaNavigator] http://localhost:8891/?token=df61f3bd9880bc43743354760bb3a8673248cdcaa2329f7a
[I 15:07:36.222 MambaNavigator]  or http://127.0.0.1:8891/?token=df61f3bd9880bc43743354760bb3a8673248cdcaa2329f7a
[I 15:07:36.222 MambaNavigator] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 15:07:36.235 MambaNavigator] No web browser found: could not locate runnable browser.
[C 15:07:36.236 MambaNavigator]
    To access the notebook, open this file in a browser:
        file:///home/xxxxx/.local/share/jupyter/runtime/nbserver-8699-open.html
    Or copy and paste one of these URLs:
        http://localhost:8891/?token=df61f3bd9880bc43743354760bb3a8673248cdcaa2329f7a
     or http://127.0.0.1:8891/?token=df61f3bd9880bc43743354760bb3a8673248cdcaa2329f7a
tedmoorman commented 1 year ago

It was a port forwarding issue. gator --no-browser --port=xxxx --notebook-dir jupyter-folder did the trick.

fcollonval commented 1 year ago

Thanks for providing the fix @tedmoorman - closing this as answered.