Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaks when cssRules not found #4

Open
MagicIndustries opened this issue Nov 15, 2020 · 0 comments
Open

breaks when cssRules not found #4

MagicIndustries opened this issue Nov 15, 2020 · 0 comments

Comments

@MagicIndustries
Copy link

I am using react-planet in an app running inside Coherent Gameface, a plugin that lets you run web apps as a UI in Unreal Engine.

It throws the below errors, and I'm not entirely sure but it seems when run inside Coherent, for some reason CSS is being processed or modified by react-planet including this code:

INDEX.JS:4335

var maxIndex = container.cssRules.length;

Whatever's happening here, it seems something about the way Coherent is doing things means that cssRules property is removed or not generated somewhere. I've tried having coherent load the app from disk as well as from server, and the result is the same.

Can you give me any ideas here? I'm hoping I can find a workaround.

error log:

LogGameface: Error: JS Error (Line):   var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong
LogGameface: Error: JS Error (Stack): TypeError: Cannot read property 'cssRules' of undefined
    at insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39789:28)
    at DomRenderer.insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39943:22)
    at DomRenderer.insertRules (http://192.168.1.101:3000/static/js/1.chunk.js:39901:12)
    at DomRenderer.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39888:12)
    at StyleSheet.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39245:38)
    at StyleSheet.attach (http://192.168.1.101:3000/static/js/1.chunk.js:39130:30)
    at attach (http://192.168.1.101:3000/static/js/1.chunk.js:41876:18)
    at http://192.168.1.101:3000/static/js/1.chunk.js:41992:7
    at useSynchronousEffect (http://192.168.1.101:3000/static/js/1.chunk.js:41944:14)
    at useStyles (http://192.168.1.101:3000/static/js/1.chunk.js:41984:5)
    at Satellite (http://192.168.1.101:3000/static/js/1.chunk.js:45545:17)
    at renderWithHooks (http://192.168.1.101:3000/static/js/1.chunk.js:22480:
LogGameface: Error: JS Error: http://192.168.1.101:3000/static/js/1.chunk.js:39789: TypeError: Cannot read property 'cssRules' of undefined
LogGameface: Error: JS Error (Line):   var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong
LogGameface: Error: JS Error (Stack): TypeError: Cannot read property 'cssRules' of undefined
    at insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39789:28)
    at DomRenderer.insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39943:22)
    at DomRenderer.insertRules (http://192.168.1.101:3000/static/js/1.chunk.js:39901:12)
    at DomRenderer.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39888:12)
    at StyleSheet.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39245:38)
    at StyleSheet.attach (http://192.168.1.101:3000/static/js/1.chunk.js:39130:30)
    at attach (http://192.168.1.101:3000/static/js/1.chunk.js:41876:18)
    at http://192.168.1.101:3000/static/js/1.chunk.js:41992:7
    at useSynchronousEffect (http://192.168.1.101:3000/static/js/1.chunk.js:41944:14)
    at useStyles (http://192.168.1.101:3000/static/js/1.chunk.js:41984:5)
    at Satellite (http://192.168.1.101:3000/static/js/1.chunk.js:45545:17)
    at renderWithHooks (http://192.168.1.101:3000/static/js/1.chunk.js:22480:
LogGameface: Error: JS Error: http://192.168.1.101:3000/static/js/1.chunk.js:39789: TypeError: Cannot read property 'cssRules' of undefined
LogGameface: Error: JS Error (Line):   var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong
LogGameface: Error: JS Error (Stack): TypeError: Cannot read property 'cssRules' of undefined
    at insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39789:28)
    at DomRenderer.insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39943:22)
    at DomRenderer.insertRules (http://192.168.1.101:3000/static/js/1.chunk.js:39901:12)
    at DomRenderer.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39888:12)
    at StyleSheet.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39245:38)
    at StyleSheet.attach (http://192.168.1.101:3000/static/js/1.chunk.js:39130:30)
    at attach (http://192.168.1.101:3000/static/js/1.chunk.js:41876:18)
    at http://192.168.1.101:3000/static/js/1.chunk.js:41992:7
    at useSynchronousEffect (http://192.168.1.101:3000/static/js/1.chunk.js:41944:14)
    at useStyles (http://192.168.1.101:3000/static/js/1.chunk.js:41984:5)
    at Satellite (http://192.168.1.101:3000/static/js/1.chunk.js:45545:17)
    at renderWithHooks (http://192.168.1.101:3000/static/js/1.chunk.js:22480:
LogGameface: Error: JS Error: http://192.168.1.101:3000/static/js/1.chunk.js:39789: TypeError: Cannot read property 'cssRules' of undefined
LogGameface: Error: JS Error (Line):   var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong
LogGameface: Error: JS Error (Stack): TypeError: Cannot read property 'cssRules' of undefined
    at insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39789:28)
    at DomRenderer.insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39943:22)
    at DomRenderer.insertRules (http://192.168.1.101:3000/static/js/1.chunk.js:39901:12)
    at DomRenderer.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39888:12)
    at StyleSheet.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39245:38)
    at StyleSheet.attach (http://192.168.1.101:3000/static/js/1.chunk.js:39130:30)
    at attach (http://192.168.1.101:3000/static/js/1.chunk.js:41876:18)
    at http://192.168.1.101:3000/static/js/1.chunk.js:41992:7
    at useSynchronousEffect (http://192.168.1.101:3000/static/js/1.chunk.js:41944:14)
    at useStyles (http://192.168.1.101:3000/static/js/1.chunk.js:41984:5)
    at Satellite (http://192.168.1.101:3000/static/js/1.chunk.js:45545:17)
    at renderWithHooks (http://192.168.1.101:3000/static/js/1.chunk.js:22480:
LogGameface: Error: JS Error: http://192.168.1.101:3000/static/js/1.chunk.js:39789: TypeError: Cannot read property 'cssRules' of undefined
LogGameface: Error: JS Error (Line):   var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong
LogGameface: Error: JS Error (Stack): TypeError: Cannot read property 'cssRules' of undefined
    at insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39789:28)
    at DomRenderer.insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39943:22)
    at DomRenderer.insertRules (http://192.168.1.101:3000/static/js/1.chunk.js:39901:12)
    at DomRenderer.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39888:12)
    at StyleSheet.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39245:38)
    at StyleSheet.attach (http://192.168.1.101:3000/static/js/1.chunk.js:39130:30)
    at attach (http://192.168.1.101:3000/static/js/1.chunk.js:41876:18)
    at http://192.168.1.101:3000/static/js/1.chunk.js:41992:7
    at useSynchronousEffect (http://192.168.1.101:3000/static/js/1.chunk.js:41944:14)
    at useStyles (http://192.168.1.101:3000/static/js/1.chunk.js:41984:5)
    at Satellite (http://192.168.1.101:3000/static/js/1.chunk.js:45545:17)
    at renderWithHooks (http://192.168.1.101:3000/static/js/1.chunk.js:22480:
LogGameface: Error: JS Error: http://192.168.1.101:3000/static/js/1.chunk.js:39789: TypeError: Cannot read property 'cssRules' of undefined
LogGameface: Error: JS Error (Line):   var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong
LogGameface: Error: JS Error (Stack): TypeError: Cannot read property 'cssRules' of undefined
    at insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39789:28)
    at DomRenderer.insertRule (http://192.168.1.101:3000/static/js/1.chunk.js:39943:22)
    at DomRenderer.insertRules (http://192.168.1.101:3000/static/js/1.chunk.js:39901:12)
    at DomRenderer.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39888:12)
    at StyleSheet.deploy (http://192.168.1.101:3000/static/js/1.chunk.js:39245:38)
    at StyleSheet.attach (http://192.168.1.101:3000/static/js/1.chunk.js:39130:30)
    at attach (http://192.168.1.101:3000/static/js/1.chunk.js:41876:18)
    at http://192.168.1.101:3000/static/js/1.chunk.js:41992:7
    at useSynchronousEffect (http://192.168.1.101:3000/static/js/1.chunk.js:41944:14)
    at useStyles (http://192.168.1.101:3000/static/js/1.chunk.js:41984:5)
    at Satellite (http://192.168.1.101:3000/static/js/1.chunk.js:45545:17)
    at renderWithHooks (http://192.168.1.101:3000/static/js/1.chunk.js:22480:
LogGameface: Error: The above error occurred in the <Satellite> component:
    in Satellite (created by Planet)
    in div (created by ClickAwayListener)
    in ClickAwayListener (created by Planet)
    in Planet (at Menu.js:43)
    in div (at Menu.js:42)
    in MainMenu (at App.js:9)
    in div (at App.js:8)
    in App (at WebApp.js:12)
    in Provider (at WebApp.js:11)
    in StrictMode (at WebApp.js:10)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. 
LogGameface: Error: The above error occurred in the <Satellite> component:
    in Satellite (created by Planet)
    in div (created by ClickAwayListener)
    in ClickAwayListener (created by Planet)
    in Planet (at Menu.js:43)
    in div (at Menu.js:42)
    in MainMenu (at App.js:9)
    in div (at App.js:8)
    in App (at WebApp.js:12)
    in Provider (at WebApp.js:11)
    in StrictMode (at WebApp.js:10)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. 
LogGameface: Error: The above error occurred in the <Satellite> component:
    in Satellite (created by Planet)
    in div (created by ClickAwayListener)
    in ClickAwayListener (created by Planet)
    in Planet (at Menu.js:43)
    in div (at Menu.js:42)
    in MainMenu (at App.js:9)
    in div (at App.js:8)
    in App (at WebApp.js:12)
    in Provider (at WebApp.js:11)
    in StrictMode (at WebApp.js:10)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. 
LogGameface: Error: The above error occurred in the <Satellite> component:
    in Satellite (created by Planet)
    in div (created by ClickAwayListener)
    in ClickAwayListener (created by Planet)
    in Planet (at Menu.js:43)
    in div (at Menu.js:42)
    in MainMenu (at App.js:9)
    in div (at App.js:8)
    in App (at WebApp.js:12)
    in Provider (at WebApp.js:11)
    in StrictMode (at WebApp.js:10)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. 
LogGameface: Error: The above error occurred in the <Satellite> component:
    in Satellite (created by Planet)
    in div (created by ClickAwayListener)
    in ClickAwayListener (created by Planet)
    in Planet (at Menu.js:43)
    in div (at Menu.js:42)
    in MainMenu (at App.js:9)
    in div (at App.js:8)
    in App (at WebApp.js:12)
    in Provider (at WebApp.js:11)
    in StrictMode (at WebApp.js:10)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. 
LogGameface: Error: The above error occurred in the <Satellite> component:
    in Satellite (created by Planet)
    in div (created by ClickAwayListener)
    in ClickAwayListener (created by Planet)
    in Planet (at Menu.js:43)
    in div (at Menu.js:42)
    in MainMenu (at App.js:9)
    in div (at App.js:8)
    in App (at WebApp.js:12)
    in Provider (at WebApp.js:11)
    in StrictMode (at WebApp.js:10)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. 
LogGameface: Error: JS Error: http://192.168.1.101:3000/static/js/1.chunk.js:30205: Error: An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible t
hat these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.
LogGameface: Error: JS Error (Line):         throw _error3;
LogGameface: Error: JS Error (Stack): Error: An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try trig
gering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.
    at Object.invokeGuardedCallbackDev (http://192.168.1.101:3000/static/js/1.chunk.js:7931:23)
    at invokeGuardedCallback (http://192.168.1.101:3000/static/js/1.chunk.js:7975:35)
    at beginWork$1 (http://192.168.1.101:3000/static/js/1.chunk.js:30736:11)
    at performUnitOfWork (http://192.168.1.101:3000/static/js/1.chunk.js:29703:16)
    at workLoopSync (http://192.168.1.101:3000/static/js/1.chunk.js:29676:26)
    at performSyncWorkOnRoot (http://192.168.1.101:3000/static/js/1.chunk.js:29294:13)
    at scheduleUpdateOnFi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant