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

Fixes crash when entering non ascii username during account creation #6736

Merged
merged 3 commits into from
Aug 9, 2022

Conversation

ouchadam
Copy link
Contributor

@ouchadam ouchadam commented Aug 4, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

  • Handles the exception throwing of the username availability check

Motivation and context

Fixes #6735

To avoid a crash when non ascii characters are used in the username during account creation

Screenshots / GIFs

Before After
before-non-ascii-account after-ascii

Tests

  • In the account creation screen
  • Enter non ascii characters in the username field

Tested devices

  • Physical
  • Emulator
  • OS version(s): 28

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 4, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

77.8% 77.8% Coverage
0.0% 0.0% Duplication

@ouchadam ouchadam requested review from a team and ericdecanini and removed request for a team August 5, 2022 11:09
@ouchadam ouchadam added the Z-NextRelease For issues and PRs which should be included in the NextRelease. label Aug 8, 2022
@ouchadam ouchadam requested review from a team and Claire1817 and removed request for ericdecanini and a team August 8, 2022 11:27
@ouchadam ouchadam added the PR-Small PR with less than 20 updated lines label Aug 8, 2022
)
}
}
runCatching { registrationWizard.registrationAvailable(userName) }.fold(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the runCatching is the fix

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one weird behaviour when trying to go back:

emoji_back.webm

It seems like checkUserNameAvailability is getting called on that case too.

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the issue above was fixed in #6741. After rebasing develop and testing again, it's working fine.

@ouchadam
Copy link
Contributor Author

ouchadam commented Aug 9, 2022

(We've spoke in the room) The backflow is handled by #6741 this PR is slightly behind develop

@ouchadam ouchadam merged commit 58d47df into develop Aug 9, 2022
@ouchadam ouchadam deleted the feature/adm/non-ascii-username branch August 9, 2022 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Small PR with less than 20 updated lines Z-NextRelease For issues and PRs which should be included in the NextRelease.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when entering non ascii characters in account creation
2 participants