Giter Site home page Giter Site logo

Comments (3)

arthurspa avatar arthurspa commented on May 31, 2024

Hey @GeorgeKitsopoulos , thank you for posting this issue.

Based on the error:

Injecting to another application requires INJECT_EVENTS permission

I found this issue on stack overflow: https://stackoverflow.com/questions/22163424/android-java-lang-securityexception-injecting-to-another-application-requires

One possible cause/solution is https://stackoverflow.com/a/32549724/1705096:

It's because your device is locked/any other open dialog box is open /anything preventing the test's ability to click on the button. Eg. if the phone is locked-when the test tries to click on the button it can't because the device is locked.

I was having troubles on the emulator because it always displayed "launcher has crashed". So whenever it tried to click the button, it couldn't because the alert dialog box was open.

In short, make sure your screen is unlocked and no message boxes are interfering with the test and it's ability to click on a button.

If the phone is locked with code, it won't work.
Also, please try with the latest code.

from bot.

GeorgeKitsopoulos avatar GeorgeKitsopoulos commented on May 31, 2024

I eventually found a solution but not in my primary device. Firstly I redownloaded the program, removed pin password from my device and triple checked if the required permisions were given. I checked the links you posted and finally run the program again. Unfortunately it didn't work. In the possible solution you mentioned, from what I understood the simplest solution was to root your device and modify a thing or two. However my daily driver (primary device) is somewhat newly purchased and I do not wish to void the warranty... just yet at least (although I really want to get rid of the Google framework). I believe that the problem lies in the way the miui devices are made, because of the strict and aggresive way miui works. So I simply reflashed lineage os on an old device of mine and it just worked without trouble. I am leaving the decision to close or not the thread to you since it might not actually be considered solved, due to the fact that the main device has the problem.

from bot.

arthurspa avatar arthurspa commented on May 31, 2024

Hey @GeorgeKitsopoulos , thanks for sharing how you managed to workaround it. It should not require rooting the phone in order the bot to work. I would need more information like the full log (crash .zip folder) to understand better what's going on.

Please, feel free to re-open the issue with full logs if you manage to reproduce it with the latest version.

Thank you!

from bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.