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

Nothing is rendered

Open gmarab opened this issue 5 years ago • 9 comments
trafficstars

I just installed the extension on chrome and tried my local app as well as the sandbox. It seems that nothing is rendered to the extension.

When the blank screen appears, I opened the devtools inspector and I see this error many times:

image

Could this be the cause of the problem?

gmarab avatar Mar 19 '20 08:03 gmarab

I'm not getting anything rendered either. It was working for me before, but stopped working. I don't get the above errors in the inspector when I inspect the xstate dev tools window though.

Blacktiger avatar Mar 30 '20 22:03 Blacktiger

I took another look and it seems to be working now. I'm unsure why it wasn't showing up before. Possibly try right-clicking on the xstate pane in the dev tools and choosing "Reload Frame" as I needed to do that for some reason to get it to refresh properly.

Blacktiger avatar Mar 30 '20 22:03 Blacktiger

Nothing is rendered for me too. When I check the console.log, I can see Error in event handler: TypeError: Cannot read property 'type' of null.

Unfortunately, the source maps don't seem to be working. It points me to this line:

image

CodingDive avatar Apr 27 '20 16:04 CodingDive

https://github.com/amitnovick/xstate-devtools/issues/23#issue-584240814

Same here

mateatslc avatar May 12 '20 15:05 mateatslc

The same issue happened once in React DevTools. https://github.com/bvaughn/react-devtools-experimental/issues/292

I just worked around it by enabling third party cookies. https://github.com/bvaughn/react-devtools-experimental/issues/292#issuecomment-586484104

Is localStorage crucial to xstate-devtools?

hasparus avatar May 18 '20 13:05 hasparus

I was having the same issues, until i figured out that the machine needs to be serialised (think, JSON.stringify removes functions). That's to say that all the actions, guards, services and activities need to be included in the options argument .

Once I started referring to the options object (using a string, instead of inline functions) then it started rendering as expected.

Ric-Lavers avatar Jul 12 '20 09:07 Ric-Lavers

Once I started referring to the options object (using a string, instead of inline functions) then it started rendering as expected.

This fixed it for me also!

Would it be possible to show an error message if this is the cause?

dsuttonpreece avatar Jul 29 '20 06:07 dsuttonpreece

My xstate dev tools display white page even on your codesandbox example

hanzlahabib avatar Feb 17 '21 07:02 hanzlahabib

Like above we're seeing nothing render for the demo, we get the following error: XState DevTools: 0.5.3 TypeError: Cannot read property '__widget' of null at HTMLDivElement.Element.appendChild (dom_extension.js:1) at rn._updateMetrics (elements.js:300) at rn. (elements.js:300) at async Promise.all (://devtools/bundled/index 0)

rickyH avatar Mar 03 '21 16:03 rickyH