NullPointerException ClipboardManager.getAddPrimaryClipChangedListener() #1440
Closed
Description
Environment
- OS: [Ubuntu 18.04 LTS]
- scrcpy version: [v1.14]
- installation method: [snap]
- device model: Custom Android device running Snapdragon 210
- Android version: [v6.0.1]
Describe the bug
Crash on opening Scrcpy after snap updated it to v1.14.
I understand that older Android devices are not supported, but this device was working perfectly until scrcpy v1.13.
Tried using scrcpy -m 800/1080/1920, etc.
as suggested for this issue in countless older threads
but this doesn't work.
Tried changing to lower bitrate as well scrcpy -b 1M/2M
but to no avail.
On errors, please provide the output of the console (and adb logcat
if relevant).
INFO: scrcpy 1.14 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 1.0 MB/s (33142 bytes in 0.033s)
[server] INFO: Device: **Redacted** (Android 6.0.1)
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:99)
at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:111)
at com.genymobile.scrcpy.Device.<init>(Device.java:83)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:23)
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:251)
I've downgraded scrcpy to v1.12-1-g71df317 via channel 'edge' and it's working fine now.
Even if this issue is not resolved, I request the devs to keep older versions v1.12 or v1.13 available via snap channels for easy downgrade.
Metadata
Assignees
Labels
No labels