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

Don't crash when AppRatingPromptEntity fetch errors #2388

Merged
merged 9 commits into from
Jan 30, 2024

Conversation

graeme
Copy link
Contributor

@graeme graeme commented Jan 25, 2024

Task/Issue URL: https://app.asana.com/0/0/1206441184793818/f

Description:

Removes a fatal error when we try to fetch the AppRatingPromptEntity and it errors. We might want to add a Pixel here, but there’s a silent recovery from the case that the fetch yields no results, so maybe we’re fine to just do the same here?

Steps to test this PR:
This is hard to reproduce and the fix doesn’t seem like it could go wrong. However perhaps someone could sanity check this for me in case there’s a reason we’d want to crash or at least make a bit more noise when this happens

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than '

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16
  • iOS 17

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

@graeme graeme requested a review from bwaresiak January 25, 2024 17:17
@@ -1015,6 +1017,7 @@ extension Pixel.Event {
// MARK: - Return user measurement
case .debugReturnUserAddATB: return "m_debug_return_user_add_atb"
case .debugReturnUserUpdateATB: return "m_debug_return_user_update_atb"
case .appRatingPromptFetchError: return "m_app_rating_prompt_fetch_error"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use m_debug_ :)

do {
results = try context.fetch(fetchRequest)
} catch {
DailyPixel.fireDailyAndCount(pixel: .appRatingPromptFetchError, error: error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it send atb and appVersion? It should not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I missed this comment. ATB is a good point but thought we’d perhaps want to know when it’s fixed by using appVersion. It’s included in the privacy triage.

@graeme graeme requested a review from bwaresiak January 29, 2024 18:50
@bwaresiak
Copy link
Collaborator

@graeme What about sending atb and appVersion parameters?

Copy link
Collaborator

@bwaresiak bwaresiak left a comment

Choose a reason for hiding this comment

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

LGTM!

@graeme graeme merged commit 5dbcc43 into main Jan 30, 2024
10 checks passed
@graeme graeme deleted the graeme/fix-appstore-review-prompt-crash branch January 30, 2024 15:19
samsymons added a commit that referenced this pull request Feb 4, 2024
* main: (41 commits)
  Update BSK with autofill 10.1.0 (#2414)
  Bump submodules/privacy-reference-tests from `a3acc21` to `6b7ad1e` (#2408)
  Add Autoconsent onByDefault subfeature (#2423)
  Metadata reverted https://app.asana.com/0/0/1206476969305202/1206481077004998/f
  metadata updated
  Release 7.107.0-0 (#2421)
  More script fixes (#2419)
  More release script fixes (#2418)
  Release/7.106.0-4 (#2417)
  Reenable toggle on disallowing vpn (#2404) (#2416)
  Don't crash when AppRatingPromptEntity fetch errors (#2388)
  Add error codes to site breakage reports (#2413)
  Don't set dryRun for alpha builds (#2412)
  Add VPN redemption retry event (#2409)
  Changes to hotfix process (#2406)
  Release/7.106.0-3 changes (#2411)
  Fix tab loading (#2410)
  Improve waitlist invite code checks (#2398)
  Reenable toggle on disallowing vpn (#2404)
  Bump BrowserServicesKit to 103.0.2 (#2393)
  ...
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 this pull request may close these issues.

2 participants