question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: VM::AttachCurrentThread failed: -1

See original GitHub issue

For some reason I get this error for every app I try the script on. The app launches and this is the error it gives. My devices is running on Android 11

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:499)
    at Ie (frida/node_modules/frida-java-bridge/lib/android.js:195)
    at Ce (frida/node_modules/frida-java-bridge/lib/android.js:16)
    at _tryInitialize (frida/node_modules/frida-java-bridge/index.js:17)
    at g (frida/node_modules/frida-java-bridge/index.js:9)
    at <anonymous> (frida/node_modules/frida-java-bridge/index.js:317)
    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:114)
    at <anonymous> (/frida-script.js:448)
    at apply (native)
    at <anonymous> (frida/runtime/core.js:45)

cmd_b97j9YsBvI

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
qnorstencommented, Feb 19, 2022

I had the same problem. This fixed it for me https://github.com/frida/frida/issues/1788#issuecomment-932833126

So might be worth a try in case anyone else have the same problem.

0reactions
Elegarycommented, Dec 23, 2021

I have the same problem on a OnePlus device…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: VM::AttachCurrentThread failed: -1 · Issue #1788 - GitHub
ps: already tried to install frida module in magisk and work for it too same error..
Read more >
AttachCurrentThread failed to attach my VM — oracle-tech
Hi, I try to deploy my application through web start My application includes java swing and couple of native libs, the jnlp file...
Read more >
Error: Unable to attach current thread to the Java VM
I have implement an APP with xamarin.forms. And I tested it on Huawei-Y7(Android 8). Sometime it just accidently crash.
Read more >
Frida spawn process failed on Android 'Error: VM - 博客园
Frida spawn process failed on Android 'Error: VM::AttachCurrentThread failed: -1. script.load() 时会报错。 {'type': 'error', 'description': ...
Read more >
Using JNI Example in New Context - Error - Google Groups
Qt is running in a different thread than Java UI, so you always Java VM *MUST* be ... if (s_javaVM->AttachCurrentThread(&env, NULL)<0) ... return...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found