scrcpy: ERROR: java.lang.IllegalArgumentException: displayToken must not be null (Windows 1.13 compiled version with Android 9)
Environment
- OS: Windows 10
- scrcpy version: [e.g. 1.13]
- installation method: Windows compiled version
- device model: Xiaomi MI BOX 4K
- Android version: 9
I was able to connect to Android v8.1 on this box, but ever since the update to 9.0 I am getting this random error, not sure how to get past it.
Any ideas?
Thanks.
C:\cpy>scrcpy --render-driver=opengl
INFO: scrcpy 1.13 <https://github.com/Genymobile/scrcpy>
C:\cpy\scrcpy-server: 1 file pushed. 2.0 MB/s (27694 bytes in 0.013s)
[server] INFO: Device: Xiaomi MIBOX4 (Android 9)
[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:177)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:71)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:35)
at com.genymobile.scrcpy.Server.main(Server.java:177)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:340)
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:1625)
at android.view.SurfaceControl.setDisplaySurface(SurfaceControl.java:1117)
... 8 more
INFO: Renderer: opengl
INFO: OpenGL version: 4.0.0 - Build 10.18.10.4252
INFO: Trilinear filtering enabled
INFO: Initial texture: 1920x1080
WARN: Device disconnected
Press any key to continue...
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 30
Same issue with Android 12 beta. scrcpy version 1.17_1
You need scrcpy >= 1.18 for Android 12.
Install manually the latest version: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#simple
Installing Manually Works!!, thanks
for android 13 need last version
@crazyserb Could you test with the binary posted in #2129, please?