frida / frida-java-bridge

Java runtime interop from Frida
318 stars 118 forks source link

Could not find export 'JNI_OK' in module frida-java-bridge/lib/result.js #287

Open P-Sc opened 1 year ago

P-Sc commented 1 year ago

This might be a non-issue because I only encountered this error when importing this module into my frida typescript project. So it might as well be closed, I am just documenting it for others to see.

I encountered the error SyntaxError: Could not find export 'JNI_OK' in module '/agent/frida-java-bridge/lib/result.js' when importing the module in a typescript file with import { getApi, withRunnableArtThread, ArtStackVisitor } from './frida-java-bridge/lib/android.js';.

It seems that for some reason Node doesn't like this line: https://github.com/frida/frida-java-bridge/blob/9199ce480d89488d210d538a2a3e1abec128af34/lib/result.js#L11

When I removed ":0" it worked though:

module.exports = {
  checkJniResult,
  JNI_OK
};