Skip to content

[Bug]: Jupyter notebook blank page while accessing via nginx using a domain #4976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
Abdullah1224 opened this issue Mar 10, 2022 · 11 comments
Closed
3 tasks done
Labels
bug Something isn't working
Milestone

Comments

@Abdullah1224
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Safari
  • Local OS: macOS
  • Remote OS: CentOS
  • Remote Architecture: 64-bit
  • code-server --version: 4.1.0

Steps to Reproduce

  1. Install code-server
  2. Setup nginx
  3. Access code-server via nginx using a domain

Expected

when I deploy code-server on localhost or access code-server behind a proxy everything should work.

Actual

I am trying to run code-server to develop some jupyter notebooks, when I deploy code-server on localhost everything works as expected, however when I access code-server behind a proxy I get blank screen when I open jupyter notebook files.

Logs

No response

Screenshot/Video

this is the proxy setting:
image

this is when deploying on localhost:
image

this is when accessing it through nginx:
image

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

@Abdullah1224 Abdullah1224 added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Mar 10, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 10, 2022

this is the proxy setting:

can you post this as text?

I am using HTTPS.

You checked this box but it says "Not Secure" in your last screenshot 🤔

Can you please post the browser logs?

@jsjoeio jsjoeio added waiting-for-info Waiting for more information from submitter and removed bug Something isn't working triage This issue needs to be triaged by a maintainer labels Mar 10, 2022
@Abdullah1224
Copy link
Author

Abdullah1224 commented Mar 11, 2022

server {
	listen		443 ssl http2;
	listen		[::]:443 ssl http2;
	server_name	Node-7;
       root		/usr/share/nginx/html;
	ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
	ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
	ssl_dhparam /etc/ssl/certs/dhparam.pem;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
	ssl_prefer_server_ciphers on;
	ssl_ecdh_curve secp384r1;
	ssl_session_tickets off;
	ssl_stapling on;
	ssl_stapling_verify on;
	add_header X-Frame-Options DENY;
	add_header X-Content-Type-Options nosniff;
	
	include /etc/nginx/default.d/*.conf;
	location /vscode/ {
  	  rewrite /vscode/(,*)/$1 break;
	  proxy_pass http://localhost:8080/;
	  proxy_redirect off;
	  proxy_set_header Host $host;
	  proxy_set_header Origin "";
	  proxy_set_header Upgrade $http_upgrade;
	  proxy_set_header Connection upgrade;
	  proxy_set_header Accept-Encoding gzip;

	}
	error_page 404 /404.html;
		location = /40x.html {
		}

	error_page 500 502 503 504 /50x.html;
		location = /50x.html{
		}
}

@Abdullah1224
Copy link
Author

Web Browser: Safari
Web Browser: Google Chrome*
I apologize for the mistake

image

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 11, 2022

No worries!

Can you please post the browser logs?

@Abdullah1224
Copy link
Author

image

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 11, 2022

@Abdullah1224 it looks like it might have been cut off. Is there anyway you can copy all of it as text and post it?

@Abdullah1224
Copy link
Author

Abdullah1224 commented Mar 12, 2022

ERR Error while creating IndexedDB DOMException: The requested version (2) is less than the existing version (3).

INFO Using in-memory user data provider

ERR [Service Worker] registration DOMException: Failed to register a ServiceWorker for scope ('https://node-7/vscode/') with script ('https://node-7/vscode/service-worker.js'): An SSL certificate error occurred when fetching the script.

Refused to display 'https://node-7/' in a frame because it set 'X-Frame-Options' to 'deny'.

crbug/1173575, non-JS module files deprecated.
(anonymous) @ (index):6774

Extension Host] Git installation not found.
I @ console.ts:137

Refused to display 'https://node-7/' in a frame because it set 'X-Frame-Options' to 'deny'.

crbug/1173575, non-JS module files deprecated.
(anonymous) @ (index):6774

ERR [Extension Host] (node:22112) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

console.ts:137 [Extension Host] (node:22112) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
I @ console.ts:137


Refused to display 'https://node-7/' in a frame because it set 'X-Frame-Options' to 'deny'.

crbug/1173575, non-JS module files deprecated.
(anonymous) @ (index):6774


The Web Worker Extension Host did not start in 60s, that might be a problem.
(anonymous) @ webWorkerExtensionHost.ts:184

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 14, 2022

Refused to display 'https://node-7/' in a frame because it set 'X-Frame-Options' to 'deny'.

Guessing this is the issue. That does not look like a valid URL to me? More info on X-Frame-Options.

Any ideas on how we can help them debug this @code-asher ?

@benz0li
Copy link
Contributor

benz0li commented Mar 17, 2022

@Abdullah1224 Try setting X-Frame-Options SAMEORIGIN instead of X-Frame-Options DENY in your nginx.conf.

@aghasemi
Copy link

Hi. I can confirm that version 4.2.0 can correctly create a Jupyter notebook.

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 23, 2022

@aghasemi can't tell you how much we appreciate you following up 🙌🏼 That saves us a ton of time. Cheers!

@jsjoeio jsjoeio closed this as completed Mar 23, 2022
@jsjoeio jsjoeio added bug Something isn't working and removed waiting-for-info Waiting for more information from submitter labels Mar 23, 2022
@jsjoeio jsjoeio added this to the v4.2.0 milestone Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants