Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
109.93k stars 10.56k forks source link

Scrcpy bug : could not invoke method #4434

Closed Feeline96 closed 10 months ago

Feeline96 commented 10 months ago

[Y] I have read the FAQ. [Y] I have searched in existing issues. Environment

OS: [Windows] scrcpy version: [scrcpy 2.0] Windows Release 64 Bit. device model: SAMSUNG Galaxy S23 Ultra (Android 13) Android version: [e.g. 13]

The terminal connects and the mobile screen appears but when i click and move on the screen nothing is reponding,

scrcpy 2.0 https://github.com/Genymobile/scrcpy D:\scrcpy-win64-v2.0\scrcpy-server: 1 file pushed, 0 skipped. 54.2 MB/s (52867 bytes in 0.001s) [server] INFO: Device: samsung SM-S918B (Android 14) [server] ERROR: Could not invoke method java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int] at java.lang.Class.getMethod(Class.java:2937) at java.lang.Class.getMethod(Class.java:2449) at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:129) at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:139) at com.genymobile.scrcpy.Device.(Device.java:100) at com.genymobile.scrcpy.Server.scrcpy(Server.java:64) at com.genymobile.scrcpy.Server.main(Server.java:381) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:415) [server] ERROR: Exception on thread Thread[Thread-2,5,main] java.lang.AssertionError: java.lang.reflect.InvocationTargetException at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:72) at com.genymobile.scrcpy.Device.injectEvent(Device.java:192) at com.genymobile.scrcpy.Device.injectKeyEvent(Device.java:203) at com.genymobile.scrcpy.Device.pressReleaseKeycode(Device.java:211) at com.genymobile.scrcpy.Device.pressReleaseKeycode(Device.java:216) at com.genymobile.scrcpy.Controller.control(Controller.java:70) at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:90) at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda0.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:1012) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:69) ... 8 more Caused by: java.lang.NullPointerException at java.util.Objects.requireNonNull(Objects.java:207) at android.hardware.input.InputManager.getInstance(InputManager.java:401) ... 10 more [server] ERROR: Exception on thread Thread[Thread-4,5,main] java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.getDeviceId()' on a null object reference at android.content.ContextWrapper.getDeviceId(ContextWrapper.java:1252) at android.media.AudioRecord.resolveSessionId(AudioRecord.java:1175) at android.media.AudioRecord.(AudioRecord.java:476) at android.media.AudioRecord.(Unknown Source:0) at android.media.AudioRecord$Builder.build(AudioRecord.java:1062) at com.genymobile.scrcpy.AudioCapture.createAudioRecord(AudioCapture.java:58) at com.genymobile.scrcpy.AudioCapture.start(AudioCapture.java:90) at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:183) at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120) at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:1012) INFO: Renderer: direct3d WARN: Demuxer 'audio': stream explicitly disabled by the device INFO: Initial texture: 1080x2312

Feeline96 commented 10 months ago

The debogged usb is activated

Feeline96 commented 10 months ago

I found to dl the v2.1.1 for Scrcpy, now i can click on the screen