Hi, I’m using App flow to build my app, it builds apk success but failed when building aab file, here is the log:
…
±--------------------±---------+
| Build Summary |
±--------------------±---------+
| Job ID | 8170693 |
| Node.js version | v16.16.0 |
| Cordova CLI version | 11.0.0 |
| npm version | 8.1.4 |
| yarn version | 1.22.19 |
±--------------------±---------+
…
[03:49:20]: $ ionic info
[03:49:22]: ▸ Ionic:
[03:49:22]: ▸ Ionic CLI : 6.20.1 (/usr/local/nvm/versions/node/v16.16.0/lib/node_modules/@ionic/cli)
[03:49:22]: ▸ Ionic Framework : @ionic/angular 5.9.4
[03:49:22]: ▸ @angular-devkit/build-angular : 0.803.29
[03:49:22]: ▸ @angular-devkit/schematics : 8.3.29
[03:49:22]: ▸ @angular/cli : 8.3.29
[03:49:22]: ▸ @ionic/angular-toolkit : 2.3.3
[03:49:22]: ▸ Cordova:
[03:49:22]: ▸ Cordova CLI : 11.0.0
[03:49:22]: ▸ Cordova Platforms : none
[03:49:22]: ▸ Cordova Plugins : no whitelisted plugins (0 plugins total)
[03:49:22]: ▸ Utility:
[03:49:22]: ▸ cordova-res : not installed globally
[03:49:22]: ▸ native-run : not installed globally
[03:49:22]: ▸ System:
[03:49:22]: ▸ Android SDK Tools : 26.1.1 (/opt/android-sdk)
[03:49:22]: ▸ NodeJS : v16.16.0 (/usr/local/nvm/versions/node/v16.16.0/bin/node)
[03:49:22]: ▸ npm : 8.1.4
[03:49:22]: ▸ OS : Linux 5.4
…
$ cordova platform add android --no-fetch
[03:49:24]: ▸ You have been opted out of telemetry. To change this, run: cordova telemetry on.
[03:49:24]: ▸ ------- Updating Deeplink domain (if applicable) -------
[03:49:24]: ▸ Using cordova-fetch for cordova-android@^11.0.0
[03:49:24]: ▸ Adding android project…
[03:49:24]: ▸ Creating Cordova project for the Android platform:
[03:49:24]: ▸ Path: platforms/android
[03:49:24]: ▸ Package: com.xxx.ionic.xxx.development
[03:49:24]: ▸ Name: xxx
[03:49:24]: ▸ Activity: MainActivity
[03:49:24]: ▸ Android Target SDK: android-32
[03:49:24]: ▸ Android Compile SDK: 32
[03:49:24]: ▸ Subproject Path: CordovaLib
[03:49:24]: ▸ Subproject Path: app
[03:49:24]: ▸ Android project created with cordova-android@11.0.0
[03:49:25]: ▸ Context {
[03:49:25]: ▸ hook: ‘before_prepare’,
[03:49:25]: ▸ opts: {
[03:49:25]: ▸ platforms: [ ‘android’ ],
[03:49:25]: ▸ searchpath: undefined,
[03:49:25]: ▸ save: true,
[03:49:25]: ▸ projectRoot: ‘/builds/xxx/xxx’,
[03:49:25]: ▸ cordova: { platforms: [Array], plugins: , version: ‘11.0.0’ }
[03:49:25]: ▸ },
[03:49:25]: ▸ cmdLine: ‘/usr/local/nvm/versions/node/v16.16.0/bin/node /usr/local/nvm/versions/node/v16.16.0/bin/cordova platform add android --no-fetch’,
[03:49:25]: ▸ scriptLocation: ‘/builds/xxx/xxx/scripts/build-before.js’
[03:49:25]: ▸ }
…
[03:55:40]: ▸ BUILD SUCCESSFUL in 3m 45s
[03:55:40]: ▸ 54 actionable tasks: 54 executed
[03:55:40]: ▸ Built the following apk(s):
[03:55:40]: ▸ /builds/xxx/xxx/platforms/android/app/build/outputs/apk/debug/app-debug.apk
[03:55:40]: Detected apk file platforms/android/app/build/outputs/apk/debug/app-debug.apk
[03:55:42]: -------------------------
[03:55:42]: — Step: upload_logs —
[03:55:42]: -------------------------
±---------------------------±-----------------------+
| Lane Context |
±---------------------------±-----------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | android |
| LANE_NAME | android package_build |
| NODE_PACKAGE_MANAGER | yarn |
| PROJECT_WEB_DIR | www |
| DOWNLOAD_CREDENTIAL_EXISTS | false |
| APK_FILE_PATH | /tmp/artifacts/app.apk |
±---------------------------±-----------------------+
[03:55:47]: Error while checking to check for cordova-android version
/usr/local/bundle/bin/fastlane: \e[31m[!] Error while checking to check for cordova-android version\e[0m (RuntimeError)
±-----±-----------------------±------------+
| fastlane summary |
±-----±-----------------------±------------+
| Step | Action | Time (in s) |
±-----±-----------------------±------------+
| 1 | default_platform | 0 |
| 2 | build_summary | 0 |
| 3 | detect_package_manager | 0 |
| 4 | add_git_credentials | 0 |
| 5 | get_appflow_config | 0 |
| 6 | detect_native_type | 0 |
| 7 | dependency_install | 86 |
| 8 | get_web_dir | 0 |
| 9 | set_java_home | 2 |
| 10 | modify_config_xml | 0 |
| 11 | download_credential | 0 |
| 12 | build_pro_app | 114 |
| 13 | add_cordova_to_index | 0 |
| | build_android | 378 |
| 15 | upload_logs | 4 |
±-----±-----------------------±------------+
[03:55:47]: fastlane finished with errors
/usr/local/lib/ruby/3.1.0/json/common.rb:216:in parse': 859: unexpected token at '{"type":"tree","data":{"type":"list","trees":[{"name":"cordova-android@11.0.0","children":[],"hint":null,"color":null,"depth":0}]}} (JSON::ParserError) ' from /usr/local/lib/ruby/3.1.0/json/common.rb:216:in
parse’
from /builds/xxx/xxx/fastlane/actions/get_dep_version.rb:20:in run' from /builds/xxx/xxx/fastlane/actions/build_android_cordova.rb:62:in
can_build_aab’
from /builds/xxx/xxx/fastlane/actions/build_android_cordova.rb:44:in run' from /builds/xxx/xxx/fastlane/actions/build_android.rb:16:in
run’
from /usr/local/bundle/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action’
…
Can someone have an idea on this issue?