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: WARN: Device disconnected + WARN: Could not terminate server #1074

Closed
Dpmab-dot opened this issue Jan 10, 2020 · 11 comments
Closed

Error: WARN: Device disconnected + WARN: Could not terminate server #1074

Dpmab-dot opened this issue Jan 10, 2020 · 11 comments

Comments

@Dpmab-dot
Copy link

I keep getting the following error every time I try to execute scrcpy:

INFO: scrcpy 1.12.1 https://github.com/Genymobile/scrcpy
C:\Users\david\OneDrive\Software\scrcpy-win64-v1.12.1\scrcpy-server: 1 file pushed. 3.1 MB/s (26202 bytes in 0.008s)
INFO: Initial texture: 1080x2216
WARN: Device disconnected
WARN: Could not terminate server
Press any key to continue...

After pressing enter, the entire thing closes.

Any help will be appreciated.

Thanks.

@rom1v
Copy link
Collaborator

rom1v commented Jan 10, 2020

This happens when your device is disconnected. Try with another USB cable or port: #281 #283

@That1GuyTy
Copy link

This happens to me randomly while i'm using my device. Is there a way to look at logs and see what's causing it? It only happens on one machine.

@rom1v
Copy link
Collaborator

rom1v commented Jan 28, 2020

Run adb logcat in a separate terminal. If it stops at the same time as scrcpy, it's an adb disconnection. Check USB ports and cables.

@That1GuyTy
Copy link

I swapped the USB cable and that fixed the issue. Thanks.

@rom1v rom1v closed this as completed Feb 6, 2020
@yuxiatongzhi
Copy link

Fixed:
scrcpy --max-size 1024

02-28 16:39:29.402  8398  8398 E AndroidRuntime: catch exception for handle application crash
02-28 16:39:29.402  8398  8398 E AndroidRuntime: FATAL EXCEPTION: main
02-28 16:39:29.402  8398  8398 E AndroidRuntime: PID: 8398
02-28 16:39:29.402  8398  8398 E AndroidRuntime: android.media.MediaCodec$CodecException: Error 0xfffffc0e
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at android.media.MediaCodec.native_configure(Native Method)
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at android.media.MediaCodec.configure(MediaCodec.java:2023)
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at android.media.MediaCodec.configure(MediaCodec.java:1951)
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at com.genymobile.scrcpy.ScreenEncoder.configure(ScreenEncoder.java:167)
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:68)
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at com.genymobile.scrcpy.Server.main(Server.java:163)
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
02-28 16:39:29.402  8398  8398 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
02-28 16:39:29.403  8398  8398 E scrcpy  : Exception on thread Thread[main,5,main]
02-28 16:39:29.403  8398  8398 E scrcpy  : android.media.MediaCodec$CodecException: Error 0xfffffc0e
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at android.media.MediaCodec.native_configure(Native Method)
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at android.media.MediaCodec.configure(MediaCodec.java:2023)
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at android.media.MediaCodec.configure(MediaCodec.java:1951)
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at com.genymobile.scrcpy.ScreenEncoder.configure(ScreenEncoder.java:167)
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:68)
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at com.genymobile.scrcpy.Server.main(Server.java:163)
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
02-28 16:39:29.403  8398  8398 E scrcpy  : 	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
02-28 16:39:29.406  8398  8398 E scrcpy  : The hardware encoder is not able to encode at the given definition.
02-28 16:39:29.406  8398  8398 E scrcpy  : Try with a lower definition:
02-28 16:39:29.406  8398  8398 E scrcpy  :     scrcpy -m 1024
02-28 16:39:29.407  8398  8398 I app_process: System.exit called, status: 0
02-28 16:39:29.407  8398  8398 I AndroidRuntime: VM exiting with result code 0.

@Charless217
Copy link

Reparado: scrcpy --max-size 1024

02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: excepción de captura para el bloqueo de la aplicación de control
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: EXCEPCIÓN FATAL: principal
02-28 16: 39: 29.402 8398 8398 E Android Tiempo de ejecución: PID: 8398
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: android.media.MediaCodec $ CodecException : Error 0xfffffc0e
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en android.media.MediaCodec.native_configure (método nativo)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en android.media.MediaCodec.configure (MediaCodec.java:2023)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en android.media.MediaCodec.configure (MediaCodec.java:1951)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.genymobile.scrcpy.ScreenEncoder.configure (ScreenEncoder.java:167)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.genymobile.scrcpy.ScreenEncoder.streamScreen (ScreenEncoder.java:68)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.genymobile.scrcpy.Server.scrcpy (Server.java:34)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.genymobile.scrcpy.Server.main (Server.java:163)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.android.internal.os.RuntimeInit.nativeFinishInit (método nativo)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.android.internal.os.RuntimeInit.main (RuntimeInit.java:359)
02-28 16: 39: 29.403 8398 8398 E scrcpy   : Excepción en el hilo Thread [main, 5, main]
02-28 16: 39: 29.403 8398 8398 E scrcpy   : android.media.MediaCodec $ CodecException : Error 0xfffffc0e
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en android.media.MediaCodec.native_configure (método nativo)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en android.media.MediaCodec.configure (MediaCodec.java:2023)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en android.media.MediaCodec.configure (MediaCodec.java:1951)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.genymobile.scrcpy.ScreenEncoder.configure (ScreenEncoder.java:167)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.genymobile.scrcpy.ScreenEncoder.streamScreen (ScreenEncoder.java:68)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.genymobile.scrcpy.Server.scrcpy (Server.java:34)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.genymobile.scrcpy.Server.main (Server.java:163)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.android.internal.os.RuntimeInit.nativeFinishInit (método nativo)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.android.internal.os.RuntimeInit.main (RuntimeInit.java:359)
02-28 16: 39: 29.406 8398 8398 E scrcpy   : El codificador de hardware no puede codificar en la definición dada.
02-28 16: 39: 29.406 8398 8398 E scrcpy   : Pruebe con una definición más baja:
02-28 16: 39: 29.406 8398 8398 E scrcpy   :      scrcpy -m 1024
02-28 16: 39: 29.407 8398 8398 I app_process: System.exit llamado, estado: 0
02-28 16: 39: 29.407 8398 8398 I AndroidRuntime: VM saliendo con el código de resultado 0.

Excellent contribution, I was already desperate not to know how to correct the error.

@ghost
Copy link

ghost commented Nov 4, 2021

Hi there,
Please check my screenshot and explain me how can I solve this problem. Please do anything very quickly.
Screenshot_1

@alexkutsan
Copy link

I had te same issue.
@jabir423
Solution
#1074 (comment) works for me

@ildaneta
Copy link

Reparado: scrcpy --max-size 1024

02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: excepción de captura para el bloqueo de la aplicación de control
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: EXCEPCIÓN FATAL: principal
02-28 16: 39: 29.402 8398 8398 E Android Tiempo de ejecución: PID: 8398
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: android.media.MediaCodec $ CodecException : Error 0xfffffc0e
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en android.media.MediaCodec.native_configure (método nativo)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en android.media.MediaCodec.configure (MediaCodec.java:2023)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en android.media.MediaCodec.configure (MediaCodec.java:1951)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.genymobile.scrcpy.ScreenEncoder.configure (ScreenEncoder.java:167)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.genymobile.scrcpy.ScreenEncoder.streamScreen (ScreenEncoder.java:68)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.genymobile.scrcpy.Server.scrcpy (Server.java:34)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.genymobile.scrcpy.Server.main (Server.java:163)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.android.internal.os.RuntimeInit.nativeFinishInit (método nativo)
02-28 16: 39: 29.402 8398 8398 E AndroidRuntime: en com.android.internal.os.RuntimeInit.main (RuntimeInit.java:359)
02-28 16: 39: 29.403 8398 8398 E scrcpy   : Excepción en el hilo Thread [main, 5, main]
02-28 16: 39: 29.403 8398 8398 E scrcpy   : android.media.MediaCodec $ CodecException : Error 0xfffffc0e
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en android.media.MediaCodec.native_configure (método nativo)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en android.media.MediaCodec.configure (MediaCodec.java:2023)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en android.media.MediaCodec.configure (MediaCodec.java:1951)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.genymobile.scrcpy.ScreenEncoder.configure (ScreenEncoder.java:167)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.genymobile.scrcpy.ScreenEncoder.streamScreen (ScreenEncoder.java:68)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.genymobile.scrcpy.Server.scrcpy (Server.java:34)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.genymobile.scrcpy.Server.main (Server.java:163)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.android.internal.os.RuntimeInit.nativeFinishInit (método nativo)
02-28 16: 39: 29.403 8398 8398 E scrcpy   :  	en com.android.internal.os.RuntimeInit.main (RuntimeInit.java:359)
02-28 16: 39: 29.406 8398 8398 E scrcpy   : El codificador de hardware no puede codificar en la definición dada.
02-28 16: 39: 29.406 8398 8398 E scrcpy   : Pruebe con una definición más baja:
02-28 16: 39: 29.406 8398 8398 E scrcpy   :      scrcpy -m 1024
02-28 16: 39: 29.407 8398 8398 I app_process: System.exit llamado, estado: 0
02-28 16: 39: 29.407 8398 8398 I AndroidRuntime: VM saliendo con el código de resultado 0.

Excellent contribution, I was already desperate not to know how to correct the error.

Works for me, thanks.

@reloadedd
Copy link

image
Same issue, also tried chaning ports, no result.

@icarosolon
Copy link

I use Fedora 36 and had installed Scrcpy through Snap, but the device connected and then disconnected.

I solved by enabling the repository

$ sudo dnf copr enable zeno/scrcpy
And installing the package without using Snap

$ sudo dnf install scrcpy

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

9 participants