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

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

Open P-Sc opened this issue 2 years ago • 0 comments

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
};

P-Sc avatar Apr 22 '23 14:04 P-Sc