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

Show error message inside downloads popup when download fails because OS issue #3576

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

jotaemepereira
Copy link
Collaborator

@jotaemepereira jotaemepereira commented Nov 20, 2024

Task/Issue URL: https://app.asana.com/0/1204006570077678/1208780258680374/f
Tech Design URL:
CC:

Description:
AC1
Given a user on macOS 14.7.1
When the user fails to download a fail with error code 256 and type NSFileReadUnknownError
Then we show an error banner with some guidance on how to update

AC2
Given a user on macOS 15.0.1
When the user fails to download a fail with error code 256 and type NSFileReadUnknownError
Then we show an error banner with some guidance on how to update

Notes:

non-sandboxed
sandboxed

Steps to test this PR:
To test this, you first need to mimic the error. To force this, go to WebKitDownloadTask, and after line 330, throw the following exception:

throw NSError.init(domain: NSCocoaErrorDomain, code: NSFileReadUnknownError)

Then, if you are not on macOS 14.7.1 or 15.0.1, you need to add your current OS to the isSpecificMacOSVersion function in the DownloadListViewModel.

If you want to test Sandbox vs Non-sandbox, you can change how the view is initialized in the DownloadsViewController line 140.

Definition of Done:


Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@jotaemepereira jotaemepereira force-pushed the juan/possible-fix-downloads branch 2 times, most recently from 32b064f to 25b7cb9 Compare November 20, 2024 20:30
Copy link
Contributor

github-actions bot commented Nov 20, 2024

Messages
📖

You seem to be updating localized strings. Make sure that you request translations and include translated strings before you ship your change. See Localization Guidelines for more information.

Generated by 🚫 dangerJS against 7ec6797

Copy link
Collaborator

@ayoy ayoy left a comment

Choose a reason for hiding this comment

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

@jotaemepereira thanks for this fix! It works well for me (I had to comment out a few more assert calls) and I only have an autolayout issue when there are more downloads on the list:

Screenshot 2024-11-21 at 08 44 58

Hopefully it's a simple fix.

@jotaemepereira jotaemepereira changed the base branch from main to release/1.115.0 November 21, 2024 12:00
@jotaemepereira jotaemepereira force-pushed the juan/possible-fix-downloads branch from 25b7cb9 to da11f6e Compare November 21, 2024 12:09
@jotaemepereira
Copy link
Collaborator Author

@ayoy Thanks for the feedback! The constraints issue should be fixed:

Screenshot 2024-11-21 at 10 01 31 AM

@jotaemepereira jotaemepereira force-pushed the juan/possible-fix-downloads branch from 7981942 to 7ec6797 Compare November 21, 2024 13:03
@jotaemepereira jotaemepereira requested a review from ayoy November 21, 2024 13:06
Copy link
Collaborator

@ayoy ayoy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks so much @jotaemepereira!

@jotaemepereira jotaemepereira merged commit 201bc03 into release/1.115.0 Nov 21, 2024
30 of 32 checks passed
@jotaemepereira jotaemepereira deleted the juan/possible-fix-downloads branch November 21, 2024 18:17
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