Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error java.lang.AssertionError: java.lang.reflect.InvocationTargetException, cant connect device #24

Open
mqnoy opened this issue Jun 18, 2022 · 0 comments

Comments

@mqnoy
Copy link

mqnoy commented Jun 18, 2022

docker-compose.yml

$ cat docker-compose.yml 
version: '3.7'

services:
  scrcpy:
    image: pierlo1/scrcpy:intel
    volumes:
      - /dev/bus/usb:/dev/bus/usb:ro
      - /tmp/.X11-unix:/tmp/.X11-unix:ro
      # preserve authorization keys
      - scrcpy_adb_keys:/root/.android
    environment:
      DISPLAY: $DISPLAY
      ADB_VENDOR_KEYS: /root/.android
    privileged: true
    tty: true
    network_mode: "host"

error log:

INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 3.9 MB/s (33622 bytes in 0.008s)
[server] INFO: Device: Realme RMX1921 (Android 12)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 20.1.9 (git-53b2b224dc)
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2336
WARN: Device disconnected
[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:216)
	at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:86)
	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:55)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:76)
	at com.genymobile.scrcpy.Server.main(Server.java:225)
	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)
	... 7 more
Caused by: java.lang.IllegalArgumentException: displayToken must not be null
	at android.view.SurfaceControl$Transaction.setDisplaySurface(SurfaceControl.java:3145)
	at android.view.SurfaceControl.setDisplaySurface(SurfaceControl.java:2214)
	... 9 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant