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

Request for audio permission causes Wolvic to crash #1708

Open
javifernandez opened this issue Jan 22, 2025 · 2 comments
Open

Request for audio permission causes Wolvic to crash #1708

javifernandez opened this issue Jan 22, 2025 · 2 comments
Labels
bug Something isn't working chromium Issues related to the new Chromium backend unconfirmed

Comments

@javifernandez
Copy link
Member

javifernandez commented Jan 22, 2025

Configuration

Wolvic version: 1.2
Wolvic build ID:

Hardware: ML2

Steps to Reproduce

  1. Click on any of the michrophone icons in the UI (eg, url bar)
  2. A Dialog is shown asking about granting permissions to access the microphone
  3. Restart the app after crashing
  4. Go to Settings > Privacy and Security > Permissions
  5. Check the status of the 4 permissions Wolvic needs

Current Behavior

After step 2 Wolvic crashes.
After step 5, the granted permission to access the microphone is not shown in the corresponding radio button
If granted from there, a new dialog asking for permission is show; Wolvic crashes after granting it.

Expected Behavior

Wolvic shouldn't crash after granting permissions
The current status of the permissions Wolvic use should be correctly reflected in the settings dialog

Possible Solution

Context

Error Logs and Stack Traces

10200-10200 AndroidRuntime           D  Shutting down VM
10200-10200 AndroidRuntime           E  FATAL EXCEPTION: main (Ask Gemini)
                                        Process: com.igalia.wolvic, PID: 10200
                                        java.lang.RuntimeException: Unable to resume activity {com.igalia.wolvic/com.igalia.wolvic.VRBrowserActivity}: java.lang.SecurityException: Neither user 10125 nor current process has android.permission.WAKE_LOCK.
                                        	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4205)
                                        	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
                                        	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
                                        	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
                                        	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
                                        	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
                                        	at android.os.Handler.dispatchMessage(Handler.java:107)
                                        	at android.os.Looper.loop(Looper.java:214)
                                        	at android.app.ActivityThread.main(ActivityThread.java:7357)
                                        	at java.lang.reflect.Method.invoke(Native Method)
                                        	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:499)
                                        	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
                                        Caused by: java.lang.SecurityException: Neither user 10125 nor current process has android.permission.WAKE_LOCK.
                                        	at android.os.Parcel.createException(Parcel.java:2071)
                                        	at android.os.Parcel.readException(Parcel.java:2039)
                                        	at android.os.Parcel.readException(Parcel.java:1987)
                                        	at android.view.IWindowSession$Stub$Proxy.addToDisplay(IWindowSession.java:1242)
                                        	at android.view.ViewRootImpl.setView(ViewRootImpl.java:894)
                                        	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:387)
                                        	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
                                        	at android.app.Dialog.show(Dialog.java:342)
                                        	at android.app.Presentation.show(Presentation.java:250)
                                        	at com.igalia.wolvic.ui.OffscreenDisplay.onResume(OffscreenDisplay.java:113)
                                        	at com.igalia.wolvic.VRBrowserActivity.onResume(VRBrowserActivity.java:650)
                                        	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1453)
                                        	at android.app.Activity.performResume(Activity.java:7962)
                                        	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)
                                        	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237) 
                                        	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) 
                                        	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) 
                                        	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 
                                        	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
                                        	at android.os.Handler.dispatchMessage(Handler.java:107) 
                                        	at android.os.Looper.loop(Looper.java:214) 
                                        	at android.app.ActivityThread.main(ActivityThread.java:7357) 
                                        	at java.lang.reflect.Method.invoke(Native Method) 
                                        	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:499) 
                                        	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
                                        Caused by: android.os.RemoteException: Remote stack trace:
                                        	at android.app.ContextImpl.enforce(ContextImpl.java:1896)
                                        	at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1924)
                                        	at com.android.server.power.PowerManagerService$BinderService.acquireWakeLock(PowerManagerService.java:4415)
                                        	at android.os.PowerManager$WakeLock.acquireLocked(PowerManager.java:2193)
                                        	at android.os.PowerManager$WakeLock.acquire(PowerManager.java:2159)
10200-10200 AndroidRuntime           E  ro.java.core is set, making core file.. (Ask Gemini)
                                        java.lang.RuntimeException: Unable to resume activity {com.igalia.wolvic/com.igalia.wolvic.VRBrowserActivity}: java.lang.SecurityException: Neither user 10125 nor current process has android.permission.WAKE_LOCK.
                                        	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4205)
                                        	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
                                        	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
                                        	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
                                        	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
                                        	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
                                        	at android.os.Handler.dispatchMessage(Handler.java:107)
                                        	at android.os.Looper.loop(Looper.java:214)
                                        	at android.app.ActivityThread.main(ActivityThread.java:7357)
                                        	at java.lang.reflect.Method.invoke(Native Method)
                                        	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:499)
                                        	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
                                        Caused by: java.lang.SecurityException: Neither user 10125 nor current process has android.permission.WAKE_LOCK.
                                        	at android.os.Parcel.createException(Parcel.java:2071)
                                        	at android.os.Parcel.readException(Parcel.java:2039)
                                        	at android.os.Parcel.readException(Parcel.java:1987)
                                        	at android.view.IWindowSession$Stub$Proxy.addToDisplay(IWindowSession.java:1242)
                                        	at android.view.ViewRootImpl.setView(ViewRootImpl.java:894)
                                        	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:387)
                                        	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
                                        	at android.app.Dialog.show(Dialog.java:342)
                                        	at android.app.Presentation.show(Presentation.java:250)
                                        	at com.igalia.wolvic.ui.OffscreenDisplay.onResume(OffscreenDisplay.java:113)
                                        	at com.igalia.wolvic.VRBrowserActivity.onResume(VRBrowserActivity.java:650)
                                        	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1453)
                                        	at android.app.Activity.performResume(Activity.java:7962)
                                        	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)
                                        	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237) 
                                        	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) 
                                        	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) 
                                        	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 
                                        	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
                                        	at android.os.Handler.dispatchMessage(Handler.java:107) 
                                        	at android.os.Looper.loop(Looper.java:214) 
                                        	at android.app.ActivityThread.main(ActivityThread.java:7357) 
                                        	at java.lang.reflect.Method.invoke(Native Method) 
                                        	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:499) 
                                        	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
                                        Caused by: android.os.RemoteException: Remote stack trace:
                                        	at android.app.ContextImpl.enforce(ContextImpl.java:1896)
                                        	at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1924)
                                        	at com.android.server.power.PowerManagerService$BinderService.acquireWakeLock(PowerManagerService.java:4415)
                                        	at android.os.PowerManager$WakeLock.acquireLocked(PowerManager.java:2193)
                                        	at android.os.PowerManager$WakeLock.acquire(PowerManager.java:2159)
10
@javifernandez javifernandez added bug Something isn't working chromium Issues related to the new Chromium backend labels Jan 22, 2025
@svillar
Copy link
Member

svillar commented Jan 22, 2025

We had to disable the WAKE_LOCK because the Meta store does not allow it. So we have options here:

  • disable it only for Meta Store. The crash will eventually happen in Meta's chromium version
  • patch chromium to avoid the crash. We already do it in Gecko, but it's ugly
  • any other...

@svillar
Copy link
Member

svillar commented Jan 22, 2025

BTW I've just followed the same steps in a Quest2 and I didn't get any crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chromium Issues related to the new Chromium backend unconfirmed
Projects
None yet
Development

No branches or pull requests

2 participants