NativeScript / nativescript-dev-webpack

A package to help with webpacking NativeScript apps.
Apache License 2.0
97 stars 49 forks source link

Failed to generate a snapshot, build still went fine #1134

Open saschaarthur opened 4 years ago

saschaarthur commented 4 years ago

Hello,

We are running in our pipeline:

tns build android --release --key-store-path android.keystore --key-store-password ${KEYSTORE_PASSWORD} --key-store-alias xxx --key-store-alias-password ${KEYSTORE_PASSWORD} --env.aot --env.snapshot --env.compileSnapshot --env.uglify --env.report --env.hiddenSourceMap --aab

Which failed inside with following error:


Copying template files...
Platform android successfully added. v6.4.1
Preparing project...
Project root: /opt/atlassian/pipelines/agent/build
Snapshots build directory: /opt/atlassian/pipelines/agent/build/platforms/android/app/snapshot-build/build
 Snapshotting bundle from /opt/atlassian/pipelines/agent/build/platforms/android/app/src/main/assets/app/snapshot-entry.js,/opt/atlassian/pipelines/agent/build/platforms/android/app/src/main/assets/app/vendor.js
Running snapshot generation with the following arguments: 
{
    "inputFiles": [
        "/opt/atlassian/pipelines/agent/build/platforms/android/app/src/main/assets/app/snapshot-entry.js",
        "/opt/atlassian/pipelines/agent/build/platforms/android/app/src/main/assets/app/vendor.js"
    ],
    "preprocessedInputFile": "/opt/atlassian/pipelines/agent/build/platforms/android/app/src/main/assets/app/_embedded_script_.js",
    "useLibs": true,
    "skipSnapshotTools": false
}
Snapshot tools path: /tmp/snapshot-tools
***** Starting snapshot generation using V8 version:  8.0.426.16
Webpack compilation complete.
/tmp/snapshot-tools/mksnapshot-tools/v8-v8.0.426.16/linux-x64/mksnapshot-arm: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
Unable to execute '/tmp/snapshot-tools/mksnapshot-tools/v8-v8.0.426.16/linux-x64/mksnapshot-arm' locally.Error message: 'Command failed: /tmp/snapshot-tools/mksnapshot-tools/v8-v8.0.426.16/linux-x64/mksnapshot-arm --help
/tmp/snapshot-tools/mksnapshot-tools/v8-v8.0.426.16/linux-x64/mksnapshot-arm: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
'
Generating snapshots in a docker container.
***** Generating snapshot for armeabi-v7a *****
Loading script for embedding: /app/_embedded_script_.js
....

instead of returning a status code != 0 for this command it still went on.

This build an aab build for our android apps, which lead to broken apks on some devices.

In case its failing it should STOP the build and return status != 0

IMO: This whole setup of building the snapshots, needs some more transparency...

Its related somehow to: https://github.com/NativeScript/mksnapshot-tools/issues/56 https://github.com/NativeScript/nativescript-dev-webpack/issues/1026

saschaarthur commented 4 years ago

/bin/sh: 1: xxd: not found

also allows the build to go on..

NathanaelA commented 4 years ago

Just for your information, Snapshots are depreciated and going away in NS7. Way too many issues with them...

The new cached compiled code system (which isn't enabled by default) is actually faster and will be enabled (? I think ?) by default in NS7...

saschaarthur commented 4 years ago

Heared about this as well, still its a generell thing with the build system, it should never ever go on when theres stuff going wrong.

NathanaelA commented 4 years ago

I don't disagree, I've had my own issues with the Build system just going on and producing an app when webpack crashed out (no error notice) and have already submitted a PR to fix the issue...

Just wanted to let you know that this probably won't get fixed as I can't imagine Progress spending any engineering time/dollars on something that is already depreciated...

However, if you wanted to create a PR to fix the issue; I'm sure they would merge it... :D