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

When there's a boolean type, Android throws could not call object.keys on a non-object value #89

Closed
fbartho opened this issue Mar 8, 2018 · 0 comments
Assignees
Labels
blocking Prevents production or dev due to perf, bug, build error, etc.. bug 🐛 good first issue Issues that are suitable for first-time contributors. has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository

Comments

@fbartho
Copy link
Collaborator

fbartho commented Mar 8, 2018

When you have a query with the following properties, you get an unexpected error on Android:

  • Query has boolean values in its response/SelectionSet
  • RestLink has fieldNameNormalizer configured
  • You're running on react-native
  • You're running on Android
  • React-Native-Debugger / Chrome-Debugger are NOT attached (the debuggers inject their version of Object.keys()

This list of conditions exposes a difference in the Android implementation of Object.keys that causes an unexpected exception to be thrown.

Note: I have a fix, but because of the above, I can't write a unit test.

@fbartho fbartho self-assigned this Mar 8, 2018
@ghost ghost added blocking Prevents production or dev due to perf, bug, build error, etc.. good first issue Issues that are suitable for first-time contributors. has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository labels Mar 8, 2018
fbartho added a commit that referenced this issue Mar 8, 2018
Fixes #89 by enumerating goodness instead of enumerating badness!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking Prevents production or dev due to perf, bug, build error, etc.. bug 🐛 good first issue Issues that are suitable for first-time contributors. has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository
Projects
None yet
Development

No branches or pull requests

1 participant