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

fix: Cannot find Firefox package on device with work profile #2857

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

lm1
Copy link
Contributor

@lm1 lm1 commented Sep 1, 2023

On some devices with work profile enabled, adb shell pm list packages will fail with permission error.
Avoid reaching work profile and scan packages for the primary user instead.

@lm1 lm1 changed the title Scan packages of the primary user instead of the work profile fix: Cannot find Firefox package on device with work profile Sep 1, 2023
@lm1 lm1 force-pushed the patch-4 branch 2 times, most recently from 58558a8 to 5d1ed46 Compare September 2, 2023 07:46
@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (ac17631) 99.31% compared to head (f448aca) 99.26%.

❗ Current head f448aca differs from pull request most recent head 4f26012. Consider uploading reports for the commit 4f26012 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2857      +/-   ##
==========================================
- Coverage   99.31%   99.26%   -0.06%     
==========================================
  Files          32       32              
  Lines        1753     1760       +7     
==========================================
+ Hits         1741     1747       +6     
- Misses         12       13       +1     
Files Coverage Δ
src/util/adb.js 99.30% <87.50%> (-0.70%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/util/adb.js Outdated Show resolved Hide resolved
@lm1
Copy link
Contributor Author

lm1 commented Nov 12, 2023

Codecov complains about the new exception line testing the result of (am get-current-user), but that's extremally unlikely condition as the command result is tested earlier, so perhaps does not require an additional test.

src/util/adb.js Outdated Show resolved Hide resolved
src/util/adb.js Outdated Show resolved Hide resolved
tests/unit/test-util/test.adb.js Show resolved Hide resolved
tests/unit/test-util/test.adb.js Show resolved Hide resolved
tests/unit/test-util/test.adb.js Show resolved Hide resolved
Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

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

I started the review before the patch update; I'll drop the comments that I had below and will revisit this PR later for another review round.

tests/unit/test-util/test.adb.js Show resolved Hide resolved
tests/unit/test-util/test.adb.js Show resolved Hide resolved
@lm1
Copy link
Contributor Author

lm1 commented Nov 23, 2023

I started the review before the patch update; I'll drop the comments that I had below and will revisit this PR later for another review round.

Was in a bit of a haste due to a trip last week, but hope the PR is good to merge as of the last code push. Responded to the remaining comments.

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

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

Thanks for the patch and tests!

@Rob--W Rob--W merged commit 2bef8ce into mozilla:master Jan 16, 2024
4 checks passed
willdurand added a commit that referenced this pull request May 27, 2024
renovate bot referenced this pull request in JoshuaKGoldberg/refined-saved-replies May 31, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [web-ext](https://togithub.com/mozilla/web-ext) | [`^7.8.0` ->
`^8.0.0`](https://renovatebot.com/diffs/npm/web-ext/7.12.0/8.0.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/web-ext/8.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/web-ext/8.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/web-ext/7.12.0/8.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/web-ext/7.12.0/8.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mozilla/web-ext (web-ext)</summary>

### [`v8.0.0`](https://togithub.com/mozilla/web-ext/releases/tag/8.0.0)

[Compare
Source](https://togithub.com/mozilla/web-ext/compare/7.12.0...8.0.0)

#### What's changed

300+ commits have been written to get this new version 8 out of the door
(see link to the full changelog at the bottom). Please take a look at
the [official
documentation](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/)
to know what has changed but expect some breaking changes.

Specifically, `web-ext sign` has been heavily refactored. Among other
things, you can create new add-ons (not just versions) from the command
line now 🎉 Unfortunately, this command is not backward compatible
with v7.

While we're keeping the v7 branch around to ease the transition, we will
mainly fix bugs and introduce new features in v8.

#### New contributors

- [@&#8203;zmckenney](https://togithub.com/zmckenney) made their first
contribution in
[https://github.com/mozilla/web-ext/pull/2734](https://togithub.com/mozilla/web-ext/pull/2734)
- [@&#8203;uiolee](https://togithub.com/uiolee) made their first
contribution in
[https://github.com/mozilla/web-ext/pull/2843](https://togithub.com/mozilla/web-ext/pull/2843)
- [@&#8203;afonsojramos](https://togithub.com/afonsojramos) made their
first contribution in
[https://github.com/mozilla/web-ext/pull/2760](https://togithub.com/mozilla/web-ext/pull/2760)
- [@&#8203;lm1](https://togithub.com/lm1) made their first contribution
in
[https://github.com/mozilla/web-ext/pull/2857](https://togithub.com/mozilla/web-ext/pull/2857)
- [@&#8203;dotproto](https://togithub.com/dotproto) made their first
contribution in
[https://github.com/mozilla/web-ext/pull/3111](https://togithub.com/mozilla/web-ext/pull/3111)

**Full changelog**:
mozilla/web-ext@7.12.0...8.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/JoshuaKGoldberg/refined-saved-replies).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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