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: undefined is not an object (evaluating 'n.props.balance.me') #277

Closed
thomaseizinger opened this issue Nov 16, 2019 · 1 comment · Fixed by #279
Closed

TypeError: undefined is not an object (evaluating 'n.props.balance.me') #277

thomaseizinger opened this issue Nov 16, 2019 · 1 comment · Fixed by #279
Assignees

Comments

@thomaseizinger
Copy link
Member

https://sentry.io/organizations/nobtio/issues/1312916675/?referrer=github_plugin

TypeError: undefined is not an object (evaluating 'n.props.balance.me')
  at context (./src/routes/App/routes/balances/routes/name/components/PersonBalance/PersonBalance.js:38:34)
  at dispatch (./src/store/crashReporter.js:16:3)
  at next (./src/routes/App/modules/currentNobt/actions.js:20:5)
  at None (./src/store/crashReporter.js:16:3)
  at promiseReactionJob ([native code])
...
(11 additional frame(s) were not displayed)
@thomaseizinger thomaseizinger self-assigned this Nov 16, 2019
@thomaseizinger
Copy link
Member Author

Some investigation:

  1. This problem happens for the user "Blair", likely because their name includes a space at the end. This is something we should sanitize in the backend in the future, I've opened Better sanitization of inputs from the frontend api#105 for this.
  2. Interestingly, this issue only happens if one directly navigates to that page. Try the following to re-produce:

a. Go to https://nobt.io/yIGHL7SzDSrJ/balances/Blair, you will see a blank screen.
b. Go to https://nobt.io/yIGHL7SzDSrJ/balances and navigate to "Blair". Everything works.

This seems to have to do with our routing and monomorphization of the makeGetBalance function that we use to retrieve the balance of a particular user from the redux store. This issue should be fixable once we completely move away from redux, however, this requires some more work with transitioning to fully utilize React's new hooks.

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

Successfully merging a pull request may close this issue.

1 participant