mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.14k stars 2.91k forks source link

Mozilla Account sign-in page crashes Firefox #21229

Open clarmso opened 1 month ago

clarmso commented 1 month ago

Steps to reproduce

Expected behavior

For new account

For existing account

Actual behavior

Firefox crashed after entering an email for an existing account.

Device & build information

https://github.com/user-attachments/assets/1992989d-9a15-400b-89f1-7521156e171d

┆Issue is synchronized with this Jira Task

data-sync-user commented 1 month ago

➤ ih-codes commented:

Clare So I wasn’t able to duplicate this on main (I also tried resetting my sim and cleaning my xcode build).

Does it only crash with a staging server account?

If it’s specific to a staging account, how can I make one of those? 🤔

!Simulator Screen Recording - iPhone 15 - 2024-07-25 at 16.30.18.mp4|width=41.66666666666667%,alt="Simulator Screen Recording - iPhone 15 - 2024-07-25 at 16.30.18.mp4"!

data-sync-user commented 1 month ago

➤ Clare So commented:

ih-codes The issue could be specific to the server. 😌 Here are the steps to run the sync integration test that crashes Firefox ~60% of the time

cd firefox-ios/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests pipenv install pipenv run pytest test_integration.py::test_sync_bookmark_from_deviceThe test account has been created via a library used by the test automation. If you’d like a demo on how to run the test, please let me know. 🙂

data-sync-user commented 1 month ago

➤ ih-codes commented:

Update: Clare So has made a PR https://github.com/mozilla-mobile/firefox-ios/pull/21309 ( https://github.com/mozilla-mobile/firefox-ios/pull/21309|smart-link ) which may address the issue, and she will continue to monitor.

data-sync-user commented 1 month ago

➤ Clare So commented:

The issue can’t be reproduced under the FullFunctionalTestPlan but is reproducible under SyncIntegrationTestPlan. Let me take a look at the test plan.

data-sync-user commented 1 month ago

➤ Clare So commented:

More detailed (manual) reproduction steps:

  1. Run one sync integration test on the command line that involves signing in. cd firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests pipenv run pytest test_integration.py::test_sync_bookmark_from_device
  2. From the XCodebuild logs, get the credentials. The logs looks like the following: export FXA_EMAIL="" export FXA_PASSWORD=
  3. Leave the simulator opened as is.
  4. Open IntegrationTests.swift on Xcode. Change test plan to “SyncIntegrationTestPlan”.
  5. Update signInFxAccounts() with the credentials gotten from step 2. userState.fxaUsername = "" userState.fxaPassword = ""
  6. Run testFxASyncHistory() (or any tests that calls signInFxAccounts()).