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

Safari 14 (macOS 11 / iOS 14) no longer able to load vscode interface

Open Torrekie opened this issue 1 year ago • 8 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: Safari 14.0.3 (16610.4.3.1.7)
  • Local OS: macOS 11.2.3 / iOS 14.5.1
  • Remote OS: macOS 11.2.3
  • Remote Architecture: arm64
  • code-server --version: 4.89.1 effc6e95b4ad1c5ac5f9083ec06663ba4a2e005c with Code 1.89.1

Steps to Reproduce

  1. Install code-server by npm i code-server --install-from-source -g, this shall build all required modules natively
  2. ~/node_modules/out/node/entry.js --bind-addr 0.0.0.0:8080
  3. Open localhost:8080 in Safari

Expected

The login page and VSCode page should be successfully loaded

Actual

While opening with Google Chrome, everything is fine.

While opening with Safari 14, VSCode page is completely white, error logs printed to remote console.

Logs

[18:08:08] Extension host agent started.
[18:08:08] Started initializing default profile extensions in extensions installation folder. file:///Users/torrekie/.local/share/code-server/extensions
[18:08:09] Completed initializing default profile extensions in extensions installation folder. file:///Users/torrekie/.local/share/code-server/extensions
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/browser/browser.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/browser/window.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/buffer.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/event.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/lifecycle.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/marshalling.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/path.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/network.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/resources.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/uri.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/base/common/strings.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/platform/product/common/product.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/platform/window/common/window.js
File not found: /Users/torrekie/node_modules/code-server/lib/vscode/out/vs/platform/tunnel/common/tunnel.js

Screenshot/Video

image image

Opening with Google Chrome is fine: image

Does this bug reproduce in native VS Code?

I did not test native VS Code

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?

  • [ ] I am using a secure context.

Notes

No response

Torrekie avatar May 21 '24 10:05 Torrekie

The problem seems likely to be upstream in VS Code; I recommend testing vscode.dev and GitHub Codespaces and if it reproduces there then report in https://github.com/microsoft/vscode

If it does not reproduce in either of those places though, we will have to see if code-server is doing something different here. I am not sure what it could be though.

code-asher avatar May 21 '24 18:05 code-asher

confirmed it is upstream bug and created new issue under https://github.com/microsoft/vscode/issues/213143

tested [email protected] with my Safari and everything is fine. Can I keep this issue open for tracing purposes?

Torrekie avatar May 22 '24 09:05 Torrekie

confirmed it is upstream bug and created new issue

Awesome, thank you!

tested [email protected] with my Safari and everything is fine. Can I keep this issue open for tracing purposes?

Yup, that sounds good to me.

code-asher avatar May 22 '24 19:05 code-asher

is it possible to build latest code-server with older vscode? Is there any instructions for doing this?

Torrekie avatar May 23 '24 06:05 Torrekie

After cloning code-server you can check out whatever branch you want of the VS Code sub-module.

However, it will be unlikely that the patch files will apply to older versions, so you may have to do a lot of conflict resolution.

code-asher avatar May 23 '24 20:05 code-asher

If you want to try this, the instructions would be the same as updating VS Code, just you are downgrading the submodule instead of upgrading: https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md#version-updates-to-code

code-asher avatar May 23 '24 20:05 code-asher

is there any way to prevent rebuilding? This takes over 40 minutes per build

yarn run v1.22.19
warning ../../package.json: No license field
$ ./ci/build/build-vscode.sh --verbose
warning ../../../../package.json: No license field
$ node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js -LLLL vscode-reh-web-linux-x64-min
{"type":"warning","data":"../../../../package.json: No license field"}
{"type":"warning","data":"../../../../package.json: No license field"}
{"type":"warning","data":"../../../../package.json: No license field"}
{"type":"warning","data":"../../../../package.json: No license field"}
{"type":"warning","data":"../../../../package.json: No license field"}
{"type":"warning","data":"../../../../package.json: No license field"}
(node:2975) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[15:48:08] Using gulpfile ~/proj/code-server/lib/vscode/gulpfile.js
[15:48:08] Starting 'vscode-reh-web-linux-x64-min'...
[15:48:08] Starting clean-out-build ...
[15:48:08] Finished clean-out-build after 528 ms
[15:48:08] Starting build-web-node-paths ...
[15:48:08] Finished build-web-node-paths after 3 ms
[15:48:08] Starting compile-api-proposal-names ...
[15:48:08] Starting compilation api-proposal-names...
[15:48:08] Finished compilation api-proposal-names with 0 errors after 31 ms
[15:48:08] Finished compile-api-proposal-names after 35 ms
[15:48:08] Starting compile-src ...
[15:48:17] [mangler] Done collecting. Classes: 7616. Exported symbols: 9261
[15:48:17] [mangler] Done creating class replacements
[15:48:17] [mangler] Starting prepare rename edits
[15:48:18] Starting compilation...
[16:16:09] [mangler] Done preparing edits: 3719 files
[16:16:17] [mangler] Done: 4714.336kb saved, memory-usage: {"total_heap_size":2080604160,"total_heap_size_executable":11304960,"total_physical_size":2079178752,"total_available_size":6611867936,"used_heap_size":1985923416,"heap_size_limit":8640266240,"malloced_memory":1328232,"peak_malloced_memory":19938304,"does_zap_garbage":0,"number_of_native_contexts":2,"number_of_detached_contexts":0,"total_global_handles_size":4595712,"used_global_handles_size":1805120,"external_memory":100330469}
[16:18:14] Finished compilation with 0 errors after 1795930 ms
[16:18:14] Finished compile-src after 1805269 ms
[16:18:14] Starting compile-build ...
[16:18:14] Finished compile-build after 11 ms
[16:18:14] Starting clean-extensions-build ...
[16:18:14] Finished clean-extensions-build after 6 ms
[16:18:14] Starting bundle-marketplace-extensions-build ...
[16:18:14] Downloading extension from GH: [email protected] ...
[16:18:14] Downloading extension from GH: [email protected] ...
[16:18:14] Downloading extension from GH: [email protected] ...
[16:23:55] 'vscode-reh-web-linux-x64-min' errored after 36 min
[16:23:55] AbortError: This operation was aborted
    at new DOMException (node:internal/per_context/domexception:53:5)
    at AbortController.abort (node:internal/abort_controller:395:18)
    at Timeout._onTimeout (/Users/torrekie/proj/code-server/lib/vscode/build/lib/fetch.js:44:53)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Torrekie avatar May 26 '24 08:05 Torrekie

VS Code does not seem to support incremental building, at least not last time I checked.

code-asher avatar May 28 '24 17:05 code-asher

This issue has been marked as 'upstream:vscode'. Please file this upstream: link to open issue This issue will automatically close in 5 seconds.

repo-ranger[bot] avatar Jul 12 '24 00:07 repo-ranger[bot]

I marked it as an upstream issue, but if someone does patch it I would be happy to merge since we do patch some other Safari stuff.

code-asher avatar Jul 12 '24 00:07 code-asher