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

Failed to find accessibilty node! #771

Closed
5 tasks done
JonnyTech opened this issue Aug 28, 2021 · 9 comments
Closed
5 tasks done

Failed to find accessibilty node! #771

JonnyTech opened this issue Aug 28, 2021 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@JonnyTech
Copy link

JonnyTech commented Aug 28, 2021

Developer TODO (don't remove)

  • create new branch. put issue number at start of name if not a very quick fix.
  • write tests. put issue number in comment
  • update documentation
  • squash and merge
  • delete branch

Discord message link/email recipient

Describe the bug
The subject message is shown when long pressing a button, the action is not performed. Other mappings work ok.

To Reproduce
My phone has a menu buton and no recents button
Map menu button to recents action.
Map menu button long press to menu action.
Long press menu button.

Upload a backup of your keymaps. mappings.zip

Expected behavior
Action (show menu) should be performed.

Screenshots
keymaperror

Smartphone (please complete the following information):

  • Device: Xioami
  • Android version: AOSP 10

Additional context
Add any other context about the problem here.

@JonnyTech JonnyTech added the bug Something isn't working label Aug 28, 2021
@GL513
Copy link
Contributor

GL513 commented Aug 29, 2021

What Xiaomi model do you have?

Do you have ADB on your phone? You can enable the accessibility service using that if needed. Also, possibly grant WRITE_SECURE_SETTINGS while you're at it, since KeyMapper can most of the time re-enable itself when the system removes the service due to no feedback, and that would be either because the app isn't running at all, or because of other things, such as battery optimization, or just spastic things like Samsung killing apps all the time, even with battery optimization. That could save you from having to enable it's accessibility service from ADB in the future.

running adb shell settings put secure enabled_accessibility_services io.github.sds100.keymapper/io.github.sds100.keymapper.service.MyAccessibilityService should fix this, and for more information about this you can visit https://docs.keymapper.club/user-guide/adb-permissions/#enabling-the-accessibility-service.

I understand if this doesn't work. Sometimes, restarting the phone, or even force restarting it (press and hold pwr+vol down until the screen turns off and the phone restarts) allows things to work.

@sds100
Copy link
Collaborator

sds100 commented Aug 29, 2021 via email

sds100 added a commit that referenced this issue Aug 29, 2021
@sds100
Copy link
Collaborator

sds100 commented Aug 29, 2021

fixed

@sds100 sds100 closed this as completed Aug 29, 2021
sds100 added a commit that referenced this issue Aug 29, 2021
@JonnyTech
Copy link
Author

Thanks guys. Is there a prebuilt apk that I can try to test the fix? My phone is rooted. All other keypresses work fine so shows that accessibilty permission is granted correctly. Older versions of keymapper (v1.x iirc) worked as expected.

@sds100
Copy link
Collaborator

sds100 commented Aug 29, 2021

Yeah, join the Discord server at www.keymapper.club and you can download the alpha builds in the #testing-builds channel. I'm going to try to get the first 2.4.0 beta out today with this fix as well

@sds100
Copy link
Collaborator

sds100 commented Aug 29, 2021

Since you are rooted you should turn on the root permission setting in Key Mapper's settings. This will make the menu action work 100% reliably instead of using the accessibility nodes.

@JonnyTech
Copy link
Author

Thanks, as I am not a Discord user, I shall wait for the beta release.

I thought that I had enabled root access but looks like it was only temporary. Adding it back fixed the issue.

Great work, really appreciate the quick responses.

@sds100
Copy link
Collaborator

sds100 commented Aug 29, 2021

Cool, no problem. The builds in the Discord are just forwarded from GitHub Actions. You can get the "artifacts" from the automated builds by clicking on "Actions" at the top of the repo, going to the "develop" workflow, and then clicking on the latest run.

@JonnyTech
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants