Ionic-cli: [ERROR] Could not parse build output file: platforms/android/app/build/outputs/apk/debug/output.json

Created on 4 Apr 2020  Â·  39Comments  Â·  Source: ionic-team/ionic-cli

Description:

My app was working without problem until a few days ago, repently it starts to fail and launch this error. I didnt change anything in the code , I only upload @angular/cli and @angular/core.

After that, the build fails.

Steps to Reproduce:

Run sudo ionic cordova run android

Output:

[INFO] Hardware device(s) found for android. Using --device.

ng run app:ionic-cordova-build --platform=android
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.

chunk {polyfills} polyfills-es2015.js, polyfills-es2015.js.map (polyfills) 142 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 752 kB [initial] [rendered]
chunk {0} 0-es2015.js, 0-es2015.js.map () 22.2 kB [rendered]
chunk {0} 0-es5.js, 0-es5.js.map () 27.4 kB [rendered]
chunk {2} 2-es2015.js, 2-es2015.js.map () 31.9 kB [rendered]
chunk {2} 2-es5.js, 2-es5.js.map () 38.9 kB [rendered]
chunk {1} 1-es2015.js, 1-es2015.js.map () 18.7 kB [rendered]
chunk {1} 1-es5.js, 1-es5.js.map () 24 kB [rendered]
chunk {3} 3-es2015.js, 3-es2015.js.map () 31.9 kB [rendered]
chunk {3} 3-es5.js, 3-es5.js.map () 38.9 kB [rendered]
chunk {4} 4-es2015.js, 4-es2015.js.map () 57.3 kB [rendered]
chunk {4} 4-es5.js, 4-es5.js.map () 80.1 kB [rendered]
chunk {5} 5-es2015.js, 5-es2015.js.map () 54.7 kB [rendered]
chunk {5} 5-es5.js, 5-es5.js.map () 77.5 kB [rendered]
chunk {6} 6-es2015.js, 6-es2015.js.map () 4.6 kB [rendered]
chunk {6} 6-es5.js, 6-es5.js.map () 6.47 kB [rendered]
chunk {7} 7-es2015.js, 7-es2015.js.map () 4.65 kB [rendered]
chunk {7} 7-es5.js, 7-es5.js.map () 6.52 kB [rendered]
chunk {8} 8-es2015.js, 8-es2015.js.map () 9.54 kB [rendered]
chunk {8} 8-es5.js, 8-es5.js.map () 13.7 kB [rendered]
chunk {9} 9-es2015.js, 9-es2015.js.map () 10 kB [rendered]
chunk {9} 9-es5.js, 9-es5.js.map () 14.2 kB [rendered]
chunk {10} 10-es2015.js, 10-es2015.js.map () 3.71 kB [rendered]
chunk {10} 10-es5.js, 10-es5.js.map () 5.43 kB [rendered]
chunk {11} 11-es2015.js, 11-es2015.js.map () 3.71 kB [rendered]
chunk {11} 11-es5.js, 11-es5.js.map () 5.43 kB [rendered]
chunk {12} 12-es2015.js, 12-es2015.js.map () 23.6 kB [rendered]
chunk {12} 12-es5.js, 12-es5.js.map () 27.4 kB [rendered]
chunk {13} 13-es2015.js, 13-es2015.js.map () 23.5 kB [rendered]
chunk {13} 13-es5.js, 13-es5.js.map () 27.3 kB [rendered]
chunk {14} 14-es2015.js, 14-es2015.js.map () 11.6 kB [rendered]
chunk {14} 14-es5.js, 14-es5.js.map () 14.6 kB [rendered]
chunk {15} 15-es2015.js, 15-es2015.js.map () 11.1 kB [rendered]
chunk {15} 15-es5.js, 15-es5.js.map () 14.1 kB [rendered]
chunk {16} 16-es2015.js, 16-es2015.js.map () 8.44 kB [rendered]
chunk {16} 16-es5.js, 16-es5.js.map () 11 kB [rendered]
chunk {17} 17-es2015.js, 17-es2015.js.map () 8.57 kB [rendered]
chunk {17} 17-es5.js, 17-es5.js.map () 11.1 kB [rendered]
chunk {18} 18-es2015.js, 18-es2015.js.map () 5.63 kB [rendered]
chunk {18} 18-es5.js, 18-es5.js.map () 7.06 kB [rendered]
chunk {19} 19-es2015.js, 19-es2015.js.map () 5.63 kB [rendered]
chunk {19} 19-es5.js, 19-es5.js.map () 7.06 kB [rendered]
chunk {20} 20-es2015.js, 20-es2015.js.map () 16 kB [rendered]
chunk {20} 20-es5.js, 20-es5.js.map () 20.1 kB [rendered]
chunk {21} 21-es2015.js, 21-es2015.js.map () 68.4 kB [rendered]
chunk {21} 21-es5.js, 21-es5.js.map () 84.2 kB [rendered]
chunk {22} 22-es2015.js, 22-es2015.js.map () 68 kB [rendered]
chunk {22} 22-es5.js, 22-es5.js.map () 83.8 kB [rendered]
chunk {23} 23-es2015.js, 23-es2015.js.map () 19.7 kB [rendered]
chunk {23} 23-es5.js, 23-es5.js.map () 24.5 kB [rendered]
chunk {24} 24-es2015.js, 24-es2015.js.map () 18.7 kB [rendered]
chunk {24} 24-es5.js, 24-es5.js.map () 23.5 kB [rendered]
chunk {25} 25-es2015.js, 25-es2015.js.map () 3.43 kB [rendered]
chunk {25} 25-es5.js, 25-es5.js.map () 5.09 kB [rendered]
chunk {26} 26-es2015.js, 26-es2015.js.map () 12.6 kB [rendered]
chunk {26} 26-es5.js, 26-es5.js.map () 17.7 kB [rendered]
chunk {27} 27-es2015.js, 27-es2015.js.map () 12.6 kB [rendered]
chunk {27} 27-es5.js, 27-es5.js.map () 17.7 kB [rendered]
chunk {28} 28-es2015.js, 28-es2015.js.map () 14.6 kB [rendered]
chunk {28} 28-es5.js, 28-es5.js.map () 18.8 kB [rendered]
chunk {29} 29-es2015.js, 29-es2015.js.map () 14.4 kB [rendered]
chunk {29} 29-es5.js, 29-es5.js.map () 18.7 kB [rendered]
chunk {30} 30-es2015.js, 30-es2015.js.map () 25.8 kB [rendered]
chunk {30} 30-es5.js, 30-es5.js.map () 37 kB [rendered]
chunk {31} 31-es2015.js, 31-es2015.js.map () 25.6 kB [rendered]
chunk {31} 31-es5.js, 31-es5.js.map () 36.9 kB [rendered]
chunk {32} 32-es2015.js, 32-es2015.js.map () 41 kB [rendered]
chunk {32} 32-es5.js, 32-es5.js.map () 48.5 kB [rendered]
chunk {33} 33-es2015.js, 33-es2015.js.map () 44.2 kB [rendered]
chunk {33} 33-es5.js, 33-es5.js.map () 51.7 kB [rendered]
chunk {34} 34-es2015.js, 34-es2015.js.map () 13.2 kB [rendered]
chunk {34} 34-es5.js, 34-es5.js.map () 16.8 kB [rendered]
chunk {35} 35-es2015.js, 35-es2015.js.map () 12.9 kB [rendered]
chunk {35} 35-es5.js, 35-es5.js.map () 16.5 kB [rendered]
chunk {36} 36-es2015.js, 36-es2015.js.map () 28.4 kB [rendered]
chunk {36} 36-es5.js, 36-es5.js.map () 42.8 kB [rendered]
chunk {37} 37-es2015.js, 37-es2015.js.map () 28.5 kB [rendered]
chunk {37} 37-es5.js, 37-es5.js.map () 42.9 kB [rendered]
chunk {38} 38-es2015.js, 38-es2015.js.map () 21.4 kB [rendered]
chunk {38} 38-es5.js, 38-es5.js.map () 27.5 kB [rendered]
chunk {39} 39-es2015.js, 39-es2015.js.map () 20.7 kB [rendered]
chunk {39} 39-es5.js, 39-es5.js.map () 26.8 kB [rendered]
chunk {40} 40-es2015.js, 40-es2015.js.map () 34.5 kB [rendered]
chunk {40} 40-es5.js, 40-es5.js.map () 49.9 kB [rendered]
chunk {41} 41-es2015.js, 41-es2015.js.map () 20.6 kB [rendered]
chunk {41} 41-es5.js, 41-es5.js.map () 25.1 kB [rendered]
chunk {42} 42-es2015.js, 42-es2015.js.map () 20 kB [rendered]
chunk {42} 42-es5.js, 42-es5.js.map () 24.5 kB [rendered]
chunk {45} 45-es2015.js, 45-es2015.js.map () 9.64 kB [rendered]
chunk {45} 45-es5.js, 45-es5.js.map () 13.8 kB [rendered]
chunk {46} 46-es2015.js, 46-es2015.js.map () 9.92 kB [rendered]
chunk {46} 46-es5.js, 46-es5.js.map () 14.1 kB [rendered]
chunk {43} 43-es2015.js, 43-es2015.js.map () 12.6 kB [rendered]
chunk {43} 43-es5.js, 43-es5.js.map () 14.5 kB [rendered]
chunk {48} 48-es2015.js, 48-es2015.js.map () 21.9 kB [rendered]
chunk {48} 48-es5.js, 48-es5.js.map () 27.8 kB [rendered]
chunk {47} 47-es2015.js, 47-es2015.js.map () 20.5 kB [rendered]
chunk {47} 47-es5.js, 47-es5.js.map () 26.4 kB [rendered]
chunk {49} 49-es2015.js, 49-es2015.js.map () 46.6 kB [rendered]
chunk {49} 49-es5.js, 49-es5.js.map () 62.1 kB [rendered]
chunk {50} 50-es2015.js, 50-es2015.js.map () 47 kB [rendered]
chunk {50} 50-es5.js, 50-es5.js.map () 62.5 kB [rendered]
chunk {51} 51-es2015.js, 51-es2015.js.map () 12.7 kB [rendered]
chunk {51} 51-es5.js, 51-es5.js.map () 17.8 kB [rendered]
chunk {52} 52-es2015.js, 52-es2015.js.map () 12.7 kB [rendered]
chunk {52} 52-es5.js, 52-es5.js.map () 17.8 kB [rendered]
chunk {53} 53-es2015.js, 53-es2015.js.map () 6.49 kB [rendered]
chunk {53} 53-es5.js, 53-es5.js.map () 9.65 kB [rendered]
chunk {54} 54-es2015.js, 54-es2015.js.map () 24.4 kB [rendered]
chunk {54} 54-es5.js, 54-es5.js.map () 45.4 kB [rendered]
chunk {55} 55-es2015.js, 55-es2015.js.map () 25.1 kB [rendered]
chunk {55} 55-es5.js, 55-es5.js.map () 29.8 kB [rendered]
chunk {56} 56-es2015.js, 56-es2015.js.map () 22.6 kB [rendered]
chunk {56} 56-es5.js, 56-es5.js.map () 27.2 kB [rendered]
chunk {57} 57-es2015.js, 57-es2015.js.map () 26.3 kB [rendered]
chunk {57} 57-es5.js, 57-es5.js.map () 34.7 kB [rendered]
chunk {58} 58-es2015.js, 58-es2015.js.map () 25.5 kB [rendered]
chunk {58} 58-es5.js, 58-es5.js.map () 33.9 kB [rendered]
chunk {59} 59-es2015.js, 59-es2015.js.map () 21.9 kB [rendered]
chunk {59} 59-es5.js, 59-es5.js.map () 32.4 kB [rendered]
chunk {60} 60-es2015.js, 60-es2015.js.map () 21.9 kB [rendered]
chunk {60} 60-es5.js, 60-es5.js.map () 32.4 kB [rendered]
chunk {61} 61-es2015.js, 61-es2015.js.map () 36.6 kB [rendered]
chunk {61} 61-es5.js, 61-es5.js.map () 57.3 kB [rendered]
chunk {62} 62-es2015.js, 62-es2015.js.map () 36.6 kB [rendered]
chunk {62} 62-es5.js, 62-es5.js.map () 57.3 kB [rendered]
chunk {63} 63-es2015.js, 63-es2015.js.map () 8.06 kB [rendered]
chunk {63} 63-es5.js, 63-es5.js.map () 9.82 kB [rendered]
chunk {64} 64-es2015.js, 64-es2015.js.map () 6.99 kB [rendered]
chunk {64} 64-es5.js, 64-es5.js.map () 8.98 kB [rendered]
chunk {65} 65-es2015.js, 65-es2015.js.map () 6.99 kB [rendered]
chunk {65} 65-es5.js, 65-es5.js.map () 8.98 kB [rendered]
chunk {66} 66-es2015.js, 66-es2015.js.map () 14.9 kB [rendered]
chunk {66} 66-es5.js, 66-es5.js.map () 18.2 kB [rendered]
chunk {67} 67-es2015.js, 67-es2015.js.map () 15.1 kB [rendered]
chunk {67} 67-es5.js, 67-es5.js.map () 18.4 kB [rendered]
chunk {68} 68-es2015.js, 68-es2015.js.map () 8.69 kB [rendered]
chunk {68} 68-es5.js, 68-es5.js.map () 18 kB [rendered]
chunk {69} 69-es2015.js, 69-es2015.js.map () 1.84 kB [rendered]
chunk {69} 69-es5.js, 69-es5.js.map () 3.13 kB [rendered]
chunk {70} 70-es2015.js, 70-es2015.js.map () 12.7 kB [rendered]
chunk {70} 70-es5.js, 70-es5.js.map () 16.8 kB [rendered]
chunk {71} 71-es2015.js, 71-es2015.js.map () 12.7 kB [rendered]
chunk {71} 71-es5.js, 71-es5.js.map () 16.9 kB [rendered]
chunk {72} 72-es2015.js, 72-es2015.js.map () 18.2 kB [rendered]
chunk {72} 72-es5.js, 72-es5.js.map () 24.6 kB [rendered]
chunk {74} 74-es2015.js, 74-es2015.js.map () 11.1 kB [rendered]
chunk {74} 74-es5.js, 74-es5.js.map () 15.7 kB [rendered]
chunk {73} 73-es2015.js, 73-es2015.js.map () 18.8 kB [rendered]
chunk {73} 73-es5.js, 73-es5.js.map () 25.1 kB [rendered]
chunk {75} 75-es2015.js, 75-es2015.js.map () 10.9 kB [rendered]
chunk {75} 75-es5.js, 75-es5.js.map () 15.5 kB [rendered]
chunk {76} 76-es2015.js, 76-es2015.js.map () 20.2 kB [rendered]
chunk {76} 76-es5.js, 76-es5.js.map () 28.7 kB [rendered]
chunk {common} common-es2015.js, common-es2015.js.map (common) 22.5 kB [rendered]
chunk {common} common-es5.js, common-es5.js.map (common) 32.5 kB [rendered]
chunk {core-js-js} core-js-js-es2015.js, core-js-js-es2015.js.map (core-js-js) 78.7 kB [rendered]
chunk {core-js-js} core-js-js-es5.js, core-js-js-es5.js.map (core-js-js) 151 kB [rendered]
chunk {css-shim-978387b1-1e75855f-js} css-shim-978387b1-1e75855f-js-es2015.js, css-shim-978387b1-1e75855f-js-es2015.js.map (css-shim-978387b1-1e75855f-js) 21.9 kB [rendered]
chunk {css-shim-978387b1-1e75855f-js} css-shim-978387b1-1e75855f-js-es5.js, css-shim-978387b1-1e75855f-js-es5.js.map (css-shim-978387b1-1e75855f-js) 22.8 kB [rendered]
chunk {dom-js} dom-js-es2015.js, dom-js-es2015.js.map (dom-js) 20.2 kB [rendered]
chunk {dom-js} dom-js-es5.js, dom-js-es5.js.map (dom-js) 31.9 kB [rendered]
chunk {dom-76cc7c7d-0a082895-js} dom-76cc7c7d-0a082895-js-es2015.js, dom-76cc7c7d-0a082895-js-es2015.js.map (dom-76cc7c7d-0a082895-js) 19.8 kB [rendered]
chunk {dom-76cc7c7d-0a082895-js} dom-76cc7c7d-0a082895-js-es5.js, dom-76cc7c7d-0a082895-js-es5.js.map (dom-76cc7c7d-0a082895-js) 31.3 kB [rendered]
chunk {focus-visible-70713a0c-js} focus-visible-70713a0c-js-es2015.js, focus-visible-70713a0c-js-es2015.js.map (focus-visible-70713a0c-js) 2.16 kB [rendered]
chunk {focus-visible-70713a0c-js} focus-visible-70713a0c-js-es5.js, focus-visible-70713a0c-js-es5.js.map (focus-visible-70713a0c-js) 2.38 kB [rendered]
chunk {hardware-back-button-5afe3cb0-js} hardware-back-button-5afe3cb0-js-es2015.js, hardware-back-button-5afe3cb0-js-es2015.js.map (hardware-back-button-5afe3cb0-js) 2.07 kB [rendered]
chunk {hardware-back-button-5afe3cb0-js} hardware-back-button-5afe3cb0-js-es5.js, hardware-back-button-5afe3cb0-js-es5.js.map (hardware-back-button-5afe3cb0-js) 3.89 kB [rendered]
chunk {input-shims-a4fc53ac-js} input-shims-a4fc53ac-js-es2015.js, input-shims-a4fc53ac-js-es2015.js.map (input-shims-a4fc53ac-js) 13.5 kB [rendered]
chunk {input-shims-a4fc53ac-js} input-shims-a4fc53ac-js-es5.js, input-shims-a4fc53ac-js-es5.js.map (input-shims-a4fc53ac-js) 14.3 kB [rendered]
chunk {ios-transition-1850e475-js} ios-transition-1850e475-js-es2015.js, ios-transition-1850e475-js-es2015.js.map (ios-transition-1850e475-js) 27.8 kB [rendered]
chunk {ios-transition-1850e475-js} ios-transition-1850e475-js-es5.js, ios-transition-1850e475-js-es5.js.map (ios-transition-1850e475-js) 29 kB [rendered]
chunk {login-login-module} login-login-module-es2015.js, login-login-module-es2015.js.map (login-login-module) 12.9 kB [rendered]
chunk {login-login-module} login-login-module-es5.js, login-login-module-es5.js.map (login-login-module) 14.7 kB [rendered]
chunk {main} main-es2015.js, main-es2015.js.map (main) 33.5 kB [initial] [rendered]
chunk {main} main-es5.js, main-es5.js.map (main) 39 kB [initial] [rendered]
chunk {md-transition-083fcf52-js} md-transition-083fcf52-js-es2015.js, md-transition-083fcf52-js-es2015.js.map (md-transition-083fcf52-js) 3.92 kB [rendered]
chunk {md-transition-083fcf52-js} md-transition-083fcf52-js-es5.js, md-transition-083fcf52-js-es5.js.map (md-transition-083fcf52-js) 3.98 kB [rendered]
chunk {runtime} runtime-es2015.js, runtime-es2015.js.map (runtime) 9.86 kB [entry] [rendered]
chunk {runtime} runtime-es5.js, runtime-es5.js.map (runtime) 9.86 kB [entry] [rendered]
chunk {status-tap-839e1402-js} status-tap-839e1402-js-es2015.js, status-tap-839e1402-js-es2015.js.map (status-tap-839e1402-js) 1.8 kB [rendered]
chunk {status-tap-839e1402-js} status-tap-839e1402-js-es5.js, status-tap-839e1402-js-es5.js.map (status-tap-839e1402-js) 1.96 kB [rendered]
chunk {shadow-css-4889ae62-23996f3f-js} shadow-css-4889ae62-23996f3f-js-es2015.js, shadow-css-4889ae62-23996f3f-js-es2015.js.map (shadow-css-4889ae62-23996f3f-js) 14.8 kB [rendered]
chunk {shadow-css-4889ae62-23996f3f-js} shadow-css-4889ae62-23996f3f-js-es5.js, shadow-css-4889ae62-23996f3f-js-es5.js.map (shadow-css-4889ae62-23996f3f-js) 17.6 kB [rendered]
chunk {styles} styles-es2015.js, styles-es2015.js.map (styles) 114 kB [initial] [rendered]
chunk {styles} styles-es5.js, styles-es5.js.map (styles) 115 kB [initial] [rendered]
chunk {swipe-back-c7acdfde-js} swipe-back-c7acdfde-js-es2015.js, swipe-back-c7acdfde-js-es2015.js.map (swipe-back-c7acdfde-js) 2.69 kB [rendered]
chunk {swipe-back-c7acdfde-js} swipe-back-c7acdfde-js-es5.js, swipe-back-c7acdfde-js-es5.js.map (swipe-back-c7acdfde-js) 2.84 kB [rendered]
chunk {swiper-bundle-ccdaac54-js} swiper-bundle-ccdaac54-js-es2015.js, swiper-bundle-ccdaac54-js-es2015.js.map (swiper-bundle-ccdaac54-js) 176 kB [rendered]
chunk {swiper-bundle-ccdaac54-js} swiper-bundle-ccdaac54-js-es5.js, swiper-bundle-ccdaac54-js-es5.js.map (swiper-bundle-ccdaac54-js) 210 kB [rendered]
chunk {tab1-tab1-module} tab1-tab1-module-es2015.js, tab1-tab1-module-es2015.js.map (tab1-tab1-module) 18.3 kB [rendered]
chunk {tab1-tab1-module} tab1-tab1-module-es5.js, tab1-tab1-module-es5.js.map (tab1-tab1-module) 22.8 kB [rendered]
chunk {tab2-tab2-module} tab2-tab2-module-es2015.js, tab2-tab2-module-es2015.js.map (tab2-tab2-module) 11.4 kB [rendered]
chunk {tab2-tab2-module} tab2-tab2-module-es5.js, tab2-tab2-module-es5.js.map (tab2-tab2-module) 13.3 kB [rendered]
chunk {tabs-tabs-module} tabs-tabs-module-es2015.js, tabs-tabs-module-es2015.js.map (tabs-tabs-module) 9.78 kB [rendered]
chunk {tabs-tabs-module} tabs-tabs-module-es5.js, tabs-tabs-module-es5.js.map (tabs-tabs-module) 11.6 kB [rendered]
chunk {tap-click-606f325e-js} tap-click-606f325e-js-es2015.js, tap-click-606f325e-js-es2015.js.map (tap-click-606f325e-js) 6.38 kB [rendered]
chunk {tap-click-606f325e-js} tap-click-606f325e-js-es5.js, tap-click-606f325e-js-es5.js.map (tap-click-606f325e-js) 6.73 kB [rendered]
chunk {44} 44-es2015.js, 44-es2015.js.map () 12.6 kB [rendered]
chunk {44} 44-es5.js, 44-es5.js.map () 14.5 kB [rendered]
chunk {vendor} vendor-es2015.js, vendor-es2015.js.map (vendor) 3.6 MB [initial] [rendered]
chunk {vendor} vendor-es5.js, vendor-es5.js.map (vendor) 4.22 MB [initial] [rendered]
chunk {cordova} cordova.js, cordova.js.map (cordova) 63.5 kB [entry] [rendered]
Date: 2020-04-04T11:07:00.066Z - Hash: 425d0ac5d5f12cd53b88 - Time: 18824ms
[ERROR] Could not parse build output file: platforms/android/app/build/outputs/apk/debug/output.json

My ionic info:

Ionic:

   Ionic CLI                     : 6.4.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.0
   @angular-devkit/build-angular : 0.901.0
   @angular-devkit/schematics    : 8.3.25
   @angular/cli                  : 9.1.0
   @ionic/angular-toolkit        : 2.1.2

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 8 other plugins)

Utility:

   cordova-res (update available: 0.11.0) : 0.9.0
   native-run (update available: 1.0.0)   : 0.3.0

System:

   Android SDK Tools : 26.1.1 (/root/Android/Sdk/)
   NodeJS            : v13.8.0 (/usr/local/bin/node)
   npm               : 6.13.6
   OS                : Linux 5.3

Other Information:

I tried to reinstall @angular/core and @angular/cli , delete node_modules and reinstall node_modules folder. But doesnt work

triage

Most helpful comment

solved downgrading to ionic cli 6.4.0

All 39 comments

same issue here
when
ionic cordova run android
[ERROR] Could not parse build output file: platforms/android/app/build/outputs/apk/debug/output.json

`ionic info

Ionic:

Ionic CLI : 6.4.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.0.5
@angular-devkit/build-angular : 0.803.25
@angular-devkit/schematics : 8.3.25
@angular/cli : 8.3.25
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 8 other plugins)

Utility:

cordova-res (update available: 0.11.0) : 0.10.0
native-run (update available: 1.0.0) : 0.2.8

System:

Android SDK Tools : 26.1.1 (/Users/tva/Library/Android/sdk/)
ios-deploy : 1.9.4
ios-sim : 8.0.2
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.14.4
OS : macOS Catalina
Xcode : Xcode 11.2.1 Build version 11B53
`

solved downgrading to ionic cli 6.4.0

It works for me! Thanks

Can you run with the --verbose flag? It should explain what's going wrong.

Are you running it from inside platform/android folder?
If yes it does not work.
run it from the root folder and it should be good.

Can you run with the --verbose flag? It should explain what's going wrong.

$ionic info

Ionic:
Ionic CLI                     : 6.4.1 (C:\work\tools\nodejs\nvm\v10.16.3\node_modules\@ionic\cli)                                                             
Ionic Framework               : @ionic/angular 5.0.7                                                                                                          
@angular-devkit/build-angular : 0.803.26                                                                                                                      
@angular-devkit/schematics    : 8.3.26                                                                                                                        
@angular/cli                  : 8.3.26                                                                                                                        
@ionic/angular-toolkit        : 2.2.0                                                                                                                                                                                                                                                                                    
Cordova:                                                                                                                                                                                                                                                                                                                       
Cordova CLI       : 9.0.0 ([email protected])                                                                                                                 
Cordova Platforms : android 8.1.0                                                                                                                             
Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 14 other plugins)
Utility:                                                                                                                                                                                                                                                                                                                       cordova-res : 0.6.0                                                                                                                                           
native-run  : 0.2.8                                                                                                                                                                                                                                                                                                      
System:                                                                                                                                                                                                                                                                                                                        
Android SDK Tools : 26.1.1 (C:\Work\android\sdk)                                                                                                              
NodeJS            : v10.16.3 (C:\Work\tools\nodejs\activate\node.exe)                                                                                         
npm               : 6.9.0                                                                                                                                     
OS                : Windows 10          

$call ionic cordova run android --livereload --consolelogs --verbose

[ng] Date: 2020-04-05T00:04:59.359Z - Hash: d57b57009e69e336b3cc - Time: 7584ms ionic:lib:serve awaiting TCP connection to localhost:8100 +12s [INFO] Development server running! Local: http://localhost:8100 Use Ctrl+C to quit this process ionic:lib:events No process.send, not emitting event serve:ready +0ms ionic:lib:serve serve details: { custom: false, ionic:lib:serve protocol: 'http', ionic:lib:serve localAddress: 'localhost', ionic:lib:serve externalAddress: 'localhost', ionic:lib:serve externalNetworkInterfaces: [], ionic:lib:serve port: 8100, ionic:lib:serve externallyAccessible: false } +12ms ionic:lib:cordova:project Error parsing file 'platforms\android\app\build\outputs\apk\debug\output.json': { [Error: ENOENT: no such file or directory, open 'D:src\trunksrc\ionic\rda-nr\platformsandroid\app\build\outputs\apk\debug\output.json'] ionic:lib:cordova:project errno: -4058, ionic:lib:cordova:project code: 'ENOENT', ionic:lib:cordova:project syscall: 'open', ionic:lib:cordova:project path: ionic:lib:cordova:project 'D:\src\trunk\src\ionic\rda-nr\platforms\android\app\build\outputs\apk\debug\output.json' } +0ms [ERROR] Could not parse build output file: platformsandroid\app\build\outputs\apk\debug\output.json ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms ionic:utils-process onBeforeExit handler: running 3 functions +1ms ionic:lib:hooks Looking for ionic:serve:after npm script. +12s [ng] i ï½¢wdmï½£: Compiled successfully. ionic:utils-process processExit: exiting (exit code: 1) +89ms

solved downgrading to ionic cli 6.4.0

its really works for me also

Can you run with the --verbose flag? It should explain what's going wrong.

Sure, but is working. Do u refer about change again "ionic/cli" version (to the old) to check again the error?

I still have error on: ionic cordova run android
If I execute:
npm i -g [email protected]
I get: "No matching version found for [email protected]"

How I can downgrade?

@riccardotreagles

npm uinstall -g @ionic/cli
npm install -g @ionic/[email protected]

@anatoly-spb thank you, it works! only a small typo error in your post:
Correct:

npm uninstall -g @ionic/cli
npm install -g @ionic/[email protected]

If you get this issue, please post the output of the command with the --verbose flag along with your ionic info and then downgrade to 6.4.0 for a workaround. Thanks!


~@anatoly-spb Could you inspect the D:\src\trunk\src\ionic\rda-nr\platforms\android\app\build\outputs\apk\debug folder after running a build and list its content? If it doesn't exist, please let me know what the structure looks like. Thanks!~

Edit: Nevermind! I see the issue after inspecting that path. And thanks @andalike... I missed your comment! That seems to be the reason.

@dwieeb yep, sure. here is a directory structure after

ionic cordova run android --verbose >log.txt
├───app
│   ├───libs
│   └───src
│       └───main
│           ├───assets
│           │   └───www
│           │       ├───assets
│           │       │   └───icon
│           │       ├───cordova-js-src
│           │       │   ├───android
│           │       │   └───plugin
│           │       │       └───android
│           │       ├───plugins
│           │       │   ├───cordova-plugin-device
│           │       │   │   └───www
│           │       │   ├───cordova-plugin-firebase-analytics
│           │       │   │   └───www
│           │       │   ├───cordova-plugin-in-app-play-update
│           │       │   │   └───www
│           │       │   ├───cordova-plugin-inappbrowser
│           │       │   │   └───www
│           │       │   ├───cordova-plugin-ionic-keyboard
│           │       │   │   └───www
│           │       │   │       └───android
│           │       │   ├───cordova-plugin-ionic-webview
│           │       │   │   └───src
│           │       │   │       └───www
│           │       │   ├───cordova-plugin-splashscreen
│           │       │   │   └───www
│           │       │   ├───cordova-plugin-statusbar
│           │       │   │   └───www
│           │       │   ├───cordova-sqlite-storage
│           │       │   │   └───www
│           │       │   ├───onesignal-cordova-plugin
│           │       │   │   └───www
│           │       │   └───phonegap-plugin-barcodescanner
│           │       │       └───www
│           │       └───svg
│           ├───java
│           │   ├───by
│           │   │   └───chemerisuk
│           │   │       └───cordova
│           │   │           ├───firebase
│           │   │           └───support
│           │   ├───com
│           │   │   ├───ionicframework
│           │   │   │   └───cordova
│           │   │   │       └───webview
│           │   │   ├───phonegap
│           │   │   │   └───plugins
│           │   │   │       └───barcodescanner
│           │   │   └───plugin
│           │   │       └───gcm
│           │   ├───io
│           │   │   ├───ionic
│           │   │   │   └───keyboard
│           │   │   └───sqlc
│           │   ├───org
│           │   │   └───apache
│           │   │       └───cordova
│           │   │           ├───device
│           │   │           ├───inappbrowser
│           │   │           ├───splashscreen
│           │   │           ├───statusbar
│           │   │           └───whitelist
│           │   └───ru
│           │       └───rlisystems
│           │           ├───cordova
│           │           │   └───plugins
│           │           │       └───inappplayupdate
│           │           └───mobile
│           │               └───rda
│           │                   └───nr
│           ├───libs
│           └───res
│               ├───drawable-hdpi
│               ├───drawable-land-hdpi
│               ├───drawable-land-ldpi
│               ├───drawable-land-mdpi
│               ├───drawable-land-xhdpi
│               ├───drawable-land-xxhdpi
│               ├───drawable-land-xxxhdpi
│               ├───drawable-mdpi
│               ├───drawable-port-hdpi
│               ├───drawable-port-ldpi
│               ├───drawable-port-mdpi
│               ├───drawable-port-xhdpi
│               ├───drawable-port-xxhdpi
│               ├───drawable-port-xxxhdpi
│               ├───drawable-xhdpi
│               ├───drawable-xxhdpi
│               ├───mipmap-hdpi
│               ├───mipmap-hdpi-v26
│               ├───mipmap-ldpi
│               ├───mipmap-ldpi-v26
│               ├───mipmap-mdpi
│               ├───mipmap-mdpi-v26
│               ├───mipmap-xhdpi
│               ├───mipmap-xhdpi-v26
│               ├───mipmap-xxhdpi
│               ├───mipmap-xxhdpi-v26
│               ├───mipmap-xxxhdpi
│               ├───mipmap-xxxhdpi-v26
│               ├───values
│               └───xml
├───cordova
│   └───lib
│       ├───builders
│       └───config
├───cordova-support-google-services
├───CordovaLib
│   └───src
│       └───org
│           └───apache
│               └───cordova
│                   └───engine
├───onesignal-cordova-plugin
├───phonegap-plugin-barcodescanner
└───platform_www
    ├───cordova-js-src
    │   ├───android
    │   └───plugin
    │       └───android
    └───plugins
        ├───cordova-plugin-device
        │   └───www
        ├───cordova-plugin-firebase-analytics
        │   └───www
        ├───cordova-plugin-in-app-play-update
        │   └───www
        ├───cordova-plugin-inappbrowser
        │   └───www
        ├───cordova-plugin-ionic-keyboard
        │   └───www
        │       └───android
        ├───cordova-plugin-ionic-webview
        │   └───src
        │       └───www
        ├───cordova-plugin-splashscreen
        │   └───www
        ├───cordova-plugin-statusbar
        │   └───www
        ├───cordova-sqlite-storage
        │   └───www
        ├───onesignal-cordova-plugin
        │   └───www
        └───phonegap-plugin-barcodescanner
            └───www

Here is a full log https://pastebin.com/i3L5rWfp

Thanks @anatoly-spb! I just pushed 6.4.2 which should fix this issue. Thanks for the bug reports everyone!

Please let me know if there are any issues.

@dwieeb thank you for the fast fix. I can try one, but:

>npm install -g @ionic/[email protected]
npm ERR! code ETARGET                                                                                                                                         
npm ERR! notarget No matching version found for @ionic/[email protected]                                                                                              
npm ERR! notarget In most cases you or one of your dependencies are requesting                                                                                
npm ERR! notarget a package version that doesn't exist. 

It may take a few minutes for it to become available. Try again in a little bit! Thanks!

It may take a few minutes for it to become available. Try again in a little bit! Thanks!

unfortunately with @ionic/[email protected]:

>ionic -version
6.4.2 

the same problem:

2020-04-05T19:12:55.406Z ionic:lib:hooks Looking for ionic:build:after npm script.
2020-04-05T19:12:55.407Z ionic:lib:cordova:project Error parsing file 'D:\\src\\trunk\\src\\ionic\\rda\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output.json': { [Error: ENOENT: no such file or directory, open 'D:\src\trunk\src\ionic\rda\platforms\android\app\build\outputs\apk\debug\output.json']
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path:
   'D:\\src\\trunk\\src\\ionic\\rda\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output.json' }
[ERROR] Could not parse build output file: D:\src\trunk\src\ionic\rda\platforms\android\app\build\outputs\apk\debug\output.json

Let me know if you need additional information.

@dwieeb I have checked, the same problem.

@dwieeb I have taken a look on the difference https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.4.0...@ionic/[email protected]

It seems to me there is a problem:

export async function getPackagePath(appName: string, platform: string, { emulator = false, release = false }: GetPackagePathOptions = {}): Promise<string> {
  if (platform === 'android') {
-    // TODO: don't hardcode this/support multiple build paths (ex: multiple arch builds)
-    // use app/build/outputs/apk/debug/output.json?
-    if (release) {
-      return path.join(CORDOVA_ANDROID_PACKAGE_PATH, 'release', 'app-release-unsigned.apk');
-    }
+    const outputPath = path.join(CORDOVA_ANDROID_PACKAGE_PATH, release ? 'release' : 'debug');
+   const outputJsonPath = path.join(outputPath, 'output.json');
+   const outputJson = await getAndroidBuildOutputJson(outputJsonPath);

-    return path.join(CORDOVA_ANDROID_PACKAGE_PATH, 'debug', 'app-debug.apk');
+    // TODO: handle multiple files from output.json, prompt to select?
+    return path.join(outputPath, outputJson[0].path);

Instead of apk, you use json.

Well, we want to use the output.json file to know which apk was built. The commit is good, but it was broken when run outside of the root directory. I'm not sure why it's still not working for you.

Well, we want to use the output.json file to know which apk was built. The commit is good, but it was broken when run outside of the root directory. I'm not sure why it's still not working for you.

I run the ionic command from my project root always. What do you mean when you point to "outside the root directory"?

@dwieeb Also double check the usage : you use the nonexistent 'D:\src\trunk\src\ionic\rda\platforms\android\app\build\outputs\apk\debug\output.json directory. There is no a build directory when you use one.

What do you mean when you point to "outside the root directory"?

Oh, I just meant it seems most people (including myself) saw this issue when running the command in a directory other than the project root. That's what 6.4.2 fixes.

There is no a build directory when you use one.

I wonder if it's different for Windows? Do you happen to know where it places the APK file when you run a build? I will check on my Windows computer shortly.

I wonder if it's different for Windows? Do you happen to know where it places the APK file when you run a build? I will check on my Windows computer shortly.

The build has not been run yet when we use the output.json file. Look at the log.txt and the platforms/android directory structure. You can try to reproduce the problem also on linux/mac:

ionic cordova platform remove android
ionic cordova platform add android
ionic cordova run

I see the issue. 6.4.3 is out with a fix. Thanks for your help! Let me know if there are any issues still.

I see the issue. 6.4.3 is out with a fix. Thanks for your help! Let me know if there are any issues still.

@dwieeb thank you so much, the @ionic/[email protected] works as expected.

update ionic, i believe the lates one is 6.5.0

1) Please dont use Sudo
2) I Think the error why its not working is because you used "sudo" somewhere before
3) Try this first
4)Create a new folder, Copy all content to that new folder
5)Try doing a build(ionic cordova build android) and DONT use sudo in that,

1) Delete the folder /usr/local/bin/node_modules/ionic
2) Removed the symbolic link to the alias named ionic
3) Re-installed the ionic@beta globally without using sudo. This created the node script ionic in ~/.npm-global/lib/node_modules/ionic/bin.

Also try to join the Slack channel of ionic. The community there will help..
https://ionic-worldwide.slack.com/archives/C03AJV5A5

1) npm uninstall -g ionic
2) npm install -g @ionic/cli

ok will try thanks friend

I wil get slack

What it the folder from where you are doing the build?
is it: /Users/meanstack/new/sumitup ?

Same problem with v6.6.0 :

[ERROR] Could not parse build output file:
/Users/didier/eclipse-workspaces/redstone/ticketRestoApp/platforms/android/app/build/outputs/apk/debug/output.json

the error is no such file or directory.

output.json file is located here : /Users/didier/eclipse-workspaces/redstone/ticketRestoApp/platforms/android/build/outputs/apk/debug

without app between android and build.

@DVanderstoken What is your cordova-android version?

Still, I'm getting the same output:
ionic cordova run android --verbose _cut short verbose_

BUILD SUCCESSFUL in 5s
44 actionable tasks: 17 executed, 27 up-to-date
Command finished with error code 0: /media/user/WorkSpace/IonicProject/demodelete/platforms/android/gradlew cdvBuildDebug,-b,/media/user/WorkSpace/IonicProject/demodelete/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true
Built the following apk(s): 
        /media/user/WorkSpace/IonicProject/demodelete/platforms/android/build/outputs/apk/debug/android-debug.apk
No scripts found for hook "after_compile".
No scripts found for hook "after_build".
  ionic:lib:cordova:project Error parsing file '/media/user/WorkSpace/IonicProject/demodelete/platforms/android/app/build/outputs/apk/debug/output.json': [Error: ENOENT: no such file or directory, open '/media/user/WorkSpace/IonicProject/demodelete/platforms/android/app/build/outputs/apk/debug/output.json'] {
  ionic:lib:cordova:project   errno: -2,
  ionic:lib:cordova:project   code: 'ENOENT',
  ionic:lib:cordova:project   syscall: 'open',
  ionic:lib:cordova:project   path: '/media/user/WorkSpace/IonicProject/demodelete/platforms/android/app/build/outputs/apk/debug/output.json'
  ionic:lib:cordova:project } +0ms

[ERROR] Could not parse build output file:
/media/user/WorkSpace/IonicProject/demodelete/platforms/android/app/build/outputs/apk/debug/output.json

```
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 2 functions +0ms
ionic:utils-process processExit: exiting (exit code: 1) +37ms

```
ionic info

Ionic:

Ionic CLI : 6.7.0 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 8.3.26
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 7.0.0
Cordova Platforms : android 6.4.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)

Utility:

cordova-res (update available: 0.14.0) : 0.12.1
native-run (update available: 1.0.0) : 0.2.8

System:

Android SDK Tools : 26.1.1 (/home/user/Android/Sdk)
NodeJS : v13.13.0 (/usr/bin/node)
npm : 6.14.4
OS : Linux 5.0

I think in cordova-android 7 they changed the output directory. You can see it's different in the output. Is there a reason you're using cordova-android 6?

I'm encountering the same issue, but reverting to @ionic/[email protected] did not solve the problem for me. Everything was working 2 days ago :cry:. Below is my ionic info. Anyone have an up-to-date solution? (I can open a new issue if that's preferred.)

Ionic:

   Ionic CLI                     : 6.9.3
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.901.7
   @angular-devkit/schematics    : 9.1.7
   @angular/cli                  : 9.1.7
   @ionic/angular-toolkit        : 2.2.0

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.1.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 7 other plugins)

Utility:

   cordova-res : 0.14.0
   native-run  : 1.0.0

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v12.14.1
   npm               : 6.13.4
   OS                : Windows 10

Solution is downgrade to v6.4.0 until issue fixed by Ionic team.

npm uninstall -g @ionic/cli
npm install -g @ionic/[email protected]

If you're still seeing this with the latest release, please create a new issue.

Was this page helpful?
0 / 5 - 0 ratings