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.

frida.core.RPCException: unable to find method 'root'

See original GitHub issue

Dump ipa failed.

  • Mac python3.7
  • Mac frida 12.2.30
  • iOS frida 12.2.30
[info] attaching to target
Traceback (most recent call last):
  File "", line 246, in <module>
  File "", line 242, in main
  File "", line 220, in run
  File "", line 156, in dump
    self.root = self.script.exports.root()
  File "/usr/local/lib/python3.7/site-packages/frida/", line 322, in method
    return script._rpc_request('call', js_name, args)
  File "/usr/local/lib/python3.7/site-packages/frida/", line 250, in _rpc_request
    raise result[2]
frida.core.RPCException: unable to find method 'root'

Issue Analytics

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

github_iconTop GitHub Comments

Magic-Uniquecommented, Mar 1, 2019

When I change the code in line 199 from:

script.exports.archive(self.root, decrypted, self.opt)


self.script.exports.archive(self.root, decrypted, self.opt)

The problem solved.

Before archive to *.ipa, I got some error log out:

unknown message: {'type': 'error', 'description': "TypeError: cannot read property 'name' of undefined", 'stack': "TypeError: cannot read property 'name' of undefined\n    at [anon] (duk_hobject_props.c:2384)\n    at src/libarchive.js:25\n    at o (node_modules/browser-pack/_prelude.js:1)\n    at src/index.js:9\n    at o (/script1.js:1)\n    at r (/script1.js:1)\n    at /script1.js:11729", 'fileName': '/script1.js', 'lineNumber': 11574, 'columnNumber': 1}
[info] compressing archive: /private/var/mobile/Containers/Data/Application/8110A118-BCDD-497C-9EC5-78B682DDD057/tmp/hif3sxngcps.ipa
laozhongyi-0326commented, May 10, 2022

Mac python3.8 Mac frida 15.1.17 安卓 frida 15.1.17 安卓10 frida -U -f -l pass_ssl.js ____ / _ | Frida 15.1.17 - A world-class dynamic instrumentation toolkit | (| | > _ | Commands: // |_| help -> Displays the help system . . . . object? -> Display information about ‘object’ . . . . exit/quit -> Exit . . . . . . . . More info at . . . . . . . . Connected to ONEPLUS A5000 (id=852e2c6d) Spawning
Exception in thread Thread-1: Traceback (most recent call last): File “/usr/local/Cellar/python@3.8/3.8.3_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/”, line 932, in _bootstrap_inner File “/usr/local/Cellar/python@3.8/3.8.3_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/”, line 870, in run self._target(*self._args, **self._kwargs) File “/usr/local/lib/python3.8/site-packages/frida_tools/”, line 809, in _run work() File “/usr/local/lib/python3.8/site-packages/frida_tools/”, line 405, in _try_start self._start() File “/usr/local/lib/python3.8/site-packages/frida_tools/”, line 149, in _start self._set_autoperform(self._autoperform_option) File “/usr/local/lib/python3.8/site-packages/frida_tools/”, line 520, in _set_autoperform if self._is_java_available(): File “/usr/local/lib/python3.8/site-packages/frida_tools/”, line 529, in _is_java_available return script.exports.java_available() File “/usr/local/lib/python3.8/site-packages/frida/”, line 468, in method return script._rpc_request(‘call’, js_name, args, **kwargs) File “/usr/local/lib/python3.8/site-packages/frida/”, line 26, in wrapper return f(*args, **kwargs) File “/usr/local/lib/python3.8/site-packages/frida/”, line 400, in _rpc_request raise result[2] frida.core.RPCException: 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:27) at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:15) at Ye (frida/node_modules/frida-java-bridge/lib/android.js:500) at Ae (frida/node_modules/frida-java-bridge/lib/android.js:196) at ye (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:130) at <anonymous> (/java_check.js:1) at apply (native) at <anonymous> (frida/runtime/message-dispatcher.js:13) at c (frida/runtime/message-dispatcher.js:23)

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to fix Error: java.lang.ClassNotFoundException on frida
If I use spawn to run the app and change this method return value it fails with error : frida.core.RPCException: Error: java.lang.
Read more >
Developers - frida.core.RPCException - - Bountysource
I get the following error: "frida.core.RPCException: unable to find method 'add'" It crashes on this line: print(script.exports.add(3,4)).
Read more >
objection 改源码解决app的双进程保护和双进程保护原理frida ...
root @arr:~/Desktop/frida_js# objection -d -g com.xc.p2p explore[debug] Agent ... ProcessNotFoundError: debug_print('Unable to find process: ...
Read more >
Frida使用过程记录 - KevinsBobo - Coding博客
安装完成测试; 3. 官方例子 Examples-Windows 练习; 4. 文档 Basic Usage 练习; API. Python; JavaScript; 小总结. Tools. frida CLI; frida-trace; frida-discover ...
Read more >
frida hook 简单使用 - q0o0p
服务端中需要用JS 代码注入到目标进程,操作内存数据,给客户端发送消息。 非root设备使用Frida. 非root设备,需要反编译目标应用包,然后注入frida- ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found