You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extension renders dot graphs in a webview by loading an index.html (set via webview.html), waiting for a webview.postMessage({"command":"renderDot", "value":"<dotgraph>"}).
Now, this seems to be broken since 1.56.0 for some reason and I was trying to debug it without success. I tried to keep my code very much aligned with the examples but cannot seem to find the issue.
I am using webview.postMessage() to send messages to the content window and webview.onDidReceiveMessage(handler) to receive msgs from the content window but it looks like messages that I post do not arrive at the content window's message eventlistener but instead appear in webview.onDidReceiveMessage(). This hasn't happened before 1.56.0 and I assume this may be a breaking change introduced with the latest webview changes.
Would be great if someone could verify what's happening here. Either I am somehow misusing the API or this might be a bug that could affect more extensions.
Note: My extension still receives messages from the contentWindow (e.g. save dot file from the menu, initiated from within the contentWindow), however, the contentWindow does not seem to receive any messages.
open a graphviz dot file and hit cmd + shift + p -> interactive graphviz preview beside
empty window (because content window is not receiving messages from the extension :/ they instead appear in the extensions message handler?! - see "unexpected command" in console (this is the extension not expecting the command that should have been posted to the contentwindow))
clicking on the toolbar menu - save dot opens a vscode saveas dialog -> message from contentwindow to extension works fine
The text was updated successfully, but these errors were encountered:
@tintinweb, you are a genius. I was looking at this the whole week. Same issue - I too had a convenience function postMessage. I think you saved me another week of guessing.
My extension tintinweb.graphviz-interactive-preview used to work fine until the 1.56.0 update arrived a couple of days ago. Users started to report an issue with the webview not rendering dot graphs anymore Consensys/vscode-solidity-auditor#72.
The extension renders dot graphs in a webview by loading an
index.html
(set viawebview.html
), waiting for awebview.postMessage({"command":"renderDot", "value":"<dotgraph>"})
.Now, this seems to be broken since 1.56.0 for some reason and I was trying to debug it without success. I tried to keep my code very much aligned with the examples but cannot seem to find the issue.
I am using
webview.postMessage()
to send messages to the content window andwebview.onDidReceiveMessage(handler)
to receive msgs from the content window but it looks like messages that I post do not arrive at the content window'smessage
eventlistener but instead appear inwebview.onDidReceiveMessage()
. This hasn't happened before 1.56.0 and I assume this may be a breaking change introduced with the latest webview changes.https://github.com/tintinweb/vscode-interactive-graphviz/blob/master/src/features/interactiveWebview.js#L69
Would be great if someone could verify what's happening here. Either I am somehow misusing the API or this might be a bug that could affect more extensions.
Note: My extension still receives messages from the contentWindow (e.g. save dot file from the menu, initiated from within the contentWindow), however, the contentWindow does not seem to receive any messages.
This used to work
Steps to Reproduce:
tintinweb.graphviz-interactive-preview
The text was updated successfully, but these errors were encountered: