-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Unable to load webview on iPad #4433
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
Comments
Thanks for the thorough report! This looks strangely similar to this issue. Can you try this solution? |
I tried it but it didn't solve my problem. I guess the issue has something to do with |
I captured some browser logs at the STEP 2, when the webviews are loaded properly. It might be worth a look. The log written in Korean could be translated as:
Below are the logs at STEP 3 and 4: Please note that the first two logs A few seconds later, right after I brought the app to the foreground, I saw the error messages saying the websocket connection is aborted. I'm not sure though whether it managed to recover the connection later. But since then my PWA app stops loading webviews on iPad. Refreshing the page doesn't help. UpdateI just found that restarting the PWA app partly solves the issue: it goes to STEP 2. However, restarting the app every time I open it would be bothersome. Do you see any possible causes for this issue here? Thanks. |
Hmm...could it be that your browser does not respect the authority of your certificate and that's causing it? 🤔
Hmm...nothing specific comes to mind. @code-asher any ideas? |
Well, Safari seems to fully trust (without any warning) the certificate at least for my domain. I don't know why Safari doesn't trust Even if that was the cause of the problem, it doesn't make sense to me that it fails to load webview only after resuming the app :( By any chance can you try reproducing this issue on your side? If it's confirmed that I'm the only one experiencing this issue, I might as well go through the setup process all over again. |
Unfortunately, I don't have the bandwidth to replicate the exact same environment setup. But what I can say is 3.12.0 works when deploying to Railway and accessing via the PWA on my iPad 14.8. Therefore I can confirm:
VideoRPReplay_Final1636049722.MP4 |
Thanks for the test! Steps to Reproduce
VideoThis is what happens on my side. RPReplay_Final1636520409.MP4 |
Wow, that was super easy to follow and it reproduced on mine! Nice catch! I wonder what's happening 🤔 We'll have to look into this. Do you know if this happens on vscode.dev? If it does, then it's an upstream bug. VideoRPReplay_Final1636563240.MP4 |
I'm glad to find out that I'm not the only one. 🥲
No, it does not happen on vscode.dev. Please refer to the test video attached below. A bigger issue for me is, being unable to load image means being unable to use any webview-based extentions, such as GitGraph. The browser log I posted above shows what happens when you open PWA again. If you need anything else about the log, feel free to ask. I really want to help solve the issue. Thank you. Test Video on vscode.devRPReplay_Final1636564096.MP4 |
Ah, that is a big issue.
Those will help a ton! I guess we'll have to dig into this further. @code-asher any ideas? We have some big priorities for getting the next release out but after that, we can take a look! |
Any idea if this reproduces with the upstream server we rebased on
yesterday?
|
Good question 🤔 I used to be able to test easily by running
I'm thinking out loud here and not sure the easiest way to test. I can take this one on but I probably won't do it until we get a new release out, which will be easy to test with Railway by using the latest Docker tag of code-server. |
@jsjoeio Upgrading from 3.12.0 to 4.1.0 seems to have fixed this issue. |
@shp7724 that's two issues you've helped with in the past 24 hours - thanks so much!! |
Similar to #4131, but without CSP error message.
OS/Web Information
code-server --version
: 3.12.0Steps to Reproduce
Expected
The images should show up.
Actual
When I click the image file, a blank new tab opens with nothing. In addition, I can't load details page of the extensions. Also, extensions using webview such as Gitgraph don't show up. Other than that, everything works as normal.
Logs
Result of
code-server --log debug
:Note that I sent the pwa app to the background at
2021-11-03T07:46:41.261Z
, and after 5 minutes, reopened the app at2021-11-03T07:51:34.493Z
.Screenshots comparing macOS Safari vs iPadOS Safari
Network log on macOS Safari when clicking an image
Please note that after
service_worker.js
is called,fake.html
,main.css
,main.js
,porto1_warped.png
is loaded sequentially. This is what should happen when loading an image.Network log on iPadOS Safari when clicking an image
On iPad, however, even after
service_worker.js
is called, nothing happens.Console log on iPadOS Safari when clicking an image
Every time I click an image file I see an error
Error while parsing the 'sandbox' attribute: 'allow-downloads' is an invalid sandbox flag.
but I don't think this is the main cause of the issue because the same error message appears in macOS Safari.Source log on iPadOS Safari when clicking an image
The image above shows Socket log each time I click the image file. It seems up and running. (It reads "Binary Frame" in Korean.)
Log when restarting code-server instance
Now with that pwa open, I tried restarting
code-server
, and then noticed an error message that wasn't there before.Notes
Thanks for maintaining this wonderful project. Any help would be greatly appreciated.
This issue can be reproduced in VS Code: No (tested in
vscode.dev
)The text was updated successfully, but these errors were encountered: