Closed Bug 1838432 Opened 1 years ago Closed 1 year ago

[macOS] Safari history is not imported after selecting the browser folder to grant permission if there are no bookmarks inside Safari saved as well

Categories

(Firefox :: Migration, defect, P3)

Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
117 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- verified
firefox114 --- unaffected
firefox115 --- wontfix
firefox116 --- verified
firefox117 --- verified

People

(Reporter: atrif, Assigned: mconley)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

Found in

  • 116.0a1 (20230614040639)

Affected versions

  • 116.0a1 (20230614040639)

Tested platforms

  • Affected platforms: macOS 12, macOS 13 arm
  • Unaffected platforms: none

Preconditions

  • new macOS profile, or profile that has no Safari granted permissions for importing
  • have only History saved inside Safari browser with no user-created bookmarks

Steps to reproduce

  1. Open Firefox and import History from Safari.
  2. Select the Safari folder and asked and click open.

Expected result

  • Safari History is imported.

Actual result

  • Nothing happens, the file picker is opened again.

Regression range

  • Importing with these preconditions regressed with bug 1236916. Bug 1837604 fixed importing from Safari where the permission was not granted but this issue exists now. I can't find if the actual regressor is bug 1236916 due to bug 1837604.

Additional notes

  • Attached a screen recording: link
  • S3 because is most likely that users that import from Safari will have saved bookmarks as well and not only History.

Thanks, atrif! Notably, but 1837604 was uplifted to beta. Would you be able to check to see if the issue is also reproducible on beta once the next one is built?

Flags: needinfo?(atrif)
QA Whiteboard: [qa-regression-triage]

(In reply to Mike Conley (:mconley) (:⚙️) from comment #1)

Thanks, atrif! Notably, but 1837604 was uplifted to beta. Would you be able to check to see if the issue is also reproducible on beta once the next one is built?

Hello Mike! I can reproduce this with Firefox 115.0b6 treeherder build from 1837604#c11 on macOS 12. Will retry this tomorrow when I will verify bug 1837604 on an official beta build. History alone cannot be imported from the Safari browser. Bookmarks and History are imported as expected after creating at least a bookmark in Safari and restarting Firefox if it was running due to bug 1830233, I believe, because it will only import history, even if bookmarks are displayed in the migration window.

Flags: needinfo?(atrif)

Reproducible with 115.0b6 on macOS 12 and macOS 13 arm. Setting flags accordingly.

Note that having only History and Saved logins and passwords (signon.management.page.fileImport.enabled:true) on Safari on a macOS profile without read permissions the user won't be able to import Saved logins and passwords from .csv file if choosing to import from Safari due to the fact that the user can't pass the folder selection condition. All options are imported if the user has saved bookmarks. I don't know if should we file another issuer for that. As a workaround, The user can use the Import .csv option separately.

Priority: -- → P3

Dropping the regressionwindow-wanted flag because I can't find if this was introduced with bug 1236916 due to bug 1837604.

Hey atrif, I have a patch that I think fixes this - are you able to confirm with this try build?: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/R-bcKw8dTBy5conlTpvTEg/runs/0/artifacts/public/build/target.dmg

Flags: needinfo?(atrif)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #7)

Hey atrif, I have a patch that I think fixes this - are you able to confirm with this try build?: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/R-bcKw8dTBy5conlTpvTEg/runs/0/artifacts/public/build/target.dmg

Hello Mike I tested this on a new macOS 12.6 profile and the importing is working as expected when only history is saved inside Safari and the file picker issue is no longer occurring.

There are a few notes to mention:

  1. If Safari is opened for the first time on a new macOS profile and the history is imported on Firefox it will not work. Safari needs to be closed in order for the History to be imported. Restarting Firefox will no longer display Safari in the migration window.
  2. If Safari was closed before and then opened again and another history item made (e.g. 9gag.com) the 9.gag.com history will not be imported to Firefox until Safari is closed. This is somehow similar to bug 1822828. I'm assuming that the Safari database from the current session is exposed to Firefox only after Safari is closed.

I don't think that the above scenarios are real-life scenarios tho, because I'm assuming that Safari will be closed at least one time before importing is made on Firefox, but wanted to mention that. I have also a screen recording here starting after a new macOS profile is created and Safari is opened for the first time and not closed after.

Flags: needinfo?(atrif)

Okay, thanks!

Assignee: nobody → mconley
Attachment #9343803 - Attachment description: WIP: Bug 1838432 - Only check for read permissions on Safari files when the files exist. r?mstriemer! → Bug 1838432 - Only check for read permissions on Safari files when the files exist. r?mstriemer!
Status: NEW → ASSIGNED
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/854ea05f61e1 Only check for read permissions on Safari files when the files exist. r=mstriemer
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch

The patch landed in nightly and beta is affected.
:mconley, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox116 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(mconley)

Verified fixed with Firefox 117.0a1 (2023-07-26) on macOS 12 and macOS 13 arm. The history alone can be successfully imported from Safari after granting the Safari folder read permissions on a new macOS profile and the Safari browser was closed at least one time.
I also filled in a new issue (bug 1845514) that history cannot be imported from Safari (see comment 8) if the Safari browser was never closed before for awareness.

Comment on attachment 9343803 [details]
Bug 1838432 - Only check for read permissions on Safari files when the files exist. r?mstriemer!

Beta/Release Uplift Approval Request

  • User impact if declined: Users that attempt to migrate history from Safari that don't happen to have any bookmarks saved in Safari will find that they cannot do so.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This changes the Safari folder permission scheme to only check the readability of the bookmarks database if it exists. Same goes for the favicons and the history database.
  • String changes made/needed: None.
  • Is Android affected?: No
Flags: needinfo?(mconley)
Attachment #9343803 - Flags: approval-mozilla-beta?

I realize we're quite close to release, so this might not make the cut. If it doesn't make it, we might want to consider it as a ride-along if we send out a 116 dot release.

Duplicate of this bug: 1842696

Comment on attachment 9343803 [details]
Bug 1838432 - Only check for read permissions on Safari files when the files exist. r?mstriemer!

Switching flag because we are in RC week

Approved for 116.0rc2

Attachment #9343803 - Flags: approval-mozilla-beta? → approval-mozilla-release+
Flags: qe-verify+

Verified fixed with Firefox 116.0RC2 (20230727152340) on macOS 12 and macOS 13. History alone can be successfully imported on a macOS profile where Safari permission where not granted to Firefox if the Safari browser was closed at least one time before importing.

QA Whiteboard: [qa-regression-triage]
Flags: qe-verify+
Attachment #9343803 - Flags: approval-mozilla-esr115?

Comment on attachment 9343803 [details]
Bug 1838432 - Only check for read permissions on Safari files when the files exist. r?mstriemer!

Approved for 115.2esr.

Attachment #9343803 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+

Verified fixed with Firefox 115.2.0esr on macOS 12. History alone can be imported on a new macOS profile after selecting the Safari folder to grant permissions and the Safari browser was closed at least one time before import.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: