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: VM::AttachCurrentThread failed: -1 #11

Closed
x011 opened this issue Jan 1, 2022 · 2 comments
Closed

Error: VM::AttachCurrentThread failed: -1 #11

x011 opened this issue Jan 1, 2022 · 2 comments

Comments

@x011
Copy link

x011 commented Jan 1, 2022

Hi,
When I try to use frida-script.js I get an error:

frida --no-pause -U -l ./frida-script.js -f tech.httptoolkit.pinning_demo
     ____
    / _  |   Frida 15.1.14 - A world-class dynamic instrumentation toolkit
   | (_| |
    > _  |   Commands:
   /_/ |_|       help      -> Displays the help system
   . . . .       object?   -> Display information about 'object'
   . . . .       exit/quit -> Exit
   . . . .
   . . . .   More info at https://frida.re/docs/home/
Spawned `tech.httptoolkit.pinning_demo`. Resuming main thread!
Error: VM::AttachCurrentThread failed: -1
    at o (frida/node_modules/frida-java-bridge/lib/result.js:4)
    at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:25)
    at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:14)
    at Xe (frida/node_modules/frida-java-bridge/lib/android.js:500)
    at Ie (frida/node_modules/frida-java-bridge/lib/android.js:196)
    at Ce (frida/node_modules/frida-java-bridge/lib/android.js:16)
    at _tryInitialize (frida/node_modules/frida-java-bridge/index.js:17)
    at y (frida/node_modules/frida-java-bridge/index.js:9)
    at <anonymous> (frida/node_modules/frida-java-bridge/index.js:320)
    at call (native)
    at o (/_java.js)
    at <anonymous> (/_java.js)
    at <anonymous> (frida/runtime/java.js:1)
    at call (native)
    at o (/_java.js)
    at r (/_java.js)
    at <eval> (frida/runtime/java.js:3)
    at _loadJava (native)
    at get (frida/runtime/core.js:125)
    at <anonymous> (/frida-script.js:510)
    at apply (native)
    at <anonymous> (frida/runtime/core.js:45)

It doesn't matter which app I use (com.twitter.android, tech.httptoolkit.pinning_demo, etc) the result is always the same.

Android 11, Samsung SM G998B (s21 Ultra) rooted.
Frida is installed on Windows 11 / Python3.7

Any idea how to fix this?
Thank you.

@x011
Copy link
Author

x011 commented Jan 1, 2022

I've used apk-mitm instead of Frida to disable certificate pinning.

@x011 x011 closed this as completed Jan 1, 2022
@pimterry
Copy link
Member

pimterry commented Jan 3, 2022

Thanks for reporting this @x011. I've heard about similar issues before (#3) - in that case this was a general Frida problem, rather than something to do with the script being used.

If you have a minute, it would be useful if you could confirm that (just check that running other Frida scripts from https://codeshare.frida.re/ fails too, so it's not related to this script).

Either way I'm not sure what causes the underlying issue. Any clues would be very welcome, I'd love to be able to give some advice to get Frida working for the next person who runs into this!

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