mobx-devtools
mobx-devtools copied to clipboard
Changes tab, ObservableMap open error.
I use Changes tab and click to ObservableMap@5{...} +1 -1
,
not working.
chrome console error
backend.js:4189 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': [object Object] could not be cloned.
chrome console error backend.js:4189 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': [object Object] could not be cloned.
This is a known issue of using postMessage
, see: https://stackoverflow.com/questions/52122011/failed-to-execute-postmessage-on-window-googletagmanager/52223341#52223341
The code of the extension should be changed to tackle this. If you want to try yourself a workaround, when this error appears in the console (Chrome):
backend.js:4189 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': [object Object] could not be cloned.
at Object.send (chrome-extension://pfgnfdagidkfgccljigdamigbcnndkod/backend.js:4189:14)
at Bridge.flushBufferSlice (chrome-extension://pfgnfdagidkfgccljigdamigbcnndkod/backend.js:1045:18)
at Bridge.flushBufferWhileIdle (chrome-extension://pfgnfdagidkfgccljigdamigbcnndkod/backend.js:1023:14)
click on the first line of the trace (backend.js) and you will be pointed to the source of the error.
Then you'll see the following lines:
send: function send(data) {
(0, _debugConnection2.default)('[BACKEND -> contentScript]', data);
window.postMessage({ source: 'mobx-devtools-backend', payload: data, contentScriptId: contentScriptId, backendId: backendId }, '*');
}
change them with the following:
send: function send(data) {
(0, _debugConnection2.default)('[BACKEND -> contentScript]', data);
window.postMessage({ source: 'mobx-devtools-backend', payload: JSON.parse(JSON.stringify(data)), contentScriptId: contentScriptId, backendId: backendId }, '*');
}
then save the file. The error will disappear until you refresh your browser.
I don't know if this project is maintained anymore, maybe I'll open a PR with a fix in the future..
Works for me, how to reproduce it?