jupynium.nvim icon indicating copy to clipboard operation
jupynium.nvim copied to clipboard

[Bug] Message: Bad Gateway

Open Fireond opened this issue 5 months ago • 1 comments

Describe the bug When running :JupyniumStartAndAttachToServerInTerminal it outputs

jupynium.pynvim_helpers:   18 - INFO - nvim addr: /run/user/1000/nvim.18427.0
jupynium.pynvim_helpers:   37 - INFO - nvim attached
jupynium.pynvim_helpers:   41 - INFO - Initialising..
jupynium.pynvim_helpers:   42 - INFO - Communicating with channel_id 5
jupynium.cmds.jupynium:  103 - INFO - Using firefox profile: None
jupynium.cmds.jupynium:  620 - ERROR - Exception occurred
Traceback (most recent call last):
  File "/home/fireond/pyenv/qldpc/lib/python3.13/site-packages/jupynium/cmds/jupynium.py", line 523, in main
    with webdriver_firefox(
         ~~~~~~~~~~~~~~~~~^
        args.firefox_profiles_ini_path, args.firefox_profile_name
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ) as driver:
    ^
  File "/home/fireond/pyenv/qldpc/lib/python3.13/site-packages/jupynium/cmds/jupynium.py", line 112, in webdriver_firefox
    return webdriver.Firefox(options=options, service=service)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fireond/pyenv/qldpc/lib/python3.13/site-packages/selenium/webdriver/firefox/webdriver.py", line 72, in __init__
    super().__init__(command_executor=executor, options=options)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fireond/pyenv/qldpc/lib/python3.13/site-packages/selenium/webdriver/remote/webdriver.py", line 261, in __init__
    self.start_session(capabilities)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/home/fireond/pyenv/qldpc/lib/python3.13/site-packages/selenium/webdriver/remote/webdriver.py", line 362, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fireond/pyenv/qldpc/lib/python3.13/site-packages/selenium/webdriver/remote/webdriver.py", line 454, in execute
    self.error_handler.check_response(response)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/fireond/pyenv/qldpc/lib/python3.13/site-packages/selenium/webdriver/remote/errorhandler.py", line 196, in check_response
    raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: Bad Gateway

I thought it was the problem with selenium. So I tried the following test code, and the outputs are the same.

from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.firefox.options import Options

options = Options()
driver = webdriver.Firefox(options=options)
driver.get("https://example.com")
print(driver.title)
driver.quit()

Output of jupynium --version

Jupynium v0.2.6+4.g144ab6e

Output of nvim --version

NVIM v0.12.0-dev-888+g95dfb063da
Build type: Release
LuaJIT 2.1.1748459687
Run "nvim -V1 -v" for more info

Additional context Add any other context about the problem here.

Fireond avatar Jul 24 '25 05:07 Fireond

If you installed firefox with snap on Ubuntu, make sure you remove it and try the ppa version.

I asked ChatGPT and maybe this could work: unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY

But I really can't help you with the Selenium problem. It depends on the OS and environment. But if you figure out the solution, sharing here is quite helpful.

kiyoon avatar Jul 25 '25 04:07 kiyoon