Closed Bug 1765461 Opened 4 years ago Closed 4 years ago

Perma [tier 2] java.lang.SecurityException: Package org.mozilla.fenix has not requested permission android.permission.WRITE_EXTERNAL_STORAGE

Categories

(Testing :: Condprofile, defect, P2)

defect

Tracking

(firefox-esr91 unaffected, firefox99 unaffected, firefox100 unaffected, firefox101+ fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox99 --- unaffected
firefox100 --- unaffected
firefox101 + fixed

People

(Reporter: intermittent-bug-filer, Assigned: jmaher)

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(3 external files)

Filed by: mlaza [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=375073230&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/S1UaH-HRR5yFejFcYyXFoQ/runs/0/artifacts/public/logs/live_backing.log


[task 2022-04-19T23:38:34.274Z] shell_bool: adb -s R58R37N85TE wait-for-device shell su -c 'test -d /data/local/tmp/org.mozilla.fenix-geckoview-config.yaml', timeout: None, timedout: None, exitcode: 1, output: 
[task 2022-04-19T23:38:34.274Z] command_output: adb -s R58R37N85TE wait-for-device push /tmp/tmpjl8ut6wc/org.mozilla.fenix-geckoview-config.yaml /data/local/tmp/org.mozilla.fenix-geckoview-config.yaml, timeout: None, timedout: None, exitcode: 0, output: /tmp/tmpjl8ut6wc/org.mozilla.fenix-geckoview-config.yaml: 1 file pushed, 0 skipped. 4.1 MB/s (428 bytes in 0.000s)
[task 2022-04-19T23:40:14.455Z] chmod: path=/data/local/tmp/org.mozilla.fenix-geckoview-config.yaml, recursive=True, mask=777
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'chmod -R 777 /data/local/tmp/org.mozilla.fenix-geckoview-config.yaml', timeout: None, timedout: None, exitcode: 0, output:
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c sync, timeout: None, timedout: None, exitcode: 0, output: 
[task 2022-04-19T23:40:14.455Z] chmod: path=/data/local/tmp/org.mozilla.fenix-geckoview-config.yaml, recursive=True, mask=777
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'chmod -R 777 /data/local/tmp/org.mozilla.fenix-geckoview-config.yaml', timeout: None, timedout: None, exitcode: 0, output:
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'am force-stop org.mozilla.fenix', timeout: None, timedout: None, exitcode: 0, output:
[task 2022-04-19T23:40:14.455Z] Granting important runtime permissions to org.mozilla.fenix
[task 2022-04-19T23:40:14.455Z] 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-04-19T23:40:14.455Z] Exception occurred while executing 'grant':
[task 2022-04-19T23:40:14.455Z] java.lang.SecurityException: Package org.mozilla.fenix has not requested permission android.permission.WRITE_EXTERNAL_STORAGE
[task 2022-04-19T23:40:14.455Z] 	at com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:453)
[task 2022-04-19T23:40:14.455Z] 	at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1538)
[task 2022-04-19T23:40:14.455Z] 	at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1492)
[task 2022-04-19T23:40:14.455Z] 	at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1484)
[task 2022-04-19T23:40:14.455Z] 	at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2325)
[task 2022-04-19T23:40:14.455Z] 	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:259)
[task 2022-04-19T23:40:14.455Z] 	at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
[task 2022-04-19T23:40:14.455Z] 	at android.os.ShellCommand.exec(ShellCommand.java:44)
[task 2022-04-19T23:40:14.455Z] 	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:26546)
[task 2022-04-19T23:40:14.455Z] 	at android.os.Binder.shellCommand(Binder.java:965)
[task 2022-04-19T23:40:14.455Z] 	at android.os.Binder.onTransact(Binder.java:839)
[task 2022-04-19T23:40:14.455Z] 	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:5206)
[task 2022-04-19T23:40:14.455Z] 	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:5247)
[task 2022-04-19T23:40:14.455Z] 	at android.os.Binder.execTransactInternal(Binder.java:1195)
[task 2022-04-19T23:40:14.455Z] 	at android.os.Binder.execTransact(Binder.java:1159)
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'pm grant org.mozilla.fenix android.permission.READ_EXTERNAL_STORAGE', timeout: None, timedout: None, exitcode: 0, output:
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'pm grant org.mozilla.fenix android.permission.ACCESS_COARSE_LOCATION', timeout: None, timedout: None, exitcode: 0, output:
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'pm grant org.mozilla.fenix android.permission.ACCESS_FINE_LOCATION', timeout: None, timedout: None, exitcode: 0, output:
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'pm grant org.mozilla.fenix android.permission.CAMERA', timeout: None, timedout: None, exitcode: 0, output:
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'pm grant org.mozilla.fenix android.permission.RECORD_AUDIO', timeout: None, timedout: None, exitcode: 0, output: 
[task 2022-04-19T23:40:14.455Z] launch_application: am start -W -n org.mozilla.fenix/org.mozilla.fenix.IntentReceiverActivity -a android.intent.action.VIEW -d about:blank
[task 2022-04-19T23:40:14.455Z] shell_output: adb -s R58R37N85TE wait-for-device shell su -c 'am start -W -n org.mozilla.fenix/org.mozilla.fenix.IntentReceiverActivity -a android.intent.action.VIEW -d about:blank', timeout: None, timedout: None, exitcode: 0, output: Starting: Intent { act=android.intent.action.VIEW dat=about:blank cmp=org.mozilla.fenix/.IntentReceiverActivity }
[task 2022-04-19T23:40:14.455Z] Status: ok
[task 2022-04-19T23:40:14.455Z] LaunchState: COLD
[task 2022-04-19T23:40:14.455Z] Activity: org.mozilla.fenix/.HomeActivity
[task 2022-04-19T23:40:14.455Z] TotalTime: 1292
[task 2022-04-19T23:40:14.455Z] WaitTime: 1299
[task 2022-04-19T23:40:14.455Z] Complete
See Also: → 1630826
Component: about:debugging → Condprofile
Product: DevTools → Testing
Has Regression Range: --- → yes

the WRITE_EXTERNAL_STORAGE fails on other fenix jobs and they pass, the issue here is in bug 1765348. I had thought those jobs were disabled prior to this landing.

It appears that setting run-on-projects: [] is not working.

Flags: needinfo?(jmaher)

Changing the priority to P2 as the bug is tracked by a release manager for the current nightly.
See Triage for Bugzilla for more information.
If you disagree, please discuss with a release manager.

Priority: P5 → P2
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Pushed by jmaher@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60fd2ca37d5e skip a51 condprof tasks by default. r=sparky
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
Regressions: 1765820
Pushed by jmaher@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/11ecf2c5eb7b fix cron filters to not scheduled a51 condprof. r=sparky
Pushed by jmaher@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/88ed9de0b409 fix run-on-projects for all condprof jobs. r=sparky
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: