microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

service-test-editor failing #336

Closed tballmsft closed 3 years ago

tballmsft commented 3 years ago

On visiting https://microsoft.github.io/jacdac-docs/tools/service-test-editor/, screen goes blank with following log. Works locally just fine.

react-dom.production.min.js:216 Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=Error%3A%20no%20register%20angle%20found%20in%20service%20button for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at Rg (react-dom.production.min.js:140) at A (react-dom.production.min.js:144) at x (react-dom.production.min.js:146) at react-dom.production.min.js:150 at fi (react-dom.production.min.js:176) at ck (react-dom.production.min.js:271) at bk (react-dom.production.min.js:250) at ak (react-dom.production.min.js:250) at Tj (react-dom.production.min.js:250) at Lj (react-dom.production.min.js:243) Ni @ react-dom.production.min.js:216 (anonymous) @ react-dom.production.min.js:217 Eg @ react-dom.production.min.js:131 Yi @ react-dom.production.min.js:220 dk @ react-dom.production.min.js:259 (anonymous) @ scheduler.production.min.js:18 gg @ react-dom.production.min.js:122 Uj @ react-dom.production.min.js:252 Lj @ react-dom.production.min.js:243 (anonymous) @ react-dom.production.min.js:123 (anonymous) @ scheduler.production.min.js:18 gg @ react-dom.production.min.js:122 jg @ react-dom.production.min.js:123 ig @ react-dom.production.min.js:122 fk @ react-dom.production.min.js:263 (anonymous) @ scheduler.production.min.js:18 gg @ react-dom.production.min.js:122 Oj @ react-dom.production.min.js:261 (anonymous) @ react-dom.production.min.js:261 V @ scheduler.production.min.js:16 (anonymous) @ scheduler.production.min.js:12 react-dom.production.min.js:216 Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=Error%3A%20no%20register%20angle%20found%20in%20service%20button for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at Rg (react-dom.production.min.js:140) at A (react-dom.production.min.js:144) at x (react-dom.production.min.js:146) at react-dom.production.min.js:150 at fi (react-dom.production.min.js:176) at ck (react-dom.production.min.js:271) at bk (react-dom.production.min.js:250) at ak (react-dom.production.min.js:250) at Tj (react-dom.production.min.js:250) at Lj (react-dom.production.min.js:243) Ni @ react-dom.production.min.js:216 (anonymous) @ react-dom.production.min.js:216 Eg @ react-dom.production.min.js:131 Yi @ react-dom.production.min.js:220 dk @ react-dom.production.min.js:259 (anonymous) @ scheduler.production.min.js:18 gg @ react-dom.production.min.js:122 Uj @ react-dom.production.min.js:252 Lj @ react-dom.production.min.js:243 (anonymous) @ react-dom.production.min.js:123 (anonymous) @ scheduler.production.min.js:18 gg @ react-dom.production.min.js:122 jg @ react-dom.production.min.js:123 ig @ react-dom.production.min.js:122 fk @ react-dom.production.min.js:263 (anonymous) @ scheduler.production.min.js:18 gg @ react-dom.production.min.js:122 Oj @ react-dom.production.min.js:261 (anonymous) @ react-dom.production.min.js:261 V @ scheduler.production.min.js:16 (anonymous) @ scheduler.production.min.js:12 react-dom.production.min.js:140 Uncaught Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=Error%3A%20no%20register%20angle%20found%20in%20service%20button for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at Rg (react-dom.production.min.js:140) at A (react-dom.production.min.js:144) at x (react-dom.production.min.js:146) at react-dom.production.min.js:150 at fi (react-dom.production.min.js:176) at ck (react-dom.production.min.js:271) at bk (react-dom.production.min.js:250) at ak (react-dom.production.min.js:250) at Tj (react-dom.production.min.js:250) at Lj (react-dom.production.min.js:243) Rg @ react-dom.production.min.js:140 A @ react-dom.production.min.js:144 x @ react-dom.production.min.js:146 (anonymous) @ react-dom.production.min.js:150 fi @ react-dom.production.min.js:176 ck @ react-dom.production.min.js:271 bk @ react-dom.production.min.js:250 ak @ react-dom.production.min.js:250 Tj @ react-dom.production.min.js:250 Lj @ react-dom.production.min.js:243 (anonymous) @ react-dom.production.min.js:123 (anonymous) @ scheduler.production.min.js:18 gg @ react-dom.production.min.js:122 jg @ react-dom.production.min.js:123 ig @ react-dom.production.min.js:122 fk @ react-dom.production.min.js:263 (anonymous) @ scheduler.production.min.js:18 gg @ react-dom.production.min.js:122 Oj @ react-dom.production.min.js:261 (anonymous) @ react-dom.production.min.js:261 V @ scheduler.production.min.js:16 (anonymous) @ scheduler.production.min.js:12 The FetchEvent for "https://microsoft.github.io/jacdac-docs/" resulted in a network error response: the promise was rejected. Promise.then (async) (anonymous) @ Router.mjs:60 sw.js:1 Uncaught (in promise) TypeError: Failed to fetch (index):1 Site cannot be installed: Page does not work offline. The page will not be regarded as installable after Edge 93, stable release August 2021.

tballmsft commented 3 years ago

I think I know what is going on. I now get the following locally after taking your updates from main:

Error in function throwOnInvalidObjectType

Objects are not valid as a React child (found: Error: no register angle found in service button). If you meant to render a collection of children, use an array instead.

The UI is out of sync, where the text of the test is for servo and the service is button. This used to just give errors.

tballmsft commented 3 years ago

index.js:81 Uncaught Error: Objects are not valid as a React child (found: Error: no register angle found in service button). If you meant to render a collection of children, use an array instead. at throwOnInvalidObjectType (react-dom.development.js:13232) at createChild (react-dom.development.js:13470) at reconcileChildrenArray (react-dom.development.js:13720) at reconcileChildFibers (react-dom.development.js:14126) at reconcileChildren (react-dom.development.js:16991) at updateHostComponent (react-dom.development.js:17633) at beginWork (react-dom.development.js:19081) at HTMLUnknownElement.callCallback (react-dom.development.js:3946) at Object.invokeGuardedCallbackDev (react-dom.development.js:3995) at invokeGuardedCallback (react-dom.development.js:4057)

tballmsft commented 3 years ago

@pelikhan - I can't seem to find source location in our stack... any ideas?

pelikhan commented 3 years ago

Looks like you catch an error and stuff it in the react tree.

tballmsft commented 3 years ago

Goodness, how can that be happening? Something leaking from testrunner.ts, I suspect... Oh the damn prompt stuff.. Thanks!

pelikhan commented 3 years ago

Review each catch handler and make sure the error is not used in react.

pelikhan commented 3 years ago

Also there is probably a better error message on the debug build

tballmsft commented 3 years ago

Got it. Thanks! I was leaking object rather than string...