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

[Bug]: Firefox not showing Jupyter file

Open Emporea opened this issue 3 years ago • 30 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: Firefox 102
  • Local OS: Win10
  • Remote OS: Ubuntu Focal
  • Remote Architecture: 86
  • code-server --version: 4.5.0 (About shows 4.4.0)

Steps to Reproduce

  1. Setup new docker instance
  2. Create test.ipynb file (doesnt matter if vscode-jupyter is installed or not)
  3. Open file with Firefox

Expected

Should show cells and Html Rendering

Actual

Endless Loading

Logs

Firefox Console (other browsers do not show this)


Uncaught (in promise) Error: Unable to write file 'vscode-log:/20220712T210007/window.log' (Error: IndexedDB database 'vscode-web-db' is closed.)
    h https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:9
    L https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:593
    writeFile https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:597
    _log https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:598
    consume https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:71
    queue https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:71
    queue https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:71
    _log https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:597
    error https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:597
    error https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:597
    _log https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:597
    error https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:597
    handleUnexpectedError https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:3072
    registerErrorHandler https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:3072
    onUnexpectedError https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:8
    R https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:8
    registerErrorHandler https://example.tld/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:3072
3 errors.ts:235
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. example.tld
The web worker extension host is started in a same-origin iframe! webWorkerExtensionHost.ts:111:11
 INFO [Service Worker] registered log.ts:301:11
An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can remove its sandboxing. example.tld
The character encoding of a framed document was not declared. The document may appear different if viewed without the document framing it. webWorkerExtensionHostIframe.html
An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can remove its sandboxing. example.tld

Screenshot/Video

Firefox ( also tested with new installation / different machine / vm etc.): Screenshot 2022-07-12 204315

Other Browsers I tested (Opera, Chrome, Vivaldi, in this screenshot Edge) Screenshot 2022-07-12 204122

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

Emporea avatar Jul 12 '22 18:07 Emporea

yeah this is happening with 4.5.0 but not 4.4.0 in Chrome, Safari, and Firefox. I just tried both side-by-side with fresh docker-based installs. for what it's worth the 4.5.0 version also carries with it newer versions of the Jupyter extension. I tried downgrading to v2022.3.1000901801 with 4.5.0 but it didn't fix the problem. The Terminal also didn't work with 4.5.0.

mathematicalmichael avatar Jul 12 '22 20:07 mathematicalmichael

Can confirm that this bug doesn't occur on 4.4.0

But I dont get how it can only affect one browser.

Emporea avatar Jul 12 '22 21:07 Emporea

Is this a duplicate of https://github.com/coder/code-server/issues/5335? Or are they somehow related?

jsjoeio avatar Jul 18 '22 22:07 jsjoeio

@jsjoeio I don't know how they are related (atleast they share downgrading to 4.4.0 as a workaround), but this is definitly not a duplicate.

Emporea avatar Jul 18 '22 22:07 Emporea

Ah got it. Okay We'll investigate!

jsjoeio avatar Jul 18 '22 22:07 jsjoeio

@Emporea for me it is impacting all browsers I have installed. @jsjoeio thank you very much for investigating! 4.4.0 is the first version where Jupyter notebooks actually function and it makes me so happy to finally be able to use code-server exclusively for my work.

mathematicalmichael avatar Jul 20 '22 03:07 mathematicalmichael

Is this a duplicate of #5335?

No.

Or are they somehow related?

No, they are not.

benz0li avatar Jul 20 '22 06:07 benz0li

@mathematicalmichael hooray! that's great to hear.

We really need to add some e2e tests for Jupyter. I'm going to add this to the next sprint.

jsjoeio avatar Jul 20 '22 16:07 jsjoeio

FYI code-server 4.5.1 is working fine with [email protected] and [email protected].

benz0li avatar Jul 21 '22 08:07 benz0li

@Emporea @mathematicalmichael Please test again with code-server 4.5.1.

Most probably related to https://github.com/coder/code-server/issues/5321.

benz0li avatar Jul 21 '22 08:07 benz0li

Hooray! Thank you @benz0li for testing and confirming!

jsjoeio avatar Jul 21 '22 16:07 jsjoeio

~Its working with 4.5.1. Thanks.~

Emporea avatar Jul 21 '22 16:07 Emporea

Wait. Its not. huh.. It opened one time, but had the same bug after that again.

Emporea avatar Jul 21 '22 16:07 Emporea

@Emporea Use Firefox to log into https://demo.jupyter.b-data.ch.

If it does not work, it might be a problem with your Firefox settings or extensions.

benz0li avatar Jul 21 '22 16:07 benz0li

I removed the docker container and recreated it and now its working so far. I hope it stays that way, cause i did that already several times, so it seems inconsistent for me. But thanks for solving it in theory.

Emporea avatar Jul 21 '22 16:07 Emporea

But thanks for solving it in theory.

It runs just smoothly [also in practice] at https://demo.jupyter.b-data.ch 😉.

benz0li avatar Jul 21 '22 16:07 benz0li

Sometimes its working. Sometimes not. With 4.4.0 its working everytime.

Emporea avatar Jul 21 '22 17:07 Emporea

Use Firefox to log into https://demo.jupyter.b-data.ch/.

@Emporea are you seeing the same results here?

jsjoeio avatar Jul 21 '22 17:07 jsjoeio

The demo is also not working.

Emporea avatar Jul 21 '22 18:07 Emporea

The demo is also not working.

@Emporea It is a problem with your Firefox settings or extensions, then.

benz0li avatar Jul 21 '22 18:07 benz0li

Whatever. The inconsistency makes it super hard to understand and to describe. You probably think i am a noob. Well I stay on 4.4.0 for a while and see if the inconsistencies also occur there.

Emporea avatar Jul 21 '22 18:07 Emporea

See also https://github.com/coder/code-server/issues/4777#issuecomment-1023511535 about private/incognito mode [and possibly opening a folder (File > Open Folder...) before opening a Jupyter notebook].

benz0li avatar Jul 22 '22 06:07 benz0li

@Emporea not a noob! Just trying to help. Any other information you can share is helpful, otherwise I will try reproducing

jsjoeio avatar Jul 22 '22 17:07 jsjoeio

I have a containerized environment that launches in the cloud (free) via binder here: https://mybinder.org/v2/gh/ml-starter-packs/microservice-workshop/main?urlpath=vscode/ (Dockerfile).

latest commit pins codeserver to 4.5.1, and I found

  • [ ] terminal functioning as expected
  • [ ] notebooks working

mathematicalmichael avatar Jul 22 '22 17:07 mathematicalmichael

hm... unfortunately I got a weird error trying to even install extensions in the first place image

don't know if it's related... but I tried 4.4.0 yesterday and it was fine. I'll try rolling back the commit and seeing if the behavior occurs again (is it MS-extensions related or code-server related?)

mathematicalmichael avatar Jul 22 '22 18:07 mathematicalmichael

image

Weird, I'm seeing the same 🤔 open-vsx was down yesterday. maybe related?

Yeah, when i search for any extension i see the same error:

image

Looking at the network requests, it appears to be returning a 503

image

jsjoeio avatar Jul 22 '22 18:07 jsjoeio

oh okay, so not related to code-server?

sidenote: i love that you can reproduce the errors on your own thanks to binder... what an age we live in.

thank you so much for looking into it!

mathematicalmichael avatar Jul 22 '22 18:07 mathematicalmichael

oh okay, so not related to code-server?

correct! @benz0li opened an issue upstream: https://github.com/eclipse/openvsx/issues/497

sidenote: i love that you can reproduce the errors on your own thanks to binder... what an age we live in.

right?! crazy! though props to you for giving me the binder link to be able to reproduce so easily 🙌🏼

jsjoeio avatar Jul 22 '22 19:07 jsjoeio

4.5.1 still only works occasionally regarding the "jupyterlab notebook not rendering" 4.4.0 works everytime.

It cant be my firefox alone.

Emporea avatar Jul 22 '22 19:07 Emporea

I'm on 4.5.1 on macOS and I cannot reproduce 😢

Screenshot

image

Related

This looks like the exact same issue upstream, right?

https://github.com/microsoft/vscode/issues/132102

Maybe worth dropping a comment on that.

jsjoeio avatar Jul 22 '22 20:07 jsjoeio