Skip to content

HTTPS Blank Screen / Disconnected iPadOS #1596

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
dreamorosi opened this issue May 3, 2020 · 12 comments
Closed

HTTPS Blank Screen / Disconnected iPadOS #1596

dreamorosi opened this issue May 3, 2020 · 12 comments

Comments

@dreamorosi
Copy link

I am trying to run code-server (as npm package) on a Raspberry Pi and accessing it from LAN on an iPad.

This same setup works correctly if I try to access the editor via browser on my laptop.

This happens on an actual iPad running iPadOS 13.4.1, if I try to visit the website from Mac using the iPad User Agent (as described here) everything works normally.

I am fairly confident it's not a certificate issue as the certificate, while being self-signed has been created, installed and trusted according to what described in issue #1566, and ultimately according to Apple's own requirements for certificates; as a matter of fact, if I visit other websites on the same host via HTTPS I don't get any security notice.

I have tried both with --auth password and --auth none and there are slight differences but none of the two works. In the case of custom password I am able to reach the login screen but once logged in I get to a blank screen.
In the case of no password I am instead able to load the editor but after a few milliseconds the host appears to disconnect (the green bar at the bottom left reads: Disconnected:....).

I have also tried with different combinations of --bind-addr with values: 127.0.0.1, 0.0.0.0 and 192.168.1.84 (local address of the Raspberry Pi). Likewise, I have also tried to not set up any certificate and use a reverse proxy with NGINX but that also didn't work.

The only configuration that seems to load on iPadOS is without HTTPS and without reverse proxy but in that case the editor is pretty useless as the clipboard is disabled.

I have scoured the repository for similar issues (and the subreddit) but I have only found partial and contradicting info.

Below the log traces, I would really appreciate your help and I am willing to do any test needed.

stdout:

export PASSWORD=mypass && code-server --disable-updates --cert /etc/ssl/localcerts/code.crt --cert-key /etc/ssl/localcerts/code.key --bind-addr 192.168.1.84:5555 --log trace
debug spawned inner process 6237
debug parsed command line {"args":{"_":[],"disable-updates":true,"cert":{"value":"/etc/ssl/localcerts/code.crt"},"cert-key":"/etc/ssl/localcerts/code.key","bind-addr":"192.168.1.84:5555","log":"trace"}}
debug wrapper 6230 received message from 6237 {"message":{"type":"handshake"}}
debug inner process 6237 received message from 6230 {"message":{"type":"handshake"}}
info  code-server 3.2.0-rc.4 1a62f467e0067d2f3b454c21adb8f0580b47ae40
info  HTTP server listening on https://192.168.1.84:5555
info    - Using custom password for authentication
info    - Using provided certificate and key for HTTPS
info  Automatic updates are disabled
trace heartbeat
debug redirecting {"secure":true,"from":"/","to":"./login?to=%2F"}
debug redirecting {"secure":true,"from":"/login?to=%2F","to":"./"}
debug forking vs code...
debug got message from vs code {"message":{"type":"ready"}}
debug setting up vs code...
debug vscode got message from code-server {"message":{"type":"init","id":"0OHrrUqW4fbGKmennZjkWy0a","options":{"args":{"_":[],"disable-updates":true,"cert":{"value":"/etc/ssl/localcerts/code.crt"},"cert-key":"/etc/ssl/localcerts/code.key","bind-addr":"192.168.1.84:5555","log":"trace","verbose":true,"user-data-dir":"/home/pi/.local/share/code-server","extensions-dir":"/home/pi/.local/share/code-server/extensions"},"remoteAuthority":"raspberrypi.local:5555","startPath":{"url":"/home/pi/Codes/stuff","workspace":false}}}}
[server] storing proxy {"proxyId":"child_process"}
[server] storing proxy {"proxyId":"fs"}
[server] storing proxy {"proxyId":"net"}
debug got message from vs code {"message":{"type":"options","id":"0OHrrUqW4fbGKmennZjkWy0a","options":{"workbenchWebConfiguration":{"folderUri":{"$mid":1,"path":"/home/pi/Codes/stuff","scheme":"vscode-remote","authority":"raspberrypi.local:5555"},"remoteAuthority":"raspberrypi.local:5555","logLevel":0,"workspaceProvider":{"payload":[["userDataPath","/home/pi/.local/share/code-server"]]}},"remoteUserDataUri":{"$mid":1,"path":"/home/pi/.local/share/code-server","scheme":"vscode-remote","authority":"raspberrypi.local:5555"},"productConfiguration":{"nameShort":"Code - OSS","nameLong":"Code - OSS","applicationName":"code-oss","dataFolderName":".vscode-oss","win32MutexName":"vscodeoss","licenseName":"MIT","licenseUrl":"https://github.com/Microsoft/vscode/blob/master/LICENSE.txt","win32DirName":"Microsoft Code OSS","win32NameVersion":"Microsoft Code OSS","win32RegValueName":"CodeOSS","win32AppId":"{{E34003BB-9E10-4501-8C11-BE3FAA83F23F}","win32x64AppId":"{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}","win32UserAppId":"{{C6065F05-9603-4FC4-8101-B9781A25D88E}","win32x64UserAppId":"{{C6065F05-9603-4FC4-8101-B9781A25D88E}","win32AppUserModelId":"Microsoft.CodeOSS","win32ShellNameShort":"C&ode - OSS","darwinBundleIdentifier":"com.visualstudio.code.oss","linuxIconName":"com.visualstudio.code.oss","licenseFileName":"LICENSE.txt","reportIssueUrl":"https://github.com/cdr/code-server/issues/new","urlProtocol":"code-oss","extensionAllowedProposedApi":["ms-vscode.references-view"],"commit":"1a62f467e0067d2f3b454c21adb8f0580b47ae40","date":"2020-04-30T13:07:16Z","version":"1.44.2","extensionsGallery":{"serviceUrl":"https://extensions.coder.com/api","itemUrl":"","controlUrl":"","recommendationsUrl":""}},"nlsConfiguration":{"locale":"en","availableLanguages":{}},"commit":"1a62f467e0067d2f3b454c21adb8f0580b47ae40"}}}
debug vscode got message from code-server {"message":{"type":"socket","query":{"type":"Management","reconnectionToken":"eba8667d-f51e-4a21-b15c-160ab23ca72f","reconnection":"false","skipWebSocketFrames":"false"}}}
^Cdebug inner process 6237 disposing {"code":"SIGINT"}
debug wrapper 6230 disposing {"code":"SIGINT"}

log:

[2020-05-03 17:51:53.738] [remoteagent] [trace] telemetry/optInStatus {"properties":{"common.machineId":"42ce04f6da0ad10f79a7e713e794777b7706ff5b11fc031ab71856d339ed00b9","sessionID":"7b3f967f-7851-4e79-838b-047760b5c9191588521113709","commitHash":"1a62f467e0067d2f3b454c21adb8f0580b47ae40","version":"1.44.2","common.platformVersion":"4.19.97","common.platform":"Linux","common.nodePlatform":"linux","common.nodeArch":"arm","common.product":"code-server","timestamp":"2020-05-03T15:51:53.734Z"},"measurements":{"optIn":1,"common.timesincesessionstart":25,"common.sequence":0}}
[2020-05-03 17:51:53.788] [remoteagent] [trace] telemetry/optInStatus {"optIn":true}
[2020-05-03 17:51:53.789] [remoteagent] [trace] telemetry/machineIdFallback {"properties":{"common.machineId":"42ce04f6da0ad10f79a7e713e794777b7706ff5b11fc031ab71856d339ed00b9","sessionID":"7b3f967f-7851-4e79-838b-047760b5c9191588521113709","commitHash":"1a62f467e0067d2f3b454c21adb8f0580b47ae40","version":"1.44.2","common.platformVersion":"4.19.97","common.platform":"Linux","common.nodePlatform":"linux","common.nodeArch":"arm","common.product":"code-server","timestamp":"2020-05-03T15:51:53.788Z"},"measurements":{"usingFallbackGuid":0,"common.timesincesessionstart":79,"common.sequence":1}}
[2020-05-03 17:51:53.793] [remoteagent] [trace] telemetry/machineIdFallback {"usingFallbackGuid":false}
[2020-05-03 17:51:53.799] [remoteagent] [error] [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/pi/.local/share/code-server/Machine'
[2020-05-03 17:52:01.330] [remoteagent] [trace] Started scanning system extensions
[2020-05-03 17:52:01.331] [remoteagent] [trace] Started scanning user extensions
[2020-05-03 17:52:01.333] [remoteagent] [trace] Started scanning system extensions
[2020-05-03 17:52:01.333] [remoteagent] [trace] Started scanning user extensions
[2020-05-03 17:52:01.334] [remoteagent] [trace] Started scanning system extensions
[2020-05-03 17:52:01.334] [remoteagent] [trace] Started scanning user extensions
[2020-05-03 17:52:01.345] [remoteagent] [trace] telemetry/keyboardLayout {"properties":{"common.machineId":"42ce04f6da0ad10f79a7e713e794777b7706ff5b11fc031ab71856d339ed00b9","sessionID":"7b3f967f-7851-4e79-838b-047760b5c9191588521113709","commitHash":"1a62f467e0067d2f3b454c21adb8f0580b47ae40","version":"1.44.2","common.platformVersion":"4.19.97","common.platform":"Linux","common.nodePlatform":"linux","common.nodeArch":"arm","common.product":"code-server","timestamp":"2020-05-03T15:52:01.345Z"},"measurements":{"common.timesincesessionstart":7636,"common.sequence":2}}
[2020-05-03 17:52:01.348] [remoteagent] [trace] telemetry/keyboardLayout {"currentKeyboardLayout":null}
[2020-05-03 17:52:01.348] [remoteagent] [trace] telemetry/textmodelresolveruri {"properties":{"common.machineId":"42ce04f6da0ad10f79a7e713e794777b7706ff5b11fc031ab71856d339ed00b9","sessionID":"7b3f967f-7851-4e79-838b-047760b5c9191588521113709","commitHash":"1a62f467e0067d2f3b454c21adb8f0580b47ae40","version":"1.44.2","common.platformVersion":"4.19.97","common.platform":"Linux","common.nodePlatform":"linux","common.nodeArch":"arm","common.product":"code-server","timestamp":"2020-05-03T15:52:01.348Z"},"measurements":{"query":1,"fragment":0,"common.timesincesessionstart":7639,"common.sequence":3}}
[2020-05-03 17:52:01.351] [remoteagent] [trace] telemetry/textmodelresolveruri {"query":true,"fragment":false}
[2020-05-03 17:52:01.352] [remoteagent] [trace] telemetry/workspaceLoad {"properties":{"userAgent":"Mozilla/5.0 (iPad; CPU OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1","theme":"vs","language":"en","pinnedViewlets":"[\"workbench.view.sync\",\"workbench.view.remote\",\"workbench.view.extension.references-view\",\"workbench.view.explorer\",\"workbench.view.search\",\"workbench.view.scm\",\"workbench.view.debug\",\"workbench.view.extensions\"]","restoredViewlet":"workbench.view.explorer","common.machineId":"42ce04f6da0ad10f79a7e713e794777b7706ff5b11fc031ab71856d339ed00b9","sessionID":"7b3f967f-7851-4e79-838b-047760b5c9191588521113709","commitHash":"1a62f467e0067d2f3b454c21adb8f0580b47ae40","version":"1.44.2","common.platformVersion":"4.19.97","common.platform":"Linux","common.nodePlatform":"linux","common.nodeArch":"arm","common.product":"code-server","timestamp":"2020-05-03T15:52:01.351Z"},"measurements":{"windowSize.innerHeight":698,"windowSize.innerWidth":1024,"windowSize.outerHeight":768,"windowSize.outerWidth":1024,"emptyWorkbench":0,"workbench.filesToOpenOrCreate":0,"workbench.filesToDiff":0,"customKeybindingsCount":0,"restoredEditors":1,"startupKind":1,"common.timesincesessionstart":7642,"common.sequence":4}}
[2020-05-03 17:52:01.355] [remoteagent] [trace] telemetry/workspaceLoad {"userAgent":"Mozilla/5.0 (iPad; CPU OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1","windowSize":{"innerHeight":698,"innerWidth":1024,"outerHeight":768,"outerWidth":1024},"emptyWorkbench":false,"workbench.filesToOpenOrCreate":0,"workbench.filesToDiff":0,"customKeybindingsCount":0,"theme":"vs","language":"en","pinnedViewlets":["workbench.view.sync","workbench.view.remote","workbench.view.extension.references-view","workbench.view.explorer","workbench.view.search","workbench.view.scm","workbench.view.debug","workbench.view.extensions"],"restoredViewlet":"workbench.view.explorer","restoredEditors":1,"startupKind":1}
[2020-05-03 17:52:01.428] [remoteagent] [error] [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/pi/.local/share/code-server/Machine'
[2020-05-03 17:52:01.428] [remoteagent] [error] [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/pi/.local/share/code-server/Machine'
[2020-05-03 17:52:01.456] [remoteagent] [trace] Scanned user extensions: 1
[2020-05-03 17:52:01.483] [remoteagent] [trace] Scanned user extensions: 1
[2020-05-03 17:52:01.504] [remoteagent] [trace] Scanned user extensions: 1
[2020-05-03 17:52:01.614] [remoteagent] [trace] telemetry/activatePlugin {"properties":{"id":"vscode.theme-defaults","name":"theme-defaults","publisherDisplayName":"vscode","themeId":"vs-dark vscode-theme-defaults-themes-dark_plus-json","common.machineId":"42ce04f6da0ad10f79a7e713e794777b7706ff5b11fc031ab71856d339ed00b9","sessionID":"7b3f967f-7851-4e79-838b-047760b5c9191588521113709","commitHash":"1a62f467e0067d2f3b454c21adb8f0580b47ae40","version":"1.44.2","common.platformVersion":"4.19.97","common.platform":"Linux","common.nodePlatform":"linux","common.nodeArch":"arm","common.product":"code-server","timestamp":"2020-05-03T15:52:01.613Z"},"measurements":{"isBuiltin":1,"common.timesincesessionstart":7904,"common.sequence":5}}
[2020-05-03 17:52:01.618] [remoteagent] [trace] telemetry/activatePlugin {"id":"vscode.theme-defaults","name":"theme-defaults","isBuiltin":true,"publisherDisplayName":"vscode","themeId":"vs-dark vscode-theme-defaults-themes-dark_plus-json"}
[2020-05-03 17:52:01.879] [remoteagent] [trace] [File Watcher (chokidar)] Start watching with chockidar: /home/pi/Codes/stuff, excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/.hg/store/**,**/node_modules/**,**/*.asar, usePolling: false
[2020-05-03 17:52:01.891] [remoteagent] [trace] telemetry/activatePlugin {"properties":{"id":"vscode.vscode-theme-seti","name":"vscode-theme-seti","publisherDisplayName":"vscode","themeId":"vscode.vscode-theme-seti-vs-seti","common.machineId":"42ce04f6da0ad10f79a7e713e794777b7706ff5b11fc031ab71856d339ed00b9","sessionID":"7b3f967f-7851-4e79-838b-047760b5c9191588521113709","commitHash":"1a62f467e0067d2f3b454c21adb8f0580b47ae40","version":"1.44.2","common.platformVersion":"4.19.97","common.platform":"Linux","common.nodePlatform":"linux","common.nodeArch":"arm","common.product":"code-server","timestamp":"2020-05-03T15:52:01.890Z"},"measurements":{"isBuiltin":1,"common.timesincesessionstart":8181,"common.sequence":6}}
[2020-05-03 17:52:01.894] [remoteagent] [trace] telemetry/activatePlugin {"id":"vscode.vscode-theme-seti","name":"vscode-theme-seti","isBuiltin":true,"publisherDisplayName":"vscode","themeId":"vscode.vscode-theme-seti-vs-seti"}
[2020-05-03 17:52:01.904] [remoteagent] [trace] Scanned system extensions: 79
[2020-05-03 17:52:01.944] [remoteagent] [trace] Scanned system extensions: 79
[2020-05-03 17:52:01.989] [remoteagent] [trace] Scanned system extensions: 79
@nhooyr
Copy link
Contributor

nhooyr commented May 3, 2020

I believe the problem is that WebSockets don't work on iPad with a self signed certificate. That's why you can access the login screen but not actually use code-server. cc @code-asher

@nhooyr
Copy link
Contributor

nhooyr commented May 3, 2020

Might be a bug we should report to apple.

@code-asher
Copy link
Member

Yeah that's my understanding as well. I wonder if when you choose to allow the browser to access an insecure site that choice just isn't applied to websockets for some reason.

@dreamorosi
Copy link
Author

Thank you both for replying.

Other users in #1566 report that using a self-signed certificate with iOS should be possible provided that it’s created with the proper settings.

I have found contradicting reports online about the topic and some of them are years old.

I will try what described in that issue and if it doesn’t work I’ll close the issue.

@nhooyr
Copy link
Contributor

nhooyr commented May 5, 2020

Sounds good.

@nhooyr
Copy link
Contributor

nhooyr commented May 18, 2020

Lets just use #1566 for this.

@nhooyr nhooyr closed this as completed May 18, 2020
@dreamorosi
Copy link
Author

@nhooyr I would request to reopen the issue and potentially rename it. I am now able to connect and see/interact with the editor 100% of the times but after a few seconds the editor reads "Disconnected from...." at the bottom and everything stops working.

I believe this might be a separate issue from the blank screen/certificate one.

If you think it's better I can also open a new issue.

@nhooyr
Copy link
Contributor

nhooyr commented Jun 22, 2020

Hmm, a self signed certificate for you works now?

If so, please open a new issue indeed!

@dreamorosi
Copy link
Author

Hmm, a self signed certificate for you works now?

If so, please open a new issue indeed!

Yea, I mean, the blank/white screen issue is kinda weird and it doesn’t happen at least when I login the first time. Anyway I’ll try to do a screen recording in the next day if I have some time and show you in a new issue.
Thanks!

@Yosemitebear
Copy link

@nhooyr I would request to reopen the issue and potentially rename it. I am now able to connect and see/interact with the editor 100% of the times but after a few seconds the editor reads "Disconnected from...." at the bottom and everything stops working.

I believe this might be a separate issue from the blank screen/certificate one.

having the same problem "Disconnected from" as you described, have u solved that? thanks in advance

@dreamorosi
Copy link
Author

@Yosemitebear, didn't solve it and gave up on the project.

@nhooyr
Copy link
Contributor

nhooyr commented Jan 13, 2021

This is in fact solved. See the docs at https://github.com/cdr/code-server/blob/v3.8.0/doc/ipad.md#how-to-access-code-server-with-a-self-signed-certificate-on-ipad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants