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 on MOD + R (rotation shortcut): Could not invoke method (NoSuchMethodException) #5006

Closed
2 tasks done
jaysonwcs opened this issue Jun 20, 2024 · 2 comments
Closed
2 tasks done

Comments

@jaysonwcs
Copy link

jaysonwcs commented Jun 20, 2024

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

Environment

  • OS: Arch Linux
  • scrcpy version: 2.4
  • installation method: Package Manager (pacman)
  • device model: Redmi Note 1o Pro (model M2101K6G / codename sweet)
  • Android version: 14

Describe the bug
When I press MOD + R (Alt + R) the screen does not rotate.
It gives an error:

scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     --> (tcpip)  xxxxxxxxxxxxxxx              device  M2101K6G
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 21.4 MB/s (69007 bytes in 0.003s)
[server] INFO: Device: [Xiaomi] Xiaomi M2101K6G (Android 14)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.1.1-arch1.1
INFO: Trilinear filtering enabled
INFO: Texture: 2400x1080
[server] INFO: Device rotation requested: portrait
[server] ERROR: Could not invoke method
java.lang.NoSuchMethodException: android.view.IWindowManager$Stub$Proxy.freezeRotation [int]
        at java.lang.Class.getMethod(Class.java:2950)
        at java.lang.Class.getMethod(Class.java:2450)
        at com.genymobile.scrcpy.wrappers.WindowManager.getFreezeRotationMethod(WindowManager.java:48)
        at com.genymobile.scrcpy.wrappers.WindowManager.freezeRotation(WindowManager.java:111)
        at com.genymobile.scrcpy.Device.rotateDevice(Device.java:372)
        at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:205)
        at com.genymobile.scrcpy.Controller.control(Controller.java:97)
        at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:105)
        at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda1.run(Unknown Source:4)
        at java.lang.Thread.run(Thread.java:1012)

Edited to remove private info.

@rom1v
Copy link
Collaborator

rom1v commented Jun 20, 2024

Thank you for your report.

It is already fixed in dev branch: #4740.

@rom1v rom1v closed this as completed Jun 20, 2024
@jaysonwcs
Copy link
Author

Great!

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