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 'join' of null #6694

Closed
danfinlay opened this issue Jun 6, 2019 · 0 comments · Fixed by #6743
Closed

TypeError: Cannot read property 'join' of null #6694

danfinlay opened this issue Jun 6, 2019 · 0 comments · Fixed by #6743
Assignees

Comments

@danfinlay
Copy link
Contributor

Seems new as of 6.6.0:
https://sentry.io/share/issue/a2e67b2f041d41f2b939e1ea5a7298be/

TypeError
Cannot read property 'join' of null

… ges/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js in parseSeedPhrase at line 81:38
return seedPhrase.trim().match(/\w+/g).join(' ');

Seems like some kind of issue with seed phrase imports.

The regex .w+ seems to match words, and so I guess this error is when people enter blank seed phrases. What isn't clear is why this suddenly spiked with version 6.6.0

whymarrh added a commit to whymarrh/metamask-extension that referenced this issue Jun 26, 2019
Fixes MetaMask#6694

This changeset fixes our parsing of seed phrases during import to handle the
case where a user tries to import a seed phrase that consists solely of whitespace.
We no longer produce an error and instead treat it as an incorrect seed phrase.
@whymarrh whymarrh added this to the UI Sprint 15 [June 24] milestone Jun 27, 2019
@whymarrh whymarrh self-assigned this Jun 27, 2019
whymarrh added a commit that referenced this issue Jun 27, 2019
* Add tests for ImportWithSeedPhrase#parseSeedPhrase

* Handle importing whitespace-only seed phrases

Fixes #6694

This changeset fixes our parsing of seed phrases during import to handle the
case where a user tries to import a seed phrase that consists solely of whitespace.
We no longer produce an error and instead treat it as an incorrect seed phrase.

* Handle importing more invalid seed phrases
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.

2 participants