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

TypeError: Cannot read property 'getIn' of undefined #1317

Closed
jordanh opened this issue Sep 1, 2017 · 8 comments
Closed

TypeError: Cannot read property 'getIn' of undefined #1317

jordanh opened this issue Sep 1, 2017 · 8 comments
Assignees
Labels
Milestone

Comments

@jordanh
Copy link
Contributor

jordanh commented Sep 1, 2017

https://sentry.io/parabol/action-production/issues/340877351/

TypeError: Cannot read property 'getIn' of undefined
  at method (../node_modules/draft-js/lib/editOnInput.js:89)
  at func (../node_modules/draft-js/lib/DraftEditor.react.js:147)
  at invokeGuardedCallback (../node_modules/react-dom/lib/ReactErrorUtils.js:26)
  at executeDispatch (../node_modules/react-dom/lib/EventPluginUtils.js:85)
  at executeDispatchesInOrder (../node_modules/react-dom/lib/EventPluginUtils.js:108)
...
(13 additional frame(s) were not displayed)
@jordanh jordanh added the bug label Sep 1, 2017
@jordanh jordanh added this to the Hotfix milestone Sep 1, 2017
@jordanh
Copy link
Contributor Author

jordanh commented Sep 1, 2017

From user:

Hi Jordan! Just found a bug on Parabol. Was trying to add a card on my dashboard. When I went to type it in, the text didn't show up.

My response:

Whoa. That is really interesting! Thank you so much for reporting.

May I verify the steps that produced this bug?

  1. You hit the plus button to create a new Card
  2. You tried to type text on the Card, but the text did not show up

If you create a second card, did it still happen? If you reload the page, does it still happen?

Her response:

Yes, correct on the steps. I tried creating a second card and it wouldn't let me. I also tried refreshing, opened a new card and the same things happened.

Is this us, or draftjs?

@mattkrick
Copy link
Member

oh i'm glad we got backstory on this one, i was checking it out when sentry sent it and was totally confused.
It could be related to facebookarchive/draft-js#473
it came from /me, i tried reproducing with 1 team and many teams, i can't reproduce on production or local.
The problem is likely not ours, my hunch is that it's draft getting caught in a weird render cycle with react where it's finding the wrong editor on the page & when it looks up the key in that editor, it isn't found.
if that's the case, it may be possible that moving to react v16 could fix this since it has a different render algo.
just spitballing here... maybe since our onChange callback does a lot of stuff & queues up a lot of rerenders, on a slow machine react could be breaking those changes apart & we'd be ending up with an intermediary state if it can't do it all within the time allotted.

@jordanh
Copy link
Contributor Author

jordanh commented Sep 1, 2017

Turns out that this is happening with the Safari browser. Reproducible on mobile and on OSX desktop.

@ackernaut
Copy link
Member

@jordanh good find, we should probably start doing the UI walkthrough in Chrome, Safari and Firefox (a bit better than just looking at Chrome, right?).

@mattkrick
Copy link
Member

here's the issue in draft, verified that it's the parent drag container that's borking the whole thing: facebookarchive/draft-js#1326

i could try to tackle this one, or we could let the facebook folks + community go after it. the issue has been open for 3 weeks

@jordanh
Copy link
Contributor Author

jordanh commented Sep 1, 2017

What do we say to let this hang out for another week or so and see if they tackle it?

@mattkrick
Copy link
Member

mattkrick commented Sep 1, 2017 via email

@mattkrick
Copy link
Member

Curiosity got the best of me. 🙈
See facebookarchive/draft-js#1356
I'll change our dep to my branch & we can push to prod today.

@ghost ghost added the pr review label Sep 1, 2017
@jordanh jordanh closed this as completed in 9387d1a Sep 3, 2017
jordanh added a commit that referenced this issue Sep 3, 2017
update draft to my github branch fix #1317
@ghost ghost removed the pr review label Sep 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants