Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Waiting for roots to load... error message #354

Closed
richb-hanover opened this issue Mar 25, 2016 · 19 comments
Closed

Waiting for roots to load... error message #354

richb-hanover opened this issue Mar 25, 2016 · 19 comments

Comments

@richb-hanover
Copy link

I'm using React Developer Tools 0.14.9 on Chrome Version 50.0.2661.49 beta (64-bit) (OSX 10.10.5). I have cloned react-starter-kit (https://github.com/kriasoft/react-starter-kit) and modified it to make my app.

I tested the original react-starter-kit, and it works fine - it displays the React components as desired.

But when I fire up my app and inspect it, the React tab shows "Waiting for roots to load ... to reload the inspector [ click here ]"

What causes this message? Where do the "roots" come from? (I'm sure I have screwed something up, but ... what?) Thanks.

@2color
Copy link

2color commented Mar 30, 2016

I'm getting the same error.

In the console I see:
backend.js:8441 Uncaught TypeError: Cannot read property 'props' of undefined

@kasper573
Copy link

I'm writing a custom react renderer (https://github.com/Kasu/symphony/tree/custom-renderer/lib/surface/react-surface) and I'm experiencing the same problem ("Waiting for roots to load ... to reload the inspector [ click here ]"). It could be related to this issue.

If not, I'd still be greatful in some advice on where to look in react-devtools to understand where the roots come from. I tried to track down the "root" event from the bridge but I couldn't find where in react it comes from.

@sophiebits
Copy link
Contributor

It probably comes from the "backend" folder. No one actively works on the devtools and has a good understanding of all the pieces so you'll have to dig around if you want to change stuff.

@kasper573
Copy link

@spicyj Found it! Thanks for the pointer!

It's hook.emit("root", ...) in https://github.com/facebook/react-devtools/blob/master/backend/attachRenderer.js

@bobwhitelock
Copy link

I'm getting a similar error as described in #105 (comment).

@bobwhitelock
Copy link

I've investigated this some more, and I've been able to reproduce this issue consistently with the following gist: https://gist.github.com/BobWhitelock/8a3fd237a325668e659465a20555c84b. This should able to just be downloaded and the page viewed as-is, and the issue can be seen in the devtools and the error message within the console.

The error, at least in my case, seems to be due to the dynamic text creation using {} within the option element, the error only appears when this is present - I've no idea why this is causing this however.

I've not been able to reproduce the above linked issue as well, so I'm guessing there's something more going on in that case.

bobwhitelock added a commit to alces-software/alces-access-manager that referenced this issue Apr 7, 2016
Creating the text using a method seems to get around this issue with the
devtools not loading and lots of errors occurring.
@sophiebits
Copy link
Contributor

@bobwhitelock Sounds like #248.

@bobwhitelock
Copy link

Thanks @spicyj, that does look the same. Looks like there's a possible fix proposed in #345 also, but I've managed to work around this for the moment by creating the option text elsewhere and ensuring the option only has a single child.

@gertcuykens
Copy link

gertcuykens commented Aug 11, 2016

I still have this error when pre render my page? Note that I am new to react and don't understand much about it yet.

<!DOCTYPE html>                                                                                                         
<html>  
  <head>                                                                                                                
    <title>Test</title>                                                                                                                                                        
    <script src="react.min.js"></script>
    <script src="react-dom.min.js"></script>                                                                              
  </head>                                                                                                               
  <body>                                                                          
  <div data-reactroot="" data-reactid="1" data-react-checksum="318384820"><!-- react-text: 2 -->Hello <!-- /react-text -
-><!-- react-text: 3 -->John<!-- /react-text --></div>                                                                  
  </body>                                                                                                               
<html>

EDIT: A wait I think I understand now, I am not using react at all this way :)

@mapimienta
Copy link

you must to add this:

<script src="https://npmcdn.com/babel-core@5.8.38/browser.min.js"></script>

@mapimienta
Copy link

mapimienta commented Sep 5, 2016

you must to add this js, this js is from the babel core
https://npmcdn.com/babel-core@5.8.38/browser.min.js

@gaearon
Copy link
Contributor

gaearon commented Feb 15, 2017

This was likely a DevTools bug that got fixed in #345. Closing.

@gaearon gaearon closed this as completed Feb 15, 2017
@Nantris
Copy link

Nantris commented Feb 17, 2017

Still seeing this issue with React Devtools in Electron. Hadn't seen it until just today.

@gaearon
Copy link
Contributor

gaearon commented Feb 17, 2017

@slapbox What are you using it with? If React Native, it might be due to a bug in RN that is fixed in master. You can try applying facebook/react-native#12305 and facebook/react-native#12316 to RN locally. If you still experience it, please file an issue describing exactly how to reproduce this.

@Nantris
Copy link

Nantris commented Feb 17, 2017

@gaearon Thanks for your response. I'm not using React Native. I made a report at #547

@sunkarashruthi
Copy link

Hey guys,

i am a beginner to react. My broswer is not rendering the hello world that i rendered in my js file.
I am attaching two examples screenshot
react-issue
r2

first image: i was running webpack-dev-server at localhost:8080, instead of displaying hello world it displays the way in the image

second image: This was displaying hello world when running the index.html file but the dev tools has error like waiting to load....

any suggestions would really help me
Thanks

@sunkarashruthi
Copy link

Also React dev tools is not showing in the console of my first image

@Nantris
Copy link

Nantris commented Apr 21, 2017

@sunkarashruthi I have run into this issue a few times and every single time it has been my own fault.

Are there any warnings or errors? That can cause this.

Is there anything that could possibly be happening in a way you don't expect that is not technically an error? In particular, check your ComponentWillMount()'s first and foremost.

@sunkarashruthi
Copy link

sunkarashruthi commented Apr 21, 2017

@slapbox there was a CORS issue, which i fixed.

Thanks for responding

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants