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

Copying and pasting to device on Android 10 crashes server #796

Closed
pierlon opened this issue Sep 8, 2019 · 3 comments
Closed

Copying and pasting to device on Android 10 crashes server #796

pierlon opened this issue Sep 8, 2019 · 3 comments

Comments

@pierlon
Copy link
Contributor

pierlon commented Sep 8, 2019

In Android 10, clipboard data access is limited to the app that currently has focus, or is the default method editor (IME) (see privacy changes).

Also, the methods getPrimaryClip and setPrimaryClip now require a user ID for the calling package.

Logs if needed:

  • Copying from device
    java.lang.AssertionError: java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.getPrimaryClip [class java.lang.String]
       at com.genymobile.scrcpy.wrappers.ClipboardManager.<init>(ClipboardManager.java:20)
       at com.genymobile.scrcpy.wrappers.ServiceManager.getClipboardManager(ServiceManager.java:75)
       at com.genymobile.scrcpy.Device.getClipboardText(Device.java:148)
       at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:106)
       at com.genymobile.scrcpy.Controller.control(Controller.java:73)
       at com.genymobile.scrcpy.Server$1.run(Server.java:45)
       at java.lang.Thread.run(Thread.java:919)
    Caused by: java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.getPrimaryClip [class java.lang.String]
       at java.lang.Class.getMethod(Class.java:2072)
       at java.lang.Class.getMethod(Class.java:1693)
       at com.genymobile.scrcpy.wrappers.ClipboardManager.<init>(ClipboardManager.java:17)
    
  • Copying to device
    java.lang.IllegalStateException: Buffer full, call next() to consume
       at com.genymobile.scrcpy.ControlMessageReader.readFrom(ControlMessageReader.java:35)
       at com.genymobile.scrcpy.DesktopConnection.receiveControlMessage(DesktopConnection.java:110)
       at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:82)
       at com.genymobile.scrcpy.Controller.control(Controller.java:73)
       at com.genymobile.scrcpy.Server$1.run(Server.java:45)
       at java.lang.Thread.run(Thread.java:919)
    
@rom1v rom1v added the android10 label Sep 8, 2019
rom1v added a commit that referenced this issue Oct 17, 2019
The methods getPrimaryClip() and setPrimaryClip() expect an additional
parameter since Android 10.

Fixes <#796>.
@rom1v
Copy link
Collaborator

rom1v commented Oct 17, 2019

My device just received the Android 10 upgrade tonight, so I fixed the issue on dev branch: 8b33c6c

@rom1v rom1v closed this as completed Oct 17, 2019
@yogurtearl
Copy link

@rom1v Can we get a release with this fix? :)

@rom1v
Copy link
Collaborator

rom1v commented Nov 19, 2019

@yogurtearl Done, v1.11 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants