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

scrcpy could not open mobile screen on PC #4019

Open
2 tasks
jbxxs opened this issue May 19, 2023 · 3 comments
Open
2 tasks

scrcpy could not open mobile screen on PC #4019

jbxxs opened this issue May 19, 2023 · 3 comments

Comments

@jbxxs
Copy link

jbxxs commented May 19, 2023

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: Windows 10
  • scrcpy version: 2.0
  • installation method: manual build
  • device model: Meizu M6 Note
  • Android version: 7.1.2

Describe the bug
when run scrcpy could not open mobile screen on PC.

D:\Scrcpy2.0\scrcpy-win64-v2.0>scrcpy
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
D:\Scrcpy2.0\scrcpy-win64-v2.0\scrcpy-server: 1 file pushed, 0 skipped. 52.0 MB/s (52867 bytes in 0.001s)
[server] INFO: Device: Meizu M6 Note (Android 7.1.2)
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference
        at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:151)
        at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:151)
        at com.android.server.NetworkManagementSocketTagger.getApplicationInfo(NetworkManagementSocketTagger.java:262)
        at com.android.server.NetworkManagementSocketTagger.getProcessInfo(NetworkManagementSocketTagger.java:292)
        at com.android.server.NetworkManagementSocketTagger.tag(NetworkManagementSocketTagger.java:139)
        at libcore.io.BlockGuardOs.tagSocket(BlockGuardOs.java:47)
        at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:288)
        at android.system.Os.socket(Os.java:491)
        at android.net.LocalSocketImpl.create(LocalSocketImpl.java:256)
        at android.net.LocalSocket.implCreateIfNeeded(LocalSocket.java:107)
        at android.net.LocalSocket.connect(LocalSocket.java:130)
        at com.genymobile.scrcpy.DesktopConnection.connect(DesktopConnection.java:50)
        at com.genymobile.scrcpy.DesktopConnection.open(DesktopConnection.java:85)
        at com.genymobile.scrcpy.Server.scrcpy(Server.java:97)
        at com.genymobile.scrcpy.Server.main(Server.java:381)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:281)
ERROR: Server connection failed

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

@rom1v
Copy link
Collaborator

rom1v commented May 19, 2023

Should be already fixed on dev. Please test #3801 (comment)

@jbxxs
Copy link
Author

jbxxs commented May 19, 2023

According to #3801 try "scrcpy --no-audio" also could not work

E:\Phone Farm Proj\Scrcpy\scrcpy-win64-v2.0>scrcpy --no-audio
scrcpy 2.0 https://github.com/Genymobile/scrcpy
E:\Phone Farm Proj\Scrcpy\scrcpy-win64-v2.0\scrcpy-server: 1 file pushed, 0 skipped. 71.3 MB/s (52867 bytes in 0.001s)
[server] INFO: Device: Meizu M6 Note (Android 7.1.2)
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference
at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:151)
at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:151)
at com.android.server.NetworkManagementSocketTagger.getApplicationInfo(NetworkManagementSocketTagger.java:262)
at com.android.server.NetworkManagementSocketTagger.getProcessInfo(NetworkManagementSocketTagger.java:292)
at com.android.server.NetworkManagementSocketTagger.tag(NetworkManagementSocketTagger.java:139)
at libcore.io.BlockGuardOs.tagSocket(BlockGuardOs.java:47)
at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:288)
at android.system.Os.socket(Os.java:491)
at android.net.LocalSocketImpl.create(LocalSocketImpl.java:256)
at android.net.LocalSocket.implCreateIfNeeded(LocalSocket.java:107)
at android.net.LocalSocket.connect(LocalSocket.java:130)
at com.genymobile.scrcpy.DesktopConnection.connect(DesktopConnection.java:50)
at com.genymobile.scrcpy.DesktopConnection.open(DesktopConnection.java:85)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:97)
at com.genymobile.scrcpy.Server.main(Server.java:381)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:281)
ERROR: Server connection failed

@rom1v
Copy link
Collaborator

rom1v commented May 19, 2023

Please test the binary provided in the comment: #3801 (comment)

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

2 participants