Skip to content
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

Android bundle package could not be produced using cordova build android --release #1151

Closed
3 tasks done
mosabab opened this issue Jan 18, 2021 · 4 comments · Fixed by #1153
Closed
3 tasks done

Android bundle package could not be produced using cordova build android --release #1151

mosabab opened this issue Jan 18, 2021 · 4 comments · Fixed by #1153
Labels

Comments

@mosabab
Copy link
Contributor

mosabab commented Jan 18, 2021

Bug Report

Problem

What is expected to happen?

It should generate android bundle package without any problems.

What does actually happen?

It generate error code after run cordova build android --release
Untitled-1

Information

Untitled-1

Command or Code

command line code: cordova build android --release

build.json file:

{ "android": { "debug": { "keystore": "../android.keystore", "storePassword": "android", "alias": "mykey1", "password" : "password", "keystoreType": "", "packageType": "apk" }, "release": { "keystore": "../android.keystore", "storePassword": "", "alias": "mykey2", "password" : "password", "keystoreType": "", "packageType": "bundle" } } }

Environment, Platform, Device

Version information

cordova-android 9.1.0-dev (master)
Cordova cli 10.0.0
Android studio 4.1.1

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@mosabab mosabab changed the title [BUG] Cannot produce android bundle package [BUG] Cannot produce android bundle package using cordova build android --release Jan 18, 2021
@mosabab mosabab changed the title [BUG] Cannot produce android bundle package using cordova build android --release No bundle produced using cordova build android --release Jan 18, 2021
@mosabab mosabab changed the title No bundle produced using cordova build android --release Android bundle package cannot produced using cordova build android --release Jan 18, 2021
@mosabab mosabab changed the title Android bundle package cannot produced using cordova build android --release Android bundle package could not be roduced using cordova build android --release Jan 18, 2021
@mosabab mosabab changed the title Android bundle package could not be roduced using cordova build android --release Android bundle package could not be produced using cordova build android --release Jan 18, 2021
@breautek breautek added the bug label Jan 20, 2021
@breautek
Copy link
Contributor

breautek commented Jan 20, 2021

Confirmed issue on nightly on a plain fresh cordova project, via cordova build android -- --packageType=bundle.

This does work on cordova-android@9.0.0

I believe the regression happened somewheres within these commits:

7428bd3 (HEAD -> master, origin/master, origin/HEAD, apache/master) Features/webp support for splashscreen (#1113)
55feadf fix(prepare): mapImageResources always returning [] (#1136)
97e2d15 test(java): remove duplicate code in BackButtonMultipageTest (#1129)
b245337 refactor(ProjectBuilder): clean up output file collection code (#1099)
bb7d733 refactor: unify installation on devices & emulators (#1123)
aa679ea feat(Adb): list devices and emulators in one go (#1125)
0e8234a refactor(check_reqs): cleanup default Java location detection on Windows (#1102)
d5b9029 Android - allow changing min sdk version (#1117)
671e1fd refactor: remove copied Adb.install from emulator.install (#1108)
c144c08 fix(android): allow file access for existing behavior (#1111)
aada3e8 refactor: do not kill adb on UNIX-like systems (#1103)
335b0f2 test: fix unit test failures for certain random orders (#1094)
b1f01d7 test: ensure single top-level describe block in test file (#1094)
3b56160 chore(asf): Update GitHub repo metadata
39e3156 fix: Reflect minimum required NodeJS (#1045)
e125ab1 refactor(retry): simplify retryPromise using modern JS (#1086)
5d3591b refactor(utils): reduce number of utils (#1085)
2062388 fix(prepare): fix pattern used to collect image resources (#1084)
33476b4 [Frequent Updates] Gradle 6.6.1 & Android Gradle Plugin 4.0.1 & com.jfrog.bintray.gradle 1.8.5 (#1079)
2c888f4 chore(pkg): remove deprecated no-op field "engineStrict" (#1081)
565106f refactor: Stop suppressing un-needed TruelyRandom lints (#1046)
a45217e ci: Added Node 14.x (#975)
d7790ca chore: remove unused emulator.create_image and its dependencies (#1019)
8ef8d99 fix(pluginHandlers): properly check if path is inside another (#1014)
80ad635 test(pluginHandlers/common): better setup & teardown (#1013)
ec944cf fix: gradle ignore properties (#1018)
ba5781c refactor: save ProjectBuilder instance in Api instance (#1016)
d86cb99 Remove unnecessary stuff (#1015)
3204b98 test(java): fix, improve and move clean script (#1017)
ce73525 test: fix missing stack traces in jasmine output (#1012)
cccf812 Set package-lock.json to 9.1.0-dev
f7e1979 Update JS snapshot to version 9.1.0-dev (via coho)
49fc5da Set VERSION to 9.1.0-dev (via coho)

Stacktrace:

ypeError: Cannot destructure property 'arch' of 'undefined' as it is undefined.
    at ProjectBuilder.findOutputFiles (/storage/cordova/breautek/bundletest/platforms/android/cordova/lib/builders/ProjectBuilder.js:58:52)
    at ProjectBuilder.findOutputBundles (/storage/cordova/breautek/bundletest/platforms/android/cordova/lib/builders/ProjectBuilder.js:334:32)
    at /storage/cordova/breautek/bundletest/platforms/android/cordova/lib/build.js:176:33
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

@breautek
Copy link
Contributor

breautek commented Jan 20, 2021

It appears 7428bd3 is the offending commit.

Building bundles works on 55feadf

But #1113 doesn't even touch ProjectBuilder or build.js 🤔

@breautek
Copy link
Contributor

I think I'm pointing the blame at the wrong PR, but I have a fix PR incoming.

@mosabab
Copy link
Contributor Author

mosabab commented Jan 20, 2021

Thanks for fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants