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

Permissions fixups #293

Merged
merged 5 commits into from
Nov 2, 2023
Merged

Conversation

praschke
Copy link
Collaborator

  • replace fetchInternal with fetch in the declarative path, remove webRequest from Chrome
  • fix the flakey bug from updateDynamicRules on Firefox, remove the webRequest path entirely
  • make nativeMessaging always optional (this has been possible for a while), unblock Firefox for Android
  • fix the environment recognition for firefox-mobile and guard the MeCab and nativeMessaging settings

while enabling the nativeMessaging permission on Firefox for Android might break the installation, the permissions toggles don't seem to enable them anyway (permissions work a bit differently on Android).

while the extension can be signed for Android, it can't actually be installed, as the only way to install extensions on Firefox for Android requires a release on AMO.

dynamic rules were never cleared, as the promise is not iterable as expected.
session rules are less persistent than dynamic rules, and the
intention of RequestBuilder is to only have rules active for the
lifetime of specific requests.
firefox was previously unable to use declarativeNetRequest, as some
browser state (ExtensionDNRStore) wasn't correctly initialized wrt
yomitan's use of the DNR API. this bug manifested as an unexpected
error on calls to updateDynamicRules(), specifically after the browser
has been restarted.

switching to the use of session rules instead of dynamic rules fixes
this bug. i have tested audio info requests (custom JSON, JPod
Alternate, Jisho) that exhibited the bug after browser restart on
version 115 and 118, and the audio plays instead of the request
failing.

webRequest can now be entirely removed.
this is the only blocker to Firefox for Android.
@praschke praschke requested a review from a team as a code owner October 29, 2023 23:34
@github-actions
Copy link

✔️ No visual differences introduced by this PR.

View Playwright Report (note: open the "playwright-report" artifact)

@praschke
Copy link
Collaborator Author

i just realized having session restore enabled may exhibit the same bug with session rules, but i checked and the bug is not present.

@djahandarie djahandarie added this pull request to the merge queue Nov 2, 2023
Merged via the queue into yomidevs:master with commit 092d1be Nov 2, 2023
6 checks passed
@praschke praschke deleted the permissions-fixups branch November 7, 2023 20:27
@djahandarie djahandarie added the kind/bug The issue or PR is regarding a bug label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug The issue or PR is regarding a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants