vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.
https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki
MIT License
1k stars 200 forks source link

Error: abort was called #426

Closed 2361788963 closed 11 months ago

2361788963 commented 11 months ago

When I hook OnPointerClick,It may report an error. unityVersion:2019.4.36f1c1

code: Il2Cpp.perform(() => { const UI = Il2Cpp.domain.assembly("UnityEngine.UI").image const Button = UI.class("UnityEngine.UI.Button") Button.method("OnPointerClick").implementation = function (eventData) { return OnPointerClick.invoke(eventData); } });

log: Error: abort was called at invokeRaw (/node_modules/frida-il2cpp-bridge/dist/index.js:2402) at <anonymous> (index.ts:27) at call (native) at <anonymous> (/node_modules/frida-il2cpp-bridge/dist/index.js:2505)

vfsfitvnm commented 11 months ago

See https://github.com/vfsfitvnm/frida-il2cpp-bridge/issues/198#issuecomment-1175015906,

2361788963 commented 11 months ago

See #198 (comment),

I don't understand. Is this a bug in the game application itself? But what should I do,because when this error occurs, it will cause other elements on the game to be lost

vfsfitvnm commented 11 months ago

An "abort was called" error typically occurs when a managed (C#) exception is thrown. frida-il2cpp-bridge can't catch exceptions as of today, but you can log them using:

Il2Cpp.perform(() => {
     Il2Cpp.attachExceptionListener("all");

     // your code here
});
2361788963 commented 11 months ago

An "abort was called" error typically occurs when a managed (C#) exception is thrown. frida-il2cpp-bridge can't catch exceptions as of today, but you can log them using:

Il2Cpp.perform(() => {
     Il2Cpp.attachExceptionListener("all");

     // your code here
});

ok,I do it,now,These are new error.

il2cpp: System.NullReferenceException: Object reference not set to an instance of an object. at GoogleMobileAdsDemoScript.ShowAdmobInterstitial () [0x00000] in <00000000000000000000000000000000>:0 at SettingsMenu.Show () [0x00000] in <00000000000000000000000000000000>:0 at TitleScreenUI.OnOptionsButtonClicked () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0 Error: abort was called