Skip to content

Fails to start with KeyError: WERKZEUG_SERVER_FD #425

Closed
@hunger

Description

@hunger

Describe the bug

gdbgui does not start. It fails with KeyError: WERKZEUG_SERVER_FD.

To Reproduce

  1. pipx install gdbgui
  2. gdbgui

I get this output:

1➜ gdbgui
Opening gdbgui with default browser at http://127.0.0.1:5000
View gdbgui dashboard at http://127.0.0.1:5000/dashboard
exit gdbgui by pressing CTRL+C
Traceback (most recent call last):
  File "/home/dev/.local/bin/gdbgui", line 8, in <module>
    sys.exit(main())
  File "/home/dev/.local/pipx/venvs/gdbgui/lib/python3.10/site-packages/gdbgui/cli.py", line 249, in main
    run_server(
  File "/home/dev/.local/pipx/venvs/gdbgui/lib/python3.10/site-packages/gdbgui/server/server.py", line 95, in run_server
    socketio.run(
  File "/home/dev/.local/pipx/venvs/gdbgui/lib/python3.10/site-packages/flask_socketio/__init__.py", line 596, in run
    app.run(host=host, port=port, threaded=True,
  File "/home/dev/.local/pipx/venvs/gdbgui/lib/python3.10/site-packages/flask/app.py", line 920, in run
    run_simple(t.cast(str, host), port, self, **options)
  File "/home/dev/.local/pipx/venvs/gdbgui/lib/python3.10/site-packages/werkzeug/serving.py", line 1047, in run_simple
    fd = int(os.environ["WERKZEUG_SERVER_FD"])
  File "/usr/lib/python3.10/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'WERKZEUG_SERVER_FD'

The firefox browser pops up before this output shows up but only shows an empty page.

Expected behavior

Gbdgui starts up and does something.

Please complete the following information:

  • OS: Linux
  • gdbgui version (gdbgui -v): 0.15.0.1
  • gdb version (gdb -v): GNU gdb (GDB) 11.2
  • browser [e.g. chrome, safari]: It does not get to a point where that should matter:-)
  • python packages (pip freeze):
appdirs==1.4.4
argcomplete==2.0.0
click==8.1.0
greenlet==1.1.2
lit==13.0.1.dev0
meson==0.62.0
more-itertools==8.10.0
msgpack==1.0.3
ordered-set==4.0.2
packaging==21.3
pipx==1.0.0
pynvim==0.4.3
pyparsing==3.0.7
six==1.16.0
TBB==0.2
userpath==1.8.0

Additional context
I tried running this inside an systemd-nspawn container, which does cause trouble sometimes. But this does not look like the typical container issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions