Closed Bug 1621380 Opened 4 years ago Closed 7 days ago

After calling reject in a onAndroidPermissionsRequest we still get a onMediaPermissionRequest

Categories

(GeckoView :: Media, defect, P2)

75 Branch
Unspecified
Android

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: imanol.martin, Unassigned, NeedInfo)

Details

(Whiteboard: [fxr:p1] [geckoview:m81])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

Actual results:

The app crashes:

android.os.ServiceSpecificException
at android.os.Parcel.readException(Parcel.java:1715)
at android.os.Parcel.readException(Parcel.java:1654)
at android.hardware.ICameraService$Stub$Proxy.connectDevice(ICameraService.java:324)
at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:334)
at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:488)
at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:452)
at org.webrtc.Camera2Session.<init>(Camera2Session.java:42)
at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:2)
at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:10)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:173)
at android.os.HandlerThread.run(HandlerThread.java:61)

Expected results:

We shouldn't get a permission request as we are explicitly rejecting the camera permission for platforms that don't have camera support like the Vive Focus Plus or Pico.

We call reject on the onAndroidPermissionsRequest callback but we still get the onMediaPermissionRequest call.

This worked well with 74.0.20200107215758

We are currently using: 75.0.20200304084140

Crash Signature: android.os.ServiceSpecificException at android.os.Parcel.readException(Parcel.java:1715) at android.os.Parcel.readException(Parcel.java:1654) at android.hardware.ICameraService$Stub$Proxy.connectDevice(ICameraService.java:324) at android.hardware.…
OS: All → Android
Priority: -- → P1
Crash Signature: android.os.ServiceSpecificException at android.os.Parcel.readException(Parcel.java:1715) at android.os.Parcel.readException(Parcel.java:1654) at android.hardware.ICameraService$Stub$Proxy.connectDevice(ICameraService.java:324) at android.hardware.…
Summary: After caling reject in a onAndroidPermissionsRequest we still get a onMediaPermissionRequest → After calling reject in a onAndroidPermissionsRequest we still get a onMediaPermissionRequest
Priority: P1 → --
Whiteboard: [fxr:p1]
Assignee: nobody → esawin
Priority: -- → P2
Rank: 7
Whiteboard: [fxr:p1] → [fxr:p1][geckoview:m77]
Priority: P2 → P1
Whiteboard: [fxr:p1][geckoview:m77] → [fxr:p1][geckoview:m78]

I cannot reproduce this with the latest GV. The site calls getUserMedia which prompts for the device permission first and doesn't prompt for the content permission if the former is denied.

Manuel, is this still an issue for you?

Flags: needinfo?(imanol.martin)

I have tested and this is already fixed in v77. Everything works as expected.

Thanks!

Flags: needinfo?(imanol.martin)
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Whiteboard: [fxr:p1][geckoview:m78] → [fxr:p1]

This seems to have regressed in v79. (79.0.20200625094452) It's crashing again, same STRs.

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---
Whiteboard: [fxr:p1] → [fxr:p1] [geckoview:m81]

I'm still not able to reproduce this issue with the latest GV.
Maybe I'm testing the wrong scenario?

I've set GVE to reject the onAndroidPermissionsRequest for the camera, which is I think what you do on those devices.
Once the Android permission is rejected, I don't get the onMediaPermissionRequest.

Flags: needinfo?(imanol.martin)
Priority: P1 → P2

The bug assignee didn't login in Bugzilla in the last 7 months.
:amoya, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: esawin → nobody
Flags: needinfo?(amoya)

Moving some media bugs to the new GeckoView::Media component.

Component: General → Media
Flags: needinfo?(amoya)
Severity: normal → S3
Rank: 7 → 222

Could not reproduce, logs show with no crash:

Web Content: Getting user media failed: NotAllowedError: The request is not allowed by the user agent or the platform in the current context.
GeckoSession: handleMessage: GeckoView:DismissClipboardPermissionRequest
Status: REOPENED → RESOLVED
Closed: 4 years ago7 days ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.