During test initialization, BrowserStack will attempt to login on the device using specified Google account credentials. In some cases, Google may pose a Two-Factor Authentication (2FA) that requires you to approve login using a trusted device or an One-Time Password (OTP) or by some other means. This will fail your test build. To fix this:
- Use a newly created Google account to sign in. Ensure that the account was never used to log in on any other device or browser.
- Turn off the account’s security settings – 2 Step verification and Use your phone to sign in
- Ensure that 1 google account is not used for login in multiple parallel sessions (keep the parallel runs below 5 preferably)
- If you observe increased flakiness, create a new account as sometimes Google suspects malicious usage if same account has been used from multiple different devices which becomes unavoidable in a public cloud setting like ours.
- If you are still facing issues with Google account login, please reach out to BrowserStack support team.