xstate-viz icon indicating copy to clipboard operation
xstate-viz copied to clipboard

Inspect is flaky in Firefox

Open tomByrer opened this issue 3 years ago • 0 comments

Description Sometimes Inspect won't work in Firefox, & gives an intization error:

TypeError
can't access property "postMessage", targetWindow is null
send@https://o4dps.csb.app/node_modules/
xstate/inspect/es/index.js:152:13
evaluate/inspectMachine<.on["xstate.inspecting"].actions</<@https://o4dps.csb.app/node_modules/
xstate/inspect/es/index.js:111:22
evaluate/inspectMachine<.on["xstate.inspecting"].actions<@https://o4dps.csb.app/node_modules/
xstate/inspect/es/index.js:110:40
evaluate/Interpreter.prototype.exec
https://o4dps.csb.app/node_modules/xstate/es/interpreter.js:547:16
evaluate/Interpreter.prototype.execute
https://o4dps.csb.app/node_modules/xstate/es/interpreter.js:159:14
evaluate/Interpreter.prototype.update
https://o4dps.csb.app/node_modules/xstate/es/interpreter.js:179:12
Interpreter/this.send/<
https://o4dps.csb.app/node_modules/xstate/es/interpreter.js:92:15
evaluate/Scheduler.prototype.process
https://o4dps.csb.app/node_modules/xstate/es/scheduler.js:59:7
evaluate/Scheduler.prototype.schedule
https://o4dps.csb.app/node_modules/xstate/es/scheduler.js:43:10
Interpreter/this.send
https://o4dps.csb.app/node_modules/xstate/es/interpreter.js:89:23
messageHandler@https://o4dps.csb.app/node_modules/
xstate/inspect/es/index.js:156:22
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.
This error overlay is powered by `react-error-overlay` used in `create-react-app`.

Expected Result Work as well as it does in Chrome. If I close the error window, then resize the browser, then that forces a refresh & the Inspector does work.

Actual Result image

image

Reproduction https://codesandbox.io/s/xstate-inspect-no-child-o4dps

Additional context Firefox v82.0b1 I'll update later ;)

IMHO this is low-priority; even though I use Firefox for webdev, <10% of devs do, so I'm in the minority.

tomByrer avatar Oct 21 '20 00:10 tomByrer