Skip to content

Build Android aab fails when using @nativescript/webpack > 5.0.17 #10615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
cloudhx opened this issue Sep 2, 2024 · 0 comments
Open
3 tasks done

Build Android aab fails when using @nativescript/webpack > 5.0.17 #10615

cloudhx opened this issue Sep 2, 2024 · 0 comments
Labels
bug-pending-triage Reported bug, pending triage to confirm.

Comments

@cloudhx
Copy link

cloudhx commented Sep 2, 2024

Issue Description

I have a NS app working on NS 8.4 and Angular 12. When updating NS to 8.8, the app works as expected in my test device using ns run android. But when trying to build the aab for release I get the following error message:

Error executing Static Binding Generator: Couldn't find '/Users/nordsense/Documents/workspaces/nordsense/walker/platforms/android/build-tools/sbg-bindings.txt' bindings input file. Most probably there's an error in the JS Parser execution. You can run JS Parser with verbose logging by executing "node '/Users/nordsense/Documents/workspaces/nordsense/walker/platforms/android/build-tools/jsparser/js_parser.js' enableErrorLogging".
Detailed log here: /Users/nordsense/Documents/workspaces/nordsense/walker/platforms/android/build-tools/runSbg.log

This only happens when using @nativescript/webpack > 5.0.17. when executing node '/Users/nordsense/Documents/workspaces/nordsense/walker/platforms/android/build-tools/jsparser/js_parser.js' enableErrorLogging as mentioned in the error message, I get this result:
Error processing '/Users/my_app_path/platforms/android/app/src/main/assets/app/vendor.js:' SyntaxError: Unexpected token (2:177045)
Opening this vendor.js, it turns out the errors caused by extra quotes as shown in the picture below
Screenshot 2024-09-02 at 15 23 35

When building with @nativescript/webpack@5.0.17, there is no error and the same code snippet looks like below.
Screenshot 2024-09-02 at 15 26 23

Reproduction

Will try to make a version for reproduction if it's really needed for troubleshooting.

Relevant log output (if applicable)

No response

Environment

OS: macOS 14.4.1
CPU: (10) arm64 Apple M2 Pro
Shell: /bin/zsh
node: 16.20.2
npm: 8.19.4
nativescript: 8.8.2

# android
java: 17.0.12
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found

# ios
xcode: 15.4/15F31d
cocoapods: 1.12.1
python: 3.9.6
python3: 3.9.6
ruby: 2.7.7
platforms: 
  - DriverKit 23.5
  - iOS 17.5
  - macOS 14.5
  - tvOS 17.5
  - visionOS 1.2
  - watchOS 10.5

Dependencies

"dependencies": {
  "@angular/animations": "^12.2.5",
  "@angular/common": "^12.2.5",
  "@angular/compiler": "^12.2.5",
  "@angular/core": "^12.2.5",
  "@angular/forms": "^12.2.5",
  "@angular/platform-browser": "^12.2.5",
  "@angular/platform-browser-dynamic": "^12.2.5",
  "@angular/router": "^12.2.5",
  "@auth0/angular-jwt": "^3.0.1",
  "@nativescript-community/arraybuffers": "^1.1.1",
  "@nativescript-community/sentry": "^4.6.12",
  "@nativescript-community/ui-mapbox": "6.2.11",
  "@nativescript-community/ui-material-bottomsheet": "^6.2.13",
  "@nativescript-community/ui-material-snackbar": "^6.2.10",
  "@nativescript-community/ui-pulltorefresh": "^2.5.0",
  "@nativescript/angular": "^12.2.0",
  "@nativescript/animated-circle": "^1.1.7",
  "@nativescript/appversion": "^2.0.0",
  "@nativescript/background-http": "^6.0.1",
  "@nativescript/camera": "^5.0.10",
  "@nativescript/core": "^8.8.2",
  "@nativescript/email": "2.0.3",
  "@nativescript/fingerprint-auth": "^8.0.0",
  "@nativescript/geolocation": "^8.0.2",
  "@nativescript/iqkeyboardmanager": "^2.1.1",
  "@nativescript/secure-storage": "^3.0.0",
  "@nativescript/theme": "^3.0.2",
  "@ngrx/effects": "^12.5.1",
  "@ngrx/store": "^12.5.1",
  "@nstudio/nativescript-barcodescanner": "^5.0.1",
  "@nstudio/nativescript-checkbox": "^2.0.4",
  "@nstudio/nativescript-loading-indicator": "^3.0.4",
  "axios": "0.21.1",
  "cheap-ruler": "3.0.1",
  "moment": "^2.24.0",
  "nativescript-clipboard": "^2.1.1",
  "nativescript-dev-version": "^0.2.0",
  "nativescript-theme-core": "^1.0.6",
  "nativescript-ui-chart": "^9.0.1",
  "nativescript-videoplayer": "^5.0.1",
  "reflect-metadata": "~0.1.8",
  "rxjs": "~7.3.0",
  "semver": "^7.3.5",
  "zone.js": "~0.11.4"
},
"devDependencies": {
  "@angular-devkit/build-angular": "^12.2.5",
  "@angular-eslint/builder": "1.1.0",
  "@angular-eslint/eslint-plugin": "1.1.0",
  "@angular-eslint/eslint-plugin-template": "1.1.0",
  "@angular-eslint/schematics": "1.1.0",
  "@angular-eslint/template-parser": "1.1.0",
  "@angular/compiler-cli": "^12.2.5",
  "@nativescript/android": "^8.8.2",
  "@nativescript/ios": "~8.4.1",
  "@nativescript/schematics": "^11.2.0",
  "@nativescript/types": "^8.8.0",
  "@nativescript/webpack": "^5.0.18",
  "@ngrx/schematics": "^12.5.1",
  "@ngtools/webpack": "^12.2.5",
  "@sentry/types": "7.15.0",
  "@sentry/webpack-plugin": "^1.18.3",
  "@types/semver": "^7.3.9",
  "@typescript-eslint/eslint-plugin": "^4.3.0",
  "@typescript-eslint/parser": "^4.3.0",
  "babel-traverse": "6.26.0",
  "babel-types": "6.26.0",
  "babylon": "6.18.0",
  "eslint": "^7.27.0",
  "eslint-plugin-import": "2.22.1",
  "eslint-plugin-jsdoc": "30.7.6",
  "eslint-plugin-ngrx": "^1.0.0",
  "eslint-plugin-prefer-arrow": "1.2.2",
  "eslint-plugin-prettier": "^3.4.0",
  "filemanager-webpack-plugin": "^8.0.0",
  "lazy": "1.0.11",
  "node-fetch": "^3.0.0",
  "prettier": "2.3.0",
  "prettier-plugin-organize-imports": "^2.1.0",
  "request": "^2.88.2",
  "sass": "^1.34.0",
  "typescript": "~4.3.5"
}

Please accept these terms

@cloudhx cloudhx added the bug-pending-triage Reported bug, pending triage to confirm. label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-pending-triage Reported bug, pending triage to confirm.
Projects
None yet
Development

No branches or pull requests

1 participant