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

Uncaught Error: Argument appears to not be a ReactComponent #134

Closed
robolivable opened this issue Oct 2, 2018 · 8 comments
Closed

Uncaught Error: Argument appears to not be a ReactComponent #134

robolivable opened this issue Oct 2, 2018 · 8 comments

Comments

@robolivable
Copy link

robolivable commented Oct 2, 2018

What do you expect to happen?

Run example app without errors.

What actually happens?

Errors encountered during react lifecycle.

Which browsers are affected?

Currently running on latest version of Chrome Canary (71.0.3567.0), but I've noticed similar behavior when executing the app inside the webOS emulator.

Additional info

It appears that react-tv@^0.4.2 is causing errors during lifecycle:

Error: Argument appears to not be a ReactComponent. Keys: tag,key,type,stateNode,return,child,sibling,index,ref,pendingProps,memoizedProps,updateQueue,memoizedState,mode,effectTag,nextEffect,firstEffect,lastEffect,expirationTime,alternate,_debugID,_debugSource,_debugOwner,_debugIsCurrentlyTiming
    at invariant (bundle.js:22457)
    at Object.findHostInstance (bundle.js:32480)
    at Object.findDOMNode (bundle.js:32844)
    at t.componentWillUnmount (bundle.js:33055)
    at callComponentWillUnmountWithTimer (bundle.js:29436)
    at HTMLUnknownElement.callCallback (bundle.js:25057)
    at Object.invokeGuardedCallbackDev (bundle.js:25095)
    at invokeGuardedCallback (bundle.js:25144)
    at safelyCallComponentWillUnmount (bundle.js:29443)
    at commitUnmount (bundle.js:29689)

Downgrading to react-tv@^0.3.4 is currently my only workaround for this issue.

See this project for reproducing this issue (see branch custom/issue-134-reproducible):
https://github.com/robolivable/TTV4TV/tree/custom/issue-134-reproducible

Side note: I can't seem to find the source files for version 0.4.2 of react-tv. The latest here seems to be 0.4.1 ... Is this an intended deployment?

Screenshots

screen shot 2018-10-01 at 6 55 03 pm

@wyeo
Copy link

wyeo commented Oct 10, 2018

This is an issue for react-tv-navigation

@raphamorim
Copy link
Owner

raphamorim commented Oct 10, 2018

weird, I thought that was fixed in 0.4.2. Let me take a look.

@raphamorim
Copy link
Owner

@robolivable what's the react version that you're using?

@robolivable
Copy link
Author

Should be ^16.2.0. I believe you should be able to get a reproducible example up and running by following the steps in the README of this branch: https://github.com/robolivable/TTV4TV/tree/custom/issue-134-reproducible

@lambertkevin
Copy link
Contributor

We got the same issue here at the first build of the app generated by the cli.

Any idea how we can help you fix this?

@lambertkevin
Copy link
Contributor

lambertkevin commented Oct 30, 2018

I might be heading in the wrong direction but it looks like the problem actually comes from react-tv.
When findDOMNode returns nothing, it's because ReactTVFiberRenderer.findHostInstance try to get a _reactInternalFiber property from the get function, but the fiberNode instance that we give it as parameter hasn't any _reactInternalFiber property.
The findCurrentHostFiber then returns null and terminates the findHostInstance function.

@lambertkevin
Copy link
Contributor

Ok fixed it, i'll do a PR for you to test it!

Turns out findHostInstance is trying to get the fiberNode from the component given as parameter, except the element that is given to him is already a fiberNode!

@raphamorim
Copy link
Owner

raphamorim commented Oct 31, 2018

I released a react-tv@0.4.3, react-tv-navigation@0.4.3 and react-tv-cli@0.4.3 with @KevinMolotov changes/fix for that issue. Let me know if doesn't work and thanks for opening the issue.

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

No branches or pull requests

4 participants