-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Error opening images on remotes #98768
Comments
@chrisdias I extracted this to a new issue. I can reproduce this with containers as well |
Still happening for me on wsl. @alexdima When you have a chance, can you please look at my comment b84597e#commitcomment-39521095. @deepak1556 @bpasero Unless there is a simple fix, I think we need to revert the work to move the webview resource protocol to the main process. The change has been much more complicated than I anticipated and it is late in the release cycle. Since we are still on electron 7, I don't anticipate this revert to cause any issues problems. We will still have to solve this problem for June @deepak1556 I just want to check again if there is any way we can get service workers supported in our webviews? The service worker based approach we use to implement webviews on the web is quite elegant |
This only appears to work in very specific case
I am lacking context on the problem for remote scenario, @mjbvz can you please explain what is it we are trying to achieve via the render process that is not possible now with protocol handlers in the main process ? |
In remote scenarios, files in the workspace have urls such as:
We can read uris that have the |
Thanks for the context @mjbvz IIUC, previously for remote schemes the data is obtained over the RemoteFileSystemProvider that is registered in the render process and was served over the webview resource protocol handler that was also registered in the render process, is that correct ? Some thoughts,
Now given this is a considerable refactor, I am fine with reverting the protocol change for this iteration and continuing the work in June.
Service workers for custom protocol are not in a working state for a while now, it will take some effort to get this working. But I am confident for the problem in hand, the solution can be achieved without relying on service workers. |
@mjbvz I believe the solution is to call |
Thanks @alexdima! I tried this but it looks like
I'm checking in the change that moves us back to using the render side |
@mjbvz wouldn't it be better to have this issue open until the root issue is fixed in next iteration. |
@deepak1556 I've reopened #89038 to track switching back over to use a protocol from the main process. I want someone to verify that this issue has been fixed for May however |
cool, thanks! |
@mjbvz Are you calling this method from some other place than the renderer process that is remote enabled? Are you calling this method at a time when the remote authority is not resolved? |
@alexdima We actually need to call it from the main processes. This is where the protocol for registering local resources in webviews is registered:
|
OK. In that case a new approach is needed, but I'm not sure how that should work. Is there any chance these resources can be intercepted and rewritten before they reach the main process? That is the pattern we use around |
i also verified this now works on windows + wsl. thx. |
@mjbvz this happens for me 100% of the time when using Remote - WSL. If I open a folder locally I can view the images. Trying to open any images when remote give this error.
There are no errors in the console.
Using latest Insiders
Originally posted by @chrisdias in #95736 (comment)
The text was updated successfully, but these errors were encountered: