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

An error occurred when using [email protected] with frida-node.

Open CGxyol opened this issue 7 months ago • 10 comments

frida-node code

let device = await frida.getLocalDevice();
let spawnExe = await device.spawn(config.path);
console.log(spawnExe);
var session = await device.attach(spawnExe);
let script = await session.createScript(jsSource);
fScript = script;
script.message.connect(onMessage);
await script.load();
await device.resume(spawnExe);

Il2cpp-bridge code

import "frida-il2cpp-bridge";

Il2Cpp.perform(() => {
    console.log(Il2Cpp.unityVersion);
});

When I run the script using node app.js, it throws the error: "Error: access violation accessing 0x0 at initialize (/script1.js:1077) at clearTimeout (native) at onAdded (/script1.js:1070)"

CGxyol avatar May 22 '25 07:05 CGxyol

@vfsfitvnm Can u resolve this problem

CGxyol avatar May 22 '25 07:05 CGxyol

The same error also occurs when using the frida command in the terminal.

CGxyol avatar May 22 '25 07:05 CGxyol

2022.3.47f1

CGxyol avatar May 22 '25 07:05 CGxyol

What is the application name? What is the specs of the device?

thinhbuzz avatar May 22 '25 11:05 thinhbuzz

What is the application name? What is the specs of the device?

it's a Linux server side,

CGxyol avatar Jun 11 '25 09:06 CGxyol

What is the application name? What is the specs of the device?

CGxyol avatar Jun 11 '25 09:06 CGxyol

It seems that the .so hasn't been initialized yet, so Il2Cpp was null. After I added a loop to check whether the game's .so module has been loaded, it started working correctly.

CGxyol avatar Jun 11 '25 10:06 CGxyol

It seems that the .so hasn't been initialized yet, so Il2Cpp was null. After I added a loop to check whether the game's .so module has been loaded, it started working correctly.

Uhm, Il2Cpp.perform should take care of that. I'm reopening this as I want to investigate... I took note of the executable name

vfsfitvnm avatar Jun 14 '25 16:06 vfsfitvnm

@CGxyol by the way, what happens if you don't use frida-node? E.g. using frida cli directly

vfsfitvnm avatar Jun 14 '25 16:06 vfsfitvnm

@CGxyol by the way, what happens if you don't use frida-node? E.g. using frida cli directly

same

CGxyol avatar Jun 16 '25 03:06 CGxyol