Closed Bug 1813821 Opened 2 years ago Closed 2 years ago

Frequent browsertime java.lang.SecurityException: Package org.mozilla.fenix has not requested permission android.permission.WRITE_EXTERNAL_STORAGE

Categories

(Fenix :: General, defect, P3)

All
Android
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1777710

People

(Reporter: boek, Unassigned)

References

Details

(Keywords: intermittent-failure)

From github: https://github.com/mozilla-mobile/fenix/issues/26359.

Test Run:

https://treeherder.mozilla.org/logviewer?job_id=386636915&repo=fenix

Stacktrace:

[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  adb Unable to grant runtime permission android.permission.WRITE_EXTERNAL_STORAGE to org.mozilla.fenix due to args: adb wait-for-device shell su -c 'pm grant org.mozilla.fenix android.permission.WRITE_EXTERNAL_STORAGE', exitcode: 255, stdout:
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  Exception occurred while executing 'grant':
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  java.lang.SecurityException: Package org.mozilla.fenix has not requested permission android.permission.WRITE_EXTERNAL_STORAGE
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:453)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1538)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1492)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1484)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2325)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:259)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at android.os.ShellCommand.exec(ShellCommand.java:44)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:26546)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at android.os.Binder.shellCommand(Binder.java:965)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at android.os.Binder.onTransact(Binder.java:839)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:5206)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:5247)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at android.os.Binder.execTransactInternal(Binder.java:1195)
[task 2022-08-08T06:33:58.337Z] 06:33:55     INFO -  	at android.os.Binder.execTransact(Binder.java:1159)

Build:

https://github.com/mozilla-mobile/fenix/commit/9255d351fde9ce858753f37c4641b299ef563dc7

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

I'm worried this may be connected to Android 11 / Android 13 permissions changes; not sure if this is an indicator of an actual upcoming concern, or perhaps just a test that needs to be updated (e.g., to accommodate a new system permission dialog at the right time).

Kash, I don't have a lot of knowledge in this space; is this something you have any additional insight into? We mostly just want to know if this is something that should be prioritized higher or lower.

Severity: -- → S4
Flags: needinfo?(kshampur)
Priority: -- → P3

hmm this looks similar to Bug 1777710
I'll bring this up in our triage meeting as well, as of right now I am not sure

Flags: needinfo?(kshampur)
See Also: → 1777710
Whiteboard: [perftest:triage]

So I think this is no longer an issue.
The command that would have triggered this is no longer in use and should've been fixed in Bug 1777710.

I'll close this as a duplicate, let our team know if this is not the case

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1777710
Resolution: --- → DUPLICATE
Whiteboard: [perftest:triage]
You need to log in before you can comment on or make changes to this bug.