google / gapid

Graphics API Debugger
https://gapid.dev
Apache License 2.0
2.21k stars 328 forks source link

Tracing Failed Cause: Could not start trace Cause: Setting up the layer Cause: settings put returned error #3879

Open chubei-oppen opened 2 years ago

chubei-oppen commented 2 years ago

GAPID Version: 1.6.1:338bb67b0fe291f56f31d69f11ea1a45ed7cfeb6 OS: linux amd64

Steps: Capture a new trace

Device is running Android 11.

Log:

com.google.gapid.server.Client$InternalServerErrorException: Tracing Failed
   Cause: Could not start trace
   Cause: Setting up the layer
   Cause: settings put returned error: 
Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
    at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2378)
    at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1413)
    at com.android.providers.settings.SettingsProvider.insertGlobalSetting(SettingsProvider.java:1367)
    at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:501)
    at android.content.ContentProvider.call(ContentProvider.java:2448)
    at android.content.ContentProvider$Transport.call(ContentProvider.java:517)
    at com.android.providers.settings.SettingsService$MyShellCommand.putForUser(SettingsService.java:375)
    at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:277)
    at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
    at android.os.ShellCommand.exec(ShellCommand.java:44)
    at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
    at android.os.Binder.shellCommand(Binder.java:936)
    at android.os.Binder.onTransact(Binder.java:820)
    at android.os.Binder.execTransactInternal(Binder.java:1166)
    at android.os.Binder.execTransact(Binder.java:1130)
    at com.google.gapid.server.Client.throwIfError(Client.java:312)
    at com.google.gapid.server.Client.lambda$streamTrace$52(Client.java:286)
    at com.google.gapid.server.GapidClientGrpc$StreamHandler.onNext(GapidClientGrpc.java:224)
    at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:421)
    at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33)
    at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:519)
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.google.gapid.server.Client$Stack: For request: RPC->streamTrace()
    at com.google.gapid.server.Client.streamTrace(Client.java:283)
    at com.google.gapid.server.Tracer.trace(Tracer.java:41)
    at com.google.gapid.views.TracerDialog.showTracingDialog(TracerDialog.java:149)
    at com.google.gapid.LoadingScreen.lambda$createOptions$0(LoadingScreen.java:114)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5797)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1374)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
    at org.eclipse.swt.widgets.Widget.sendSelectionEvent(Widget.java:1514)
    at org.eclipse.swt.widgets.Link.gtk_button_release_event(Link.java:387)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1970)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:6524)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:6014)
    at org.eclipse.swt.internal.gtk.GTK._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(GTK.java:4118)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1414)
    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1596)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4581)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:821)
    at org.eclipse.jface.window.Window.open(Window.java:797)
    at com.google.gapid.Main$UI.show(Main.java:119)
    at com.google.gapid.Main.main(Main.java:68)