paddybyers/anode

UnsatisfiedLinkError when running node.js script

Closed this issue · 1 comments

I'd put together a very simple "Hello world" script to try out Anode with. It's really nothing more than a console.log( ), but it's crashing with:

E/AndroidRuntime(19217): FATAL EXCEPTION: IntentService[:anode.AnodeService]
E/AndroidRuntime(19217): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]: 144 cannot locate 'SSLv2_method'...
E/AndroidRuntime(19217):
E/AndroidRuntime(19217): at java.lang.Runtime.load(Runtime.java:340)
E/AndroidRuntime(19217): at java.lang.System.load(System.java:524)
E/AndroidRuntime(19217): at org.meshpoint.anode.RuntimeNative.init(RuntimeNative.java:61)
E/AndroidRuntime(19217): at org.meshpoint.anode.Runtime.(Runtime.java:116)
E/AndroidRuntime(19217): at org.meshpoint.anode.Runtime.initRuntime(Runtime.java:49)
E/AndroidRuntime(19217): at org.meshpoint.anode.AnodeService.initRuntime(AnodeService.java:86)
E/AndroidRuntime(19217): at org.meshpoint.anode.AnodeService.onHandleIntent(AnodeService.java:105)
E/AndroidRuntime(19217): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/AndroidRuntime(19217): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(19217): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(19217): at android.os.HandlerThread.run(HandlerThread.java:60)

Did OpenSSL change out from under you, perhaps?

So, I have a suspicion about what's happened here. The device I am testing on appears to carry a copy of libssl.so that doesn't support SSLv2. However, the android-config.mk of the openssl-android does not set the build flags (it's something like NO_SSLv2 or something like that) necessary to build libssl.so without v2 in. So, the result is failure to properly link later. I actually have the luxury of replacing my /system/lib/libssl.so, so that's what I did to get around this.