mirror of
https://github.com/alexal1/Insomniac.git
synced 2026-04-26 10:05:50 +03:00
[GH-ISSUE #247] [Crash] Injecting to another application requires INJECT_EVENTS permission #207
Labels
No labels
bug
duplicate
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Insomniac#207
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mordekai91 on GitHub (Jan 14, 2021).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/247
I get this crash just when Instagram is show on my phone (Xiaomi redmi note 8 pro)
Crash-2021-01-14-14-19-12.zip
uiautomator2.exceptions.JSONRPCError: -32001 Jsonrpc error: <java.lang.SecurityException> data: java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
at android.os.Parcel.createException(Parcel.java:2074)
at android.os.Parcel.readException(Parcel.java:2042)
at android.os.Parcel.readException(Parcel.java:1990)
at android.app.IUiAutomationConnection$Stub$Proxy.injectInputEvent(IUiAutomationConnection.java:471)
at android.app.UiAutomation.injectInputEvent(UiAutomation.java:597)
at com.github.uiautomator.stub.TouchController.injectEventSync(TouchController.java:38)
at com.github.uiautomator.stub.TouchController.touchDown(TouchController.java:47)
at com.github.uiautomator.stub.AutomatorServiceImpl.click(AutomatorServiceImpl.java:206)
at java.lang.reflect.Method.invoke(Native Method)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.invoke(JsonRpcBasicServer.java:467)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleObject(JsonRpcBasicServer.java:352)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleJsonNodeRequest(JsonRpcBasicServer.java:283)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleRequest(JsonRpcBasicServer.java:251)
at com.github.uiautomator.stub.AutomatorHttpServer.serve(AutomatorHttpServer.java:100)
at fi.iki.elonen.NanoHTTPD.serve(NanoHTTPD.java:2244)
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
at java.lang.Thread.run(Thread.java:919)
, method: click
@alexal1 commented on GitHub (Jan 14, 2021):
Try with the
--oldflag please@mordekai91 commented on GitHub (Jan 20, 2021):
Hi @alexal1 , thanks for reply.
When I use --old flag im getting the next error
`C:\Users\borja\Desktop>py start.py --old --interact @natgeo
[92m
[0m
[95mInsomniac v3.6.5[0m
Hi! Since of v3.1.0 all core features in this project are free to use.
You may want to get more fine grained control over the bot via these features:
- [1mFiltering[0m - skip unwanted accounts by various parameters
- [1mScrapping[0m - technique that makes interactions significantly safer and faster
- [1mWorking hours[0m - the script will wait till specified hours before each session
- [1mRemoving mass followers[0m - automate "cleaning" you account
- [1mAnalytics tool[0m - build presentation that shows your growth
Activate by supporting our small team: [1mhttps://insomniac-bot.com/activate/[0m
Using insomniac session-manager without extra-features
[01/20 11:00:23] Checking your Internet speed to adjust the script speed, please wait for a minute...
[01/20 11:00:23] (use --no-speed-check to skip this check)
[01/20 11:00:44] Download speed 72.92 Mbit/s, upload speed 75.63 Mbit/s
[01/20 11:00:44] Sleep range will be from 1.00 to 3.00 seconds
Looking for ADB devices...
Connected devices via adb: 1. That's ok.
[01/20 11:00:44] Using uiautomator v1
[01/20 11:00:44] Instagram version: 170.2.0.30.474
[01/20 11:00:44] Running Insomniac with the "interact" action.
[01/20 11:00:44] Successful interactions limit per source: 70
[01/20 11:00:44] Interactions limit per source: 140
[01/20 11:00:44] Total likes limit: 1000
[01/20 11:00:44] Total comments limit: 50
Caught an exception:
alive attribute not found!
[01/20 11:00:47] Traceback (most recent call last):
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\session.py", line 232, in run
self.start_session(args, device_wrapper, app_version)
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\session.py", line 160, in start_session
device_wrapper.get().wake_up()
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\device_facade.py", line 124, in wake_up
while not self.is_alive() and attempts < 5:
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\device_facade.py", line 117, in is_alive
return self.deviceV1.alive()
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\uiautomator_init_.py", line 589, in getattr
raise AttributeError("%s attribute not found!" % attr)
AttributeError: alive attribute not found!
Traceback (most recent call last):
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\session.py", line 232, in run
self.start_session(args, device_wrapper, app_version)
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\session.py", line 160, in start_session
device_wrapper.get().wake_up()
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\device_facade.py", line 124, in wake_up
while not self.is_alive() and attempts < 5:
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\device_facade.py", line 117, in is_alive
return self.deviceV1.alive()
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\uiautomator_init_.py", line 589, in getattr
raise AttributeError("%s attribute not found!" % attr)
AttributeError: alive attribute not found!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "start.py", line 4, in
insomniac.run(activation_code)
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac_init_.py", line 20, in run
insomniac_session.run()
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\session.py", line 255, in run
save_crash(device_wrapper.get(), ex)
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\utils.py", line 137, in save_crash
device.wake_up()
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\device_facade.py", line 124, in wake_up
while not self.is_alive() and attempts < 5:
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\insomniac\device_facade.py", line 117, in is_alive
return self.deviceV1.alive()
File "C:\Users\borja\AppData\Local\Programs\Python\Python38\lib\site-packages\uiautomator_init_.py", line 589, in getattr
raise AttributeError("%s attribute not found!" % attr)
AttributeError: alive attribute not found!
Thank you so much :)
@mordekai91 commented on GitHub (Jan 20, 2021):
Solved! In developer options menu, check also 'USB Debugging (Security settings)', both, USB debugging and this
Thank you!