code-server: Code-server PWA hangs

OS/Web Information

  • Web Browser: Safari
  • Local OS: iPadOS 14.6
  • Remote OS: Raspbian Buster
  • Remote Architecture: arm64
  • code-server --version: 3.10.2

Steps to Reproduce

  1. SSH from iPad to Raspberry Pi and forward port 8080
  2. On iPad, open PWA from app icon
  3. PWA initializes but does not load the browser content

Expected

I should see the editor page appear.

Actual

Blank white screen below the iPad status bar.

Logs

I ran code-server --log trace, opened the PWA, and have attached the output.

Both the stderr and stdout logs were empty.

Screenshot

File Jun 04, 12 46 40 PM

Notes

There is no problem loading code-server in the Safari browser directly. Deleting and reinstalling the PWA makes no difference. Rebooting the iPad works for the first session. Subsequent sessions have the same issue. I attempted to run code-server --link to test but my connection latency exceeded the threshold.

This issue can be reproduced in VS Code: No

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

Refreshing the PWA with cmd+r fixes it for me as well. Finally!

I encountered the same problem on the same version iPadOS & ubuntu 18.04. Command-R works for me! Thanks a lot!

Team work made it happen! Glad we got it resolved.

Okay thats good then! Is it okay to close this issue then?

Sounds good to me. Thanks for the help!

Weird to hear about the secure thing though (and thanks for the thorough testing). I’m on macOS 11.3. I wonder if there was a change to how websites are considered secure or not

The windows machine had not been booted in a long time.

Thanks!!! I have the same problem with ubuntu 20.04 and iPadOS 14.6. cmd R saves the day!!

Could this be related to Blink then?

I thought that but I still have the problem if I serve it via --link and set the PWA via ***.cdr.co.

The problem is also strange in that often only manifests after opening and closing the PWA some number of times (as seen in the video). It also has been progressively worsening. By this I mean that the number of reload cycles for the PWA after which the screen blanks has been trending down.

When you SSH into your Pi and port forward 8080, this means you’re accessing code-server on your iPad insecurely (through HTTP), which is probably why things aren’t working as expected I think. Hopefully @code-asher can correct me if I’m wrong.

I don’t have a problem accessing http://localhost:8080 from the iPadOS Safari browser (possibly after firing a page reload) after port-forwarding so standard problems with an insecure server aren’t present.

No luck with npm - same behavior. I had code-server running well for 3-4 months using the .deb packages. The Pi has a 64 bit OS on it and all my compiler libraries seem recent enough.

Since I am seeing the same behavior on the iPad if I serve from my amd64 Linux machine via --link, I would be surprised if the Pi was part of the problem.

Next step is to see if upgrading to the iPadOS beta release will help.

How are you installing code-server on your Pi?

  • curl -fsSL https://code-server.dev/install.sh | sh for the current release.

  • curl -fOL https://github.com/cdr/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb for older releases.

P.S. - thank you for the detailed notes! Super helpful.

Thanks. Just let me know if there is anything I can do to be useful. Code-server is great.

Also, my “workaround” declaration was premature. The problem reemerged after installing an extension from the command line.

Update: tested from other OS’s both local and remote

OS Info (Now)

  • Web Browser: Safari
  • Local OS’s: iPadOS 14.6, macOS 11.4
  • Remote OS’s: Raspbian Buster, Ubuntu 20.04
  • Remote Architectures: arm64, amd64

Behavior

In addition to not rendering in the PWA, I noticed that on the initial load on the iPad that code-server would finish loading but fail to render the editor (either via port forwarding or --link). This problem would disappear if I reloaded the page. I looked at the behavior on macOS and it was the same but I can at least pull some data here. I have attached the html generated in the non-rendered and rendered cases.

In theory, I should be able to use Web Inspector on macOS Safari to pull this data for iPadOS Safari but I have not been to get this working for either iPadOS or iOS.

Notes

I purged code-server from the Raspberry Pi and reinstalled with the current release but the behavior did not change.

I tested on Chromium and Firefox (on Ubuntu 20.04 amd64) but things rendered fine on the initial load for both browsers from both remote machines. It may or may not be related but using the --link option Safari reports the page is not secure and prevents the web workers from loading whereas Chromium and Firefox report secure.

Workaround

Downgraded to v3.8 and things work again (so far) though not until after a reboot on the iPad.

Interesting! Okay, I will definitely take a look then and get back to you.

My connection calmed down and I was able to access a PWA installed running code-server --link. After passing through the GitHub authentication page, I saw the same behavior. Again, going through the browser directly wasn’t a problem (though I had to reload the page initially).

Hmm…interesting. I’ll have to see if I can reproduce. Usually this works for me:

  1. run code-server --link from macOS laptop
  2. access link on iPad

I have also had success deploying code-server with Railway and using the PWA on my iPad. Though I need to test 3.10.2. It should work though.

I’ll see if I can replicate.