Closed namtacs closed 2 weeks ago
Hmm that doesn't look like a proper TypeScript snippet:
here you are assigning instance
to a local variable health
let health = instance;
but then you are trying to access health
from an outer scope, which would result in a health is not defined
error.
A thing that comes to my mind is you are trying to invoke those methods within the Frida thread, but possibly they should be invoked within the main thread. You could try the following:
Il2Cpp.perform(() => {
// code here
}, "main");
Details here: https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki/Changelog#v082
Thanks, that worked. I thought i had tested attaching with the main thread, but maybe i didn't understand something.
you are trying to access
health
from an outer scope, which would result in ahealth is not defined
error.
This code is very simplified, but the stuff i left out isn't related or being used.
Do you know why it errors with this message?
I'm trying to call these two methods from an object and it gives a strange error "breakpoint triggered". Method signature (other parts left out):
I also tested it with tracer enabled, and it's very strange: the first method just isn't called. the second method gets invoked as normal, but the result is unexpected because of the 1st method.
I also have the cpp2il+ilspy decompiled versions of them, but there's nothing wrong about them. Am i misunderstanding something?