frida-java-bridge icon indicating copy to clipboard operation
frida-java-bridge copied to clipboard

Error: Unable to parse ART internals

Open lamscun opened this issue 5 years ago • 5 comments

Help me!!. I have a problem with error:

Spawning com.example.a11x256.frida_test... Script loaded successfully Spawned com.example.a11x256.frida_test. Resuming main thread! [Samsung SM-J320G::com.example.a11x256.frida_test]-> Inside java perform function Error: Unable to parse ART internals; please file a bug at https://github.com/frida/frida-java at ue (frida/node_modules/frida-java/lib/android.js:1615) at le (frida/node_modules/frida-java/lib/android.js:1403) at frida/node_modules/frida-java/lib/android.js:1009 at [anon] (native) at frida/runtime/core.js:180 at oe (frida/node_modules/frida-java/lib/android.js:1013) at frida/node_modules/frida-java/lib/android.js:1629 at B (frida/node_modules/frida-java/lib/android.js:791) at /_java.js:3483 TypeError: cannot write property '_code' of null at [anon] (../../../frida-gum/bindings/gumjs/duktape.c:57666) at oe (frida/node_modules/frida-java/lib/android.js:1013) at frida/node_modules/frida-java/lib/android.js:1629 at B (frida/node_modules/frida-java/lib/android.js:791) at /_java.js:3483 at frida/node_modules/frida-java/index.js:380 at x (/repl1.js:28) at frida/node_modules/frida-java/lib/vm.js:42 at E (frida/node_modules/frida-java/index.js:348) at frida/node_modules/frida-java/index.js:334 at input:1 [...]

lamscun avatar Jun 16 '19 03:06 lamscun

Error: Unable to parse ART internals; please file a bug at https://github.com/frida/frida-java at $e (frida/node_modules/frida-java/lib/android.js:2221) at Qe (frida/node_modules/frida-java/lib/android.js:1976) at frida/node_modules/frida-java/lib/android.js:1506 at [anon] (native) at frida/runtime/core.js:199 at Be (frida/node_modules/frida-java/lib/android.js:1510) at frida/node_modules/frida-java/lib/android.js:2261 at ue (frida/node_modules/frida-java/lib/android.js:831) at /_java.js:4214 TypeError: cannot write property '_code' of null at [anon] (../../../frida-gum/bindings/gumjs/duktape.c:57666) at Be (frida/node_modules/frida-java/lib/android.js:1510) at frida/node_modules/frida-java/lib/android.js:2261 at ue (frida/node_modules/frida-java/lib/android.js:831) at /_java.js:4214 at frida/node_modules/frida-java/index.js:380 at /repl1.js:16 at frida/node_modules/frida-java/lib/vm.js:42 at E (frida/node_modules/frida-java/index.js:348) at frida/node_modules/frida-java/index.js:300 at frida/node_modules/frida-java/lib/vm.js:42 [...]

yltwust avatar Jun 17 '19 08:06 yltwust

Error: Unable to parse ART internals; please file a bug at https://github.com/frida/frida-java at $e (frida/node_modules/frida-java/lib/android.js:2221) at Qe (frida/node_modules/frida-java/lib/android.js:1976) at frida/node_modules/frida-java/lib/android.js:1506 at [anon] (native) at frida/runtime/core.js:199 at Be (frida/node_modules/frida-java/lib/android.js:1510)
at frida/node_modules/frida-java/lib/android.js:2261 at ue (frida/node_modules/frida-java/lib/android.js:831) at /_java.js:2677 TypeError: cannot write property '_code' of null at [anon] (../../../frida-gum/bindings/gumjs/duktape.c:57666) at Be (frida/node_modules/frida-java/lib/android.js:1510) at frida/node_modules/frida-java/lib/android.js:2261 at ue (frida/node_modules/frida-java/lib/android.js:831) at /_java.js:2677

musktime avatar Jul 12 '19 07:07 musktime

Thanks for reporting. Will need your help to fix this, as this issue is very much dependent on the code running on your particular devices. The recommended way to get to the bottom of this is to use a setup like this, allowing you to add temporary logging to a local copy of frida-java. That way you can figure out what's going on in recompileExceptionClearForArm64, or the similarly named function next to it in case the target process' architecture isn't arm64.

oleavr avatar Jul 12 '19 22:07 oleavr

@oleavr

Hi. I have the same error on the latest frida (12.6.10)

[Samsung SM-J320FN::PID::10384]-> Error: Unable to parse ART internals; please file a bug at https://github.com/frida/frida-java at $e (frida/node_modules/frida-java/lib/android.js:2221) at Qe (frida/node_modules/frida-java/lib/android.js:1976) at frida/node_modules/frida-java/lib/android.js:1506 at [anon] (native) at frida/runtime/core.js:199 at Be (frida/node_modules/frida-java/lib/android.js:1510) at frida/node_modules/frida-java/lib/android.js:2261
at ue (frida/node_modules/frida-java/lib/android.js:831) at /_java.js:2677 TypeError: cannot write property '_code' of null at [anon] (../../../frida-gum/bindings/gumjs/duktape.c:57666) at Be (frida/node_modules/frida-java/lib/android.js:1510) at frida/node_modules/frida-java/lib/android.js:2261 at ue (frida/node_modules/frida-java/lib/android.js:831) at /_java.js:2677 at frida/node_modules/frida-java/index.js:110 at frida/node_modules/frida-java/index.js:130 at enumAllClasses (/repl1.js:24) at /repl1.js:80 at frida/node_modules/frida-java/lib/vm.js:42 at E (frida/node_modules/frida-java/index.js:348) [...]

An exemplary code that is causing errors:

function enumerateLoadedClasses() {
	var loadedClasses;

	if (Java.available) {
		Java.perform(function () {
			console.log("Enumerating loaded classes")
			loadedClasses = Java.enumerateLoadedClassesSync();
		});
	}
}

jpiechowka avatar Jul 17 '19 11:07 jpiechowka

To anyone ending up here and: I started getting the same error (with TypeError: cannot write property '_code' of null) after updating Frida, and trying to use it on Android 6. It seems that simply Frida is tested on new Android versions, and old ones may become incompatible. Try downgrading Frida server, changing from version 12 to version 11 solved it for me.

kbobrowski avatar Jun 20 '20 14:06 kbobrowski