code-server icon indicating copy to clipboard operation
code-server copied to clipboard

[Bug]: Problem opening .ipynb files (Jupyter Notebook)

Open c-dasq opened this issue 4 years ago • 45 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: Microsoft Edge / Chrome / Firefox / Vivaldi / Safari
  • Local OS: Windows 10.0.19044.1826 / macOS Big Sur 11.6.8
  • Remote OS: Raspberry Pi OS Lite (64-bit) 2022-04-04 (Kernel: 5.15 | Debian: 11 'bullseye')
  • Remote Architecture: arm64
  • code-server --version: 4.5.2

Steps to Reproduce

  1. open code-server
  2. try to open .ipynb file
  3. trying to create an .ipynb file

Expected

The file should open and be viewable

Actual

Code-server keeps trying to open the file, or creating the file, never finishes loading on screen.

Logs

No response

Screenshot/Video

image

Does this issue happen in VS Code or GitHub Codespaces?

  • [X] I cannot reproduce this in VS Code.
  • [X] I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • [X] I am using HTTPS.

Notes

No response

c-dasq avatar Aug 18 '22 19:08 c-dasq

Can you please complete the bug report template?

jsjoeio avatar Aug 18 '22 19:08 jsjoeio

same issue here

wolframalpha avatar Aug 19 '22 12:08 wolframalpha

I cannot reproduce locally. I'm testing using the the v4.6.0 release candidate

image

@wolframalpha do you see any logs in the console? are you using a reverse proxy?

jsjoeio avatar Aug 19 '22 15:08 jsjoeio

#5334 ?

Emporea avatar Aug 19 '22 20:08 Emporea

Will test with 4.6.0 as soon the docker image is out.

Emporea avatar Aug 19 '22 20:08 Emporea

@Emporea should be out now!

jsjoeio avatar Aug 19 '22 20:08 jsjoeio

I am really sorry, but this issue indeed still persists for me on 4.6.0. 4.4.0 is still the last version where this does not occur.

I am using nginx reverse proxy. I could try to test it without a proxy tomorrow.

Emporea avatar Aug 19 '22 21:08 Emporea

Also happens on Firefox Android. Screenshot_20220819-232822_Fennec~2

Emporea avatar Aug 19 '22 21:08 Emporea

@Emporea thanks for being quick to test! That is sad indeed.

I am using nginx reverse proxy. I could try to test it without a proxy tomorrow.

That would be helpful!

@code-asher are you able to reproduce?

jsjoeio avatar Aug 19 '22 22:08 jsjoeio

So I've just tested without reverse proxy, thus no https for now and then jupyter files dont even open on 4.4.0. But this is probably because I used http, right?

Emporea avatar Aug 19 '22 23:08 Emporea

I cannot reproduce locally. I'm testing using the the v4.6.0 release candidate

image

@wolframalpha do you see any logs in the console? are you using a reverse proxy?

The output from the log(window) shows these errors, can you please tell which specific logs you need image

And, yes the machine is behind a reverse proxy but can you please tell how is that related to extentions like jupyter and python(intellisense) not working as expected ?

wolframalpha avatar Aug 20 '22 08:08 wolframalpha

I was not able to reproduce with the codercom/code-server:4.6.0 Docker image through Firefox (version 91.11.0esr).

@wolframalpha "Can't compute sha-256" happens when crypto.subtle is not available which probably means the browser does not support it. Could you post your browser and browser version? Thanks!

@c-dasq and @Emporea could you confirm whether you see similar errors in the browser console or the Log (Window) output? (Ideally post the full output.) Thank you! It would also be helpful to check the network tab in the browser dev tools to see if anything is failing to load or hanging (I also recommend checking the "disable cache" box in the network tab to make sure it is not a caching issue).

https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle

code-asher avatar Aug 22 '22 16:08 code-asher

same issue

code-server: v4.5.1 Code: 1.68.1 Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630 Date: 2022-07-19T16:29:15.252Z Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

SoutherLea avatar Aug 26 '22 03:08 SoutherLea

Hi all, I was doing some tests, running code-server on two virtual machines with Debian v11.4 (clean install) and Ubuntu Server 22.04.1 (clean install), connected from Vivaldi 5.4 2753.40 (clean install) and always without HTTPS.

I found something curious, the bug only occurs when bind-addr is 0.0.0.0.0:8080 (whether or not to use password),

When bind-addr is 127.0.0.1.1:8080 and I use port forwarding with ssh (whether I use password or not); everything works normally:

code-server-port-forwarding-ssh

Apparently I must have PIP installed on the virtual machines as well.

c-dasq avatar Aug 28 '22 13:08 c-dasq

I could not reproduce this issue at https://demo.jupyter.b-data.ch (OS: Debian bullseye, Arch: amd64, code-server: v4.6.0); with none of my custom docker images.

I could not reproduce it running my custom docker images locally (OS: Debian bullseye, Arch: arm64, code-server: v4.6.0) either.

ℹ️ Extension versions: [email protected], [email protected].

  • Web Browser: Firefox 104.0 (64-bit)
  • Local OS: macOS 12.5.1 (Monterey)

benz0li avatar Aug 28 '22 18:08 benz0li

Hi all, I was doing some tests, running code-server on two virtual machines with Debian v11.4 (clean install) and Ubuntu Server 22.04.1 (clean install), connected from Vivaldi 5.4 2753.40 (clean install) and always without HTTPS.

code-server is required to be served via HTTPS to run code using service workers: Using Service Workers - Web APIs | MDN

I found something curious, the bug only occurs when bind-addr is 0.0.0.0.0:8080 (whether or not to use password),

When bind-addr is 127.0.0.1.1:8080 and I use port forwarding with ssh (whether I use password or not); everything works normally:

localhost is considered a secure origin by browsers as well.
ℹ️ This ~~seems to apply~~ applies for 127.0.0.1, the IP of localhost, too*.

*Tested with docker run --rm -it -p 8888:8888 registry.gitlab.b-data.ch/jupyterlab/python/base, accessing the server on both 127.0.0.1 and localhost.

benz0li avatar Aug 28 '22 18:08 benz0li

@benz0li Sorry but I think your input is nonsense and makes me angry for some reason. We get that you can't reproduce any of those issues we are facing. This always feels like you don't believe me or think that I am stupid or something.

I can reproduce with the instance you provided. With a fresh installed Fedora 36 and Firefox 104 without any modifications like add-ons etc. image

I told you already that I am not using mac. Maybe it has something to do with it.

Emporea avatar Aug 28 '22 20:08 Emporea

@benz0li [...] We get that you can't reproduce any of those issues we are facing. This always feels like you don't believe me or think that I am stupid or something.

I do not think you are stupid. I do not know whether you are a n00b or not.

I can reproduce with the instance you provided. With a fresh installed Fedora 36 and Firefox 104 without any modifications like add-ons etc.

@Emporea Please post the output from the browser's web console when you reload the page and open the Jupyter Notebook* using my deployment. 👉 [Firefox] Tools > Browser Tools > Web Developer Tools: Console || Keyboard shortcut Ctrl+Shift+K

*Please open about:debugging (> This Firefox) and about:serviceworkers in two separate browser tabs while doing so.
ℹ️ There should be two Service Workers (and two Other Workers) after spinning up code-server.

benz0li avatar Aug 29 '22 06:08 benz0li

I was not able to reproduce with the codercom/code-server:4.6.0 Docker image through Firefox (version 91.11.0esr).

@wolframalpha "Can't compute sha-256" happens when crypto.subtle is not available which probably means the browser does not support it. Could you post your browser and browser version? Thanks!

@c-dasq and @Emporea could you confirm whether you see similar errors in the browser console or the Log (Window) output? (Ideally post the full output.) Thank you! It would also be helpful to check the network tab in the browser dev tools to see if anything is failing to load or hanging (I also recommend checking the "disable cache" box in the network tab to make sure it is not a caching issue).

https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle

@code-asher I am using the latest version of chrome. There's an error in the output Log window, do you think that jupyter interface not loading might be an issue because it's not able to reach the URL? [2022-08-31 10:20:25.324] [window] [error] RequestService#request (browser) - error https://open-vsx.org/vscode/gallery/extensionquery {}

image

wolframalpha avatar Aug 31 '22 05:08 wolframalpha

@wolframalpha In your case: Another problem is, that you are not serving code-server via HTTPS. See https://github.com/coder/code-server/issues/5475#issuecomment-1229529712.

benz0li avatar Aug 31 '22 05:08 benz0li