NativeScript / NativeScript/android

java.lang.UnsatisfiedLinkError aab build broken

Open
#1,632 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

severity: high
Dominant language
C++
Stars
563
Forks
144
Avg merge
10h 46m
Merged PRs (30d)
14

Description

Environment

mutliple versions seems to be affected at least up to

Installed
Android SDK : 29
Android SDK Build-Tools: 29.0.3
node.js : 10.21.0
nativescript : 6.7.8

Error
Over the time we disabled all "optimize" features because all those seems to be bugged..
Since our version 0.3.2 we went forward and enabled .aab builds.

Now we get following error reports.

Fatal Exception: java.lang.UnsatisfiedLinkError
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.xxx.mobile-tFMIkE3egIQbK2hZc5zevg==/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.mobile-tFMIkE3egIQbK2hZc5zevg==/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libNativeScript.so"


Fatal Exception: java.lang.UnsatisfiedLinkError
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.xxx.mobile-QNIyApCG7KlgDAGIJkBlmA==/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.mobile-QNIyApCG7KlgDAGIJkBlmA==/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64]]] couldn't find "libNativeScript.so"

Theres not a single error in our build pipelines, but still the build process seems not to link the needed library correctly..
If the error rate increases further we also need to disable this again, truely disappointing.

To Reproduce
active aab build, deliver to customers

Expected behavior
not crashing

grafik

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Android AAB build and native library packaging path, using the reported java.lang.UnsatisfiedLinkError and missing libNativeScript.so as the failure point. Reproduce by enabling an AAB build and delivering it to a customer device; done means the generated AAB includes the required native library and no longer crashes on the reported architectures.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cpp
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.