spyder-ide / spyder-terminal

Run system terminals inside Spyder. Works on Linux, macOS and Windows.
MIT License
231 stars 78 forks source link

Terminal server could not be located #336

Open FraserBell opened 2 years ago

FraserBell commented 2 years ago

Description

What steps will reproduce the problem?

Upon opening the application the following message occurs: "Terminal server could not be located at http://127.0.0.1:8071, please restart Spyder on debugging mode and open an issue with the contents of...sypder_terminal_out.log and ...spyder_terminal_err.log files at https://github...

spyder_terminal_out.log is blank

spyder_terminal_err.log: No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect. 2022-10-24 15:35:06 8afbf8f0.st-andrews.ac.uk main[12256] INFO Server is now at: 127.0.0.1:8071 2022-10-24 15:35:06 8afbf8f0.st-andrews.ac.uk main[12256] INFO Shell: /bin/bash 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 200 GET / (127.0.0.1) 11.33ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 200 GET /static/css/ubuntu.css (127.0.0.1) 19.97ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 200 GET /static/css/style.css (127.0.0.1) 9.13ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 200 GET /static/components/xterm.js/src/xterm.css (127.0.0.1) 24.58ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 200 GET /static/components/jquery/dist/jquery.min.js (127.0.0.1) 71.46ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 200 GET /static/build/main.bundle.js (127.0.0.1) 211.84ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] WARNING 404 GET /main.bundle.js (127.0.0.1) 258.44ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 200 GET /static/css/fonts/ubuntumono-regular-webfont.woff2 (127.0.0.1) 20.54ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk spyder_terminal.server.rest.term_rest[12256] INFO CWD: /Users/fraserbell 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk spyder_terminal.server.rest.term_rest[12256] INFO Size: (156, 42) 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 200 POST /api/terminals?cols=156&rows=42 (127.0.0.1) 53.20ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] WARNING 404 GET /favicon.ico (127.0.0.1) 3.01ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] INFO 101 GET /terminals/bafd68 (127.0.0.1) 0.81ms 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk spyder_terminal.server.websockets.term_ws[12256] INFO WebSocket opened: bafd68 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk spyder_terminal.server.websockets.term_ws[12256] INFO TTY On! 2022-10-24 15:35:14 8afbf8f0.st-andrews.ac.uk spyder_terminal.server.websockets.term_ws[12256] INFO TTY Off! 2022-10-24 15:35:14 8afbf8f0.st-andrews.ac.uk spyder_terminal.server.websockets.term_ws[12256] INFO WebSocket closed: bafd68 2022-10-24 15:35:14 8afbf8f0.st-andrews.ac.uk terminado.management[12256] INFO Websocket closed, sending SIGHUP to terminal. 2022-10-24 15:35:14 8afbf8f0.st-andrews.ac.uk terminado.management[12256] INFO EOF on FD 17; stopping reading

Versions

Dependencies

# Mandatory:
atomicwrites >=1.2.0                 :  1.4.1 (OK)
chardet >=2.0.0                      :  5.0.0 (OK)
cloudpickle >=0.5.0                  :  2.1.0 (OK)
cookiecutter >=1.6.0                 :  2.1.1 (OK)
diff_match_patch >=20181111          :  20200713 (OK)
intervaltree >=3.0.2                 :  3.1.0 (OK)
IPython >=7.31.1;<8.0.0              :  7.34.0 (OK)
jedi >=0.17.2;<0.19.0                :  0.18.1 (OK)
jellyfish >=0.7                      :  0.9.0 (OK)
jsonschema >=3.2.0                   :  4.14.0 (OK)
keyring >=17.0.0                     :  23.8.2 (OK)
nbconvert >=4.0                      :  7.0.0 (OK)
numpydoc >=0.6.0                     :  1.4.0 (OK)
parso >=0.7.0;<0.9.0                 :  0.8.3 (OK)
pexpect >=4.4.0                      :  4.8.0 (OK)
pickleshare >=0.4                    :  0.7.5 (OK)
psutil >=5.3                         :  5.9.1 (OK)
pygments >=2.0                       :  2.13.0 (OK)
pylint >=2.5.0;<3.0                  :  2.15.0 (OK)
pyls_spyder >=0.4.0                  :  0.4.0 (OK)
pylsp >=1.5.0;<1.6.0                 :  1.5.0 (OK)
pylsp_black >=1.2.0                  :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0            :  3.0.3 (OK)
qstylizer >=0.1.10                   :  0.2.1 (OK)
qtawesome >=1.0.2                    :  1.1.1 (OK)
qtconsole >=5.3.2;<5.4.0             :  5.3.2 (OK)
qtpy >=2.1.0                         :  2.2.0 (OK)
rtree >=0.9.7                        :  1.0.0 (OK)
setuptools >=49.6.0                  :  65.3.0 (OK)
sphinx >=0.6.6                       :  5.1.1 (OK)
spyder_kernels >=2.3.3;<2.4.0        :  2.3.3 (OK)
textdistance >=4.2.0                 :  4.4.0 (OK)
three_merge >=0.1.1                  :  0.1.1 (OK)
watchdog >=0.10.3                    :  2.1.9 (OK)
zmq >=22.1.0                         :  23.2.1 (OK)

# Optional:
cython >=0.21                        :  0.29.32 (OK)
matplotlib >=3.0.0                   :  3.5.3 (OK)
numpy >=1.7                          :  1.22.4 (OK)
pandas >=1.1.1                       :  1.4.3 (OK)
scipy >=0.17.0                       :  1.9.1 (OK)
sympy >=0.7.3                        :  1.11.1 (OK)

# Spyder plugins:
spyder_terminal.terminalplugin 1.2.2 :  1.2.2 (OK)
dalthviz commented 2 years ago

Hi @FraserBell thank you for the feedback! I'm not totally sure what could be causing this but seems like this is a duplicate of https://github.com/spyder-ide/spyder-terminal/issues/330

Just in case, what happens if you try to access the server address with your browser?

I will move this to the spyder-terminal repo for the moment, but if you get more info in order to better understand this let us know!

mhechthz commented 2 years ago

I have the same problem. The terminal is accessible in browser but spyder fails to connect (Python 3.9, Python 3.10, spyder 5.3.3, spyder-terminal 1.2.2).

dalthviz commented 2 years ago

From the logs seems like the websocket is being closed. If the problem is related with the websocket handling maybe is related with the terminado version you have installed? What terminado version do you have installed @mhechthz @FraserBell ? What happens if you try to downgrade to terminado 0.13.3 ?

mhechthz commented 2 years ago

terminado==0.17.0 ... with terminado 0.13.3 it's the same problem. Terminal can be accessed via browser but not from Spyder.

What was the command to generate error log files? there is no documentation on this? ... found it: spyder --debug-info minimal

by the way: issue https://github.com/spyder-ide/spyder-terminal/issues/324 and https://github.com/spyder-ide/spyder-terminal/issues/203 are the same.

dalthviz commented 2 years ago

Thanks for the new info @mhechthz! I'm not sure what could be happening there sorry :/

The other piece of log that is interesting from the OP is the code 404 for the main.bundle.js - 2022-10-24 15:35:08 8afbf8f0.st-andrews.ac.uk tornado.access[12256] WARNING 404 GET /main.bundle.js (127.0.0.1) 258.44ms 🤔

Also, thanks for the feedback around all issue, will close them as superseded by this one :+1:

mhechthz commented 2 years ago

You forgot 203 ;)

a-ma72 commented 1 year ago

I had the same problem. Obviously, in my case it was due to the environment variable HTTP_PROXY that was set. After I remove the variable, the terminal in Spyder works again.