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

Speculative password import prompt crash fix #3569

Closed

Conversation

graeme
Copy link
Contributor

@graeme graeme commented Nov 12, 2024

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

Description:

Just a BSK bump for a macOS crash fix.

Steps to test this PR:
Just green CI

Definition of Done (Internal Only):

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 15
  • iOS 16
  • iOS 17

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

@graeme graeme self-assigned this Nov 12, 2024
@graeme graeme requested a review from amddg44 November 12, 2024 16:42
@graeme graeme marked this pull request as ready for review November 12, 2024 16:42
Copy link
Contributor

@amddg44 amddg44 left a comment

Choose a reason for hiding this comment

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

The unit tests timed out on the first pass (unrelated to this), all good on the second run

graeme added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Nov 14, 2024
Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1203822806345703/1208648341254407/f
iOS PR: duckduckgo/iOS#3569
macOS PR: duckduckgo/macos-browser#3542
What kind of version bump will this require?: Patch

**Description**:

There's a crash in moderate numbers which is occurring during the
password import prompt flow. This is speculative fix for that.

The reason seemed to be that the `replyHandler` was being called too
many times. However:
- The docs for
`userContentController:didReceiveScriptMessage:replyHandler:` say " The
replyHandler can be called at most once. If the replyHandler is
deallocated before it is called, the Promise will be rejected with a
JavaScript Error object
 with an appropriate message indicating the handler was never called."
- In the case of `startCredentialsImportFlow` where the crash is
occurring, the JS is not awaiting. So there is no need to call the
replyHandler.

**Steps to test this PR**:
Just smoke tests for the feature:
https://app.asana.com/0/1142021229838617/1208543152554655/f

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

---
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
@graeme
Copy link
Contributor Author

graeme commented Nov 14, 2024

This PR was superceded already and BSK has been updated. So I'll just close

@graeme graeme closed this Nov 14, 2024
mgurgel pushed a commit to duckduckgo/BrowserServicesKit that referenced this pull request Nov 18, 2024
Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1203822806345703/1208648341254407/f
iOS PR: duckduckgo/iOS#3569
macOS PR: duckduckgo/macos-browser#3542
What kind of version bump will this require?: Patch

**Description**:

There's a crash in moderate numbers which is occurring during the
password import prompt flow. This is speculative fix for that.

The reason seemed to be that the `replyHandler` was being called too
many times. However:
- The docs for
`userContentController:didReceiveScriptMessage:replyHandler:` say " The
replyHandler can be called at most once. If the replyHandler is
deallocated before it is called, the Promise will be rejected with a
JavaScript Error object
 with an appropriate message indicating the handler was never called."
- In the case of `startCredentialsImportFlow` where the crash is
occurring, the JS is not awaiting. So there is no need to call the
replyHandler.

**Steps to test this PR**:
Just smoke tests for the feature:
https://app.asana.com/0/1142021229838617/1208543152554655/f

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

---
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
@graeme graeme deleted the graeme/speculative-password-import-prompt-crash-fix branch December 17, 2024 14:15
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.

3 participants