Open hisa13 opened 1 year ago
Zenfone 9 similar issue
$ scrcpy
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 fil...shed. 9.1 MB/s (24773 bytes in 0.003s)
[server] ERROR: Exception on thread Thread[main,5,main]
INFO: Initial texture: 1080x2400
WARN: Device disconnected
Error Messages changes from time to time:
$ scrcpy
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 fil...shed. 3.3 MB/s (24773 bytes in 0.007s)
INFO: Initial texture: 1080x2400
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:75)
at com.genymobile.scrcpy.ScreenEncoder.setDisplaySurface(ScreenEncoder.java:178)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:70)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
at com.genymobile.scrcpy.Server.main(Server.java:163)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:73)
... 6 more
Caused by: java.lang.IllegalArgumentException: displayToken must not be null
at android.view.SurfaceControl$Transaction.setDisplaySurface(SurfaceControl.java:3441)
at android.view.SurfaceControl.setDisplaySurface(SurfaceControl.java:2379)
... 8 more
WARN: Device disconnected
Use the latest version (1.12.1 is very old). Android 12 requires at least scrcpy 1.18.
Environment
When I tried to use scrcpy for adb connected zenfone max m2, it failed and output is below.
how can I solve this error?
thanks in advance