bernhard-42 / vscode-ocp-cad-viewer

A viewer for OCP based Code-CAD (CadQuery, build123d) integrated into VS Code
Apache License 2.0
80 stars 9 forks source link

OCP CAD Viewer Panel blank screen despite server running #2

Closed barnabywalters closed 1 year ago

barnabywalters commented 1 year ago

This issue is to document a problem I ran into while installing the extension which \~mysteriously\~ fixed itself after a day, in case it happens to anyone else.

Platform: mac os 10.15.7 VS Code: 1.76.2 Python: 3.9.15 Extension: 0.31.0 build123d: 0.1.dev565 cadquery: 2.2.1

After installing the extension, the viewer and libraries into a python3.9 virtualenv, I was able to start the viewer server (confirmed by visiting localhost:3939 and seeing a “Only POST requests accepted” error) and run scripts, but the OCP CAD Viewer panel remained completely blank, not even showing the UI or start-up graphic.

The OCP CAD Viewer Output panel reported Webview panel changed state and Updateing webview messages when running scripts, and sometimes when interacting with the menu.

Restarting VS Code, updating VS Code and restarting my computer had no effect. Trying again the next day somehow fixed it.

If this happens to anyone else: please go to the VS Code “Output” panel, select “Extension Host” in the dropdown and record anything it says there! I didn’t know to look there at the time, but it could have some useful debugging information.

Screenshot 2023-03-15 at 23 39 52
bernhard-42 commented 1 year ago

This was a CORS issue as traced down on discord. The latest viewer does not load three-cad-viewer from the internet any more, hence this should be resolved now.