-
Notifications
You must be signed in to change notification settings - Fork 29.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
Azure edge robotics webview not loading #123318
Comments
The uri changes are expected, see https://code.visualstudio.com/updates/v1_56#_service-workers-now-used-to-load-resource-in-webview I think your extension is hardcoding some assumptions about the result of I don't know what the line is doing but it will need to be re-written. We only say that |
@mjbvz Thank you for the doc pointer. I have updated my code, but still am getting file not found. when attempting to load the new URI. We are using a module which makes some assumptions about the URI, so we do have to modify the return value slightly. (internally it composes its own url by combining a prefix path with the passed in one. So we split the path we pass in. I changed this code to https: ) |
Please share a branch with your code changes |
@vincentjocodes Please share minimal example code that demonstrates the issue |
@ooeygui Sounds like you came up with a code fix on the extension side? Should we close this issue then? |
@mjbvz I'm working on creating minimal example code. Meanwhile after debugging further, it seems that the .png request doesn't get picked up by the service worker and times out after 5 minutes. Do you know any reason why the service worker seems to ignore a request? This seems to happen on images that are loaded within JS or CSS (as background-image) |
@glouischandra Is it trying to load the images inside an iframe in the webview? Is the script running in one? |
Its trying to load an image inside the webview, there's no additional iframe within the webview (not sure if this is what you're asking for). The script is injected inside webview's body and the source code is located within the extension project itself, like: https://d80db2d4-a744-4854-98f7-b90d109f8c44.vscode-webview-test.com/vscode-resource/file///Users/..../dist/webview/main.js. This script is an angular application. Interestingly if I just create the same <img src=".../logo.png"> with the same exact URL that angular generated directly in the HTML, ServiceWorker seems to pick it up just fine and download the image. |
Not sure, a minimal example would definitely help |
We have a code fix in flight which corrects this. I'll be pushing a release today. |
@mjbvz Here's a minimal repro for the angular webview issue: https://github.com/glouischandra/vscode-156-minimal-repo |
@mjbvz any update on the investigation? |
Can you please slim that example down? Looks like there's a lot of stuff about angular and other components in there right now |
We can close this issue now - we released a fix for the ROS VSCode extension. (Since I didn't create this github issue, I cannot close it) |
Thanks. Let me know if something still doesn't seem to be working correctly on the VS Code side |
@mjbvz will do, I'll file a separate bug once we slim the example down. |
Hello All,
I'm in the Azure Edge Robotics team, maintaining the VSCode extension for ROS. We are hitting this issue as well for our Robot Visualizer. It seems to be related to a move from vscode-resource to https?
For example, we have a workspace rooted at c:\ws\tb, which has sources including stl files.
We convert this to a file URI, then to a webview URI. Before the update, it would look something like:
vscode-resource://c%3A/ws/tb/src/turtlebot3/turtlebot3_description/meshes/wheels/right_tire.stl
but now looks like this:
The
file///
does not look right to me.Originally posted by @ooeygui in #122951 (comment)
The text was updated successfully, but these errors were encountered: