scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

ERROR: Could not invoke method (Google Pixel 7 Android 15 Beta 1)

Open debug-cli opened this issue 1 year ago • 1 comments

  • [x] I have read the FAQ.
  • [x] I have searched in existing issues.

Environment

  • OS: Zorin OS (Debian)
  • scrcpy version: 1.21
  • installation method: apt
  • device model: Google Pixel
  • Android version: 15 Beta 1 (shows Android 14 on scrcpy output)

Describe the bug I do not know exactly what the bug is. Since i have upgraded to Android 14 beta, (I'm in Android 15 now, this is just when it started.) this server error has been happening and i think it has something to do with Java.

On errors, please provide the output of the console (and adb logcat if relevant).

scrcpy 1.21 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed. 0.8 MB/s (39473 bytes in 0.045s)
[server] INFO: Device: Google Pixel 7 (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, int]
	at java.lang.Class.getMethod(Class.java:2950)
	at java.lang.Class.getMethod(Class.java:2450)
	at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:103)
	at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:111)
	at com.genymobile.scrcpy.Device.<init>(Device.java:93)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:63)
	at com.genymobile.scrcpy.Server.main(Server.java:309)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2400
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
	at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:83)
	at com.genymobile.scrcpy.ScreenEncoder.createDisplay(ScreenEncoder.java:229)
	at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:75)
	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:65)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:93)
	at com.genymobile.scrcpy.Server.main(Server.java:309)
WARN: Device disconnected
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
	at java.lang.Class.getMethod(Class.java:2950)
	at java.lang.Class.getMethod(Class.java:2450)
	at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:81)
	... 7 more
WARN: Killing the server...

Please do not post screenshots of your terminal, just post the content as text instead.

debug-cli avatar Apr 22 '24 01:04 debug-cli

scrcpy 1.21

Way too old.

Uninstall the package and install the latest version: https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md#latest-version

rom1v avatar Apr 22 '24 05:04 rom1v