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

Objects not valid as React Child #14

Closed
PolGuixe opened this issue Nov 16, 2016 · 12 comments
Closed

Objects not valid as React Child #14

PolGuixe opened this issue Nov 16, 2016 · 12 comments

Comments

@PolGuixe
Copy link
Contributor

PolGuixe commented Nov 16, 2016

From @brendonlamb

Hmm- seemed like it was working fine at first but it seems like theres some larger issues. I can't register or change password. Just get piles of

Uncaught Error: Objects are not valid as a React child (found: object with keys {message, type}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons.(…)

(client-side of course)

Just confirming, i'm using:

"babel-plugin-transform-class-properties": "^6.10.2",
"material-ui": "^0.16.2",
"meteor-node-stubs": "~0.2.0",
"react": "^15.3.2",
"react-addons-pure-render-mixin": "^15.3.2",
"react-dom": "^15.3.2",
"react-mounter": "^1.2.0",
"react-tap-event-plugin": "^1.0.0"

My meteor packages looks like:

react-meteor-data
accounts-password
zetoff:accounts-material-ui

I've been able to make a super-basic login component myself w/ the above packages, but it's no where near as feature complete as yours appears.

Steps:

Login, Log out. Now try logging back in.

image

Once i get this error i can't do anything, logging in/out, register, everything breaks until a full page reload.

@PolGuixe
Copy link
Contributor Author

@brendonlamb do you have a repo where I can try it?

@brendonlamb
Copy link

this appears to be giving me the same problem- just stripped down the little project i was working on as an example:

https://github.com/brendonlamb/zetoff-accounts-ui-test
be sure to run
meteor npm install

@PolGuixe
Copy link
Contributor Author

I am getting this error in the repo:

Uncaught Error: Cannot find module 'react/lib/EventPluginHub'
    at require (modules-runtime.js?hash=5b5615c…:119)
    at injectTapEventPlugin (modules.js?hash=e6ff4b1…:27666)
    at meteorInstall.imports.ui.components.App.jsx (App.jsx:7)
    at fileEvaluate (modules-runtime.js?hash=5b5615c…:191)
    at Module.require (modules-runtime.js?hash=5b5615c…:116)
    at Module.Mp.import (modules.js?hash=e6ff4b1…:331)
    at meteorInstall.client.main.js (main.js:1)
    at fileEvaluate (modules-runtime.js?hash=5b5615c…:191)
    at require (modules-runtime.js?hash=5b5615c…:116)
    at app.js?hash=bc5b07e…:378

Does it seems familiar?

Might it be related with... https://github.com/thereactivestack/meteor-webpack/issues/21?

@PolGuixe
Copy link
Contributor Author

I am getting these errors in the server console:

Unable to resolve some modules:

  "react/lib/EventPluginHub" in
/Users/PolGuixe/Documents/Developer/Meteor/Apps/tests/zetoff-accounts-ui-test/node_modules/react-tap-event-plugin/src/injectTapEventPlugin.js
(web.browser)
  "react/lib/EventConstants" in
/Users/PolGuixe/Documents/Developer/Meteor/Apps/tests/zetoff-accounts-ui-test/node_modules/react-tap-event-plugin/src/TapEventPlugin.js
(web.browser)
  "react/lib/EventPluginUtils" in
/Users/PolGuixe/Documents/Developer/Meteor/Apps/tests/zetoff-accounts-ui-test/node_modules/react-tap-event-plugin/src/TapEventPlugin.js
(web.browser)
  "react/lib/EventPropagators" in
/Users/PolGuixe/Documents/Developer/Meteor/Apps/tests/zetoff-accounts-ui-test/node_modules/react-tap-event-plugin/src/TapEventPlugin.js
(web.browser)
  "react/lib/SyntheticUIEvent" in
/Users/PolGuixe/Documents/Developer/Meteor/Apps/tests/zetoff-accounts-ui-test/node_modules/react-tap-event-plugin/src/TapEventPlugin.js
(web.browser)
  "react/lib/ViewportMetrics" in
/Users/PolGuixe/Documents/Developer/Meteor/Apps/tests/zetoff-accounts-ui-test/node_modules/react-tap-event-plugin/src/TapEventPlugin.js
(web.browser)

Might be related to having two copies of react as well...

@brendonlamb
Copy link

oh boy. well that's all new to me... both my apps doing this now with a wiped/refreshed node_modules ...

React updated to 15.4.0 about 2 hours ago... regardless this tap event plugin isn't working at all now... which is scary because a TON of stuff relies on it from what I can tell..

Ppl still having trouble w/ this apparently 3 minute lol!
https://github.com/thereactivestack/meteor-webpack/issues/21#issuecomment-260993338

So now i'm not getting the errors but that's because none of the touch/click events work on anything MUI ...

@brendonlamb
Copy link

.... mui/material-ui#5396

It was in the RC too

@PolGuixe
Copy link
Contributor Author

@brendonlamb I guess that if I roll back to React 15.3.2 I should be able to debug it.

@PolGuixe
Copy link
Contributor Author

@brendonlamb ok I found the problem. I'll need to find a bit of time to fix it.
The problem is related with the error messages which could not be rendered.

e.g. introducing a 6 characters password when the minimum is 7.

@PolGuixe
Copy link
Contributor Author

@brendonlamb fixed it. Let me know if v0.0.8 works for you.

@brendonlamb
Copy link

brendonlamb commented Nov 17, 2016

Just curious- in your tests what does your packages.json look like? Did you downgrade ultimately have to use React 15.3.2 ?

edit - i ask because i'm still having issues with the tap-event plugin.

@brendonlamb
Copy link

brendonlamb commented Nov 17, 2016

K it works!

"dependencies": { "babel-plugin-transform-class-properties": "^6.18.0", "material-ui": "^0.16.3", "meteor-node-stubs": "^0.2.4", "react": "^15.4.0", "react-addons-pure-render-mixin": "^15.4.0", "react-dom": "^15.4.0", "react-mounter": "^1.2.0", "react-tap-event-plugin": "^2.0.1" }

latest react, latest mui, latest react-tap-event-plugin": "^2.0.1

edit- Great works, thanks a ton!

@PolGuixe
Copy link
Contributor Author

Closing the issue ;)

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

2 participants