Uploading from ionic cli fails silently

I have just started develoing with ionic following a tutorial. Everythings seems actually quite logical - but now I am trying to upload my simple hello world code without any luck.

On the command line I was able to login on my apps.ionic.io account and I was also able to link my local code with the app that I have created in the browser on apps.ionic.io. My app_id was then written to ionic.config.json.

I am also able to build the app and run it in the android simulator.

But when I execute the following command it just does a build but doesn’t seem to upload the generated code:

PS D:\IonicTest\ionic-tabs-app> ionic upload --verbose
[DEBUG] Loading global plugin @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-cordova
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
Running app-scripts build: --log-level debug

[14:37:02]  build dev started ...
[14:37:02]  clean started ...
[14:37:02]  clean finished in 3 ms
[14:37:02]  copy started ...
[14:37:02]  transpile started ...
[14:37:04]  transpile finished in 2.02 s
[14:37:04]  preprocess started ...
[14:37:04]  deeplinks started ...
[14:37:04]  deeplinks finished in 9 ms
[14:37:04]  preprocess finished in 11 ms
[14:37:04]  webpack started ...
[14:37:04]  copy finished in 2.16 s
[14:37:09]  webpack finished in 5.47 s
[14:37:11]  sass started ...
[14:37:12]  sass finished in 791 ms
[14:37:12]  postprocess started ...
[14:37:12]  postprocess finished in 5 ms
[14:37:12]  lint started ...
[14:37:12]  build dev finished in 9.98 s
PS D:\IonicTest\ionic-tabs-app>

When I go to my app on apps.ionic.io I can’t see any hint at all that something has been uploaded. Therefore I guess that my upload command actually failed but wasn’t brave enough to show me any exception.

Can someone please give me at least an idea where I can start investigating?

global packages:

@ionic/cli-plugin-proxy : 1.3.2
@ionic/cli-utils        : 1.5.0
Ionic CLI               : 3.5.0

local packages:

@ionic/app-scripts              : 2.0.2
@ionic/cli-plugin-ionic-angular : 1.3.2
Ionic Framework                 : ionic-angular 3.5.3

System:

Node       : v8.0.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 5.3.0

That is indeed strange, it should look like this:

PS C:\Users\Jan\Documents\gotTest> ionic upload
Running app-scripts build:

[17:24:23]  build dev started ...
[17:24:23]  clean started ...
[17:24:23]  clean finished in 8 ms
[17:24:23]  copy started ...
[17:24:23]  transpile started ...
[17:24:28]  transpile finished in 4.24 s
[17:24:28]  preprocess started ...
[17:24:28]  deeplinks started ...
[17:24:28]  deeplinks finished in 20 ms
[17:24:28]  preprocess finished in 27 ms
[17:24:28]  webpack started ...
[17:24:28]  copy finished in 4.57 s
[17:24:39]  webpack finished in 11.03 s
[17:24:39]  sass started ...
[17:24:41]  sass finished in 2.24 s
[17:24:41]  postprocess started ...
[17:24:41]  postprocess finished in 26 ms
[17:24:41]  lint started ...
[17:24:41]  build dev finished in 17.65 s
√ Requesting snapshot upload - done!
- Uploading snapshot (100.00%) [17:24:46]  lint finished in 5.39 s
√ Uploading snapshot - done!
[OK] Uploaded snapshot 901b2dab-2b24-484a-90f2-81d3dca68526!
PS C:\Users\Jan\Documents\gotTest>

I have never seen it skip the upload part silently.

Have a look around here: https://github.com/ionic-team/ionic-cli/issues

i have the same exact problem.
and this command “ionic package build android” also gives me something similar to this command . just fails silently with no shown error !

ionic info:

@ionic/cli-plugin-cordova       : 1.5.0 (F:\xampp\htdocs\MyIonic\node_modules\@ionic\cli-plugin-cordova)
@ionic/cli-plugin-ionic-angular : 1.4.0 (F:\xampp\htdocs\MyIonic\node_modules\@ionic\cli-plugin-ionic-angular)
@ionic/cli-plugin-proxy         : 1.4.0 (F:\xampp\htdocs\MyIonic\node_modules\@ionic\cli-plugin-proxy)
@ionic/cli-utils                : 1.6.0 (F:\xampp\htdocs\MyIonic\node_modules\@ionic\cli-utils)
ionic (Ionic CLI)               : 3.6.0 (F:\xampp\htdocs\MyIonic\node_modules\ionic)

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.6.0

System:

Android SDK Tools : 26.0.2
Node              : v8.0.0
OS                : Windows 8.1
npm               : 5.0.0

Do you really get the same output as the original poster or just “no output at all”? The latter is a new problem with CLI 3.6 which you can find another thread about…

this my output:


F:\xampp\htdocs\MyIonic>ionic upload

Running app-scripts build:
[10:14:16]  build dev started ...
[10:14:16]  clean started ...
[10:14:16]  clean finished in 4 ms
[10:14:16]  copy started ...
[10:14:16]  transpile started ...
[10:14:18]  transpile finished in 2.57 s
[10:14:18]  preprocess started ...
[10:14:18]  deeplinks started ...
[10:14:18]  deeplinks finished in 26 ms
[10:14:18]  preprocess finished in 28 ms
[10:14:18]  webpack started ...
[10:14:18]  copy finished in 2.73 s
[10:14:27]  webpack finished in 8.27 s
[10:14:27]  sass started ...
[10:14:27]  sass finished in 915 ms
[10:14:27]  postprocess started ...
[10:14:27]  postprocess finished in 4 ms
[10:14:27]  lint started ...
[10:14:27]  build dev finished in 11.82 s

F:\xampp\htdocs\MyIonic>

i have opened an issue on github for it

1 Like

after adding the --no-interactive flag it finally showed error:


F:\xampp\htdocs\MyIonic>ionic upload --nobuild --verbose --no-interacti
ve
[DEBUG] CLI flags: { interactive: false, confirm: false }
[DEBUG] { cwd: 'F:\\xampp\\htdocs\\MyIonic', local: true, binPath:
        'C:\\Users\\Sniper\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ion
ic',
        libPath:
        'F:\\xampp\\htdocs\\MyIonic\\node_modules\\ionic\\dist\\index.js' }
[DEBUG] Loading local plugin @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-cordova
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
_stream_readable.js:545
  switch (state.pipesCount) {
               ^

TypeError: Cannot read property 'pipesCount' of undefined
    at module.exports.Readable.pipe (_stream_readable.js:545:16)
    at module.exports.ZipArchiveOutputStream._smartStream (F:\xampp\htdocs\MyIon
ic\node_modules\compress-commons\lib\archivers\zip\zip-archive-output-stream.js:
184:11)
    at module.exports.ZipArchiveOutputStream._appendStream (F:\xampp\htdocs\MyIo
nic\node_modules\compress-commons\lib\archivers\zip\zip-archive-output-stream.js
:96:20)
    at module.exports.ArchiveOutputStream.entry (F:\xampp\htdocs\MyIonic\node_mo
dules\compress-commons\lib\archivers\archive-output-stream.js:88:10)
    at module.exports.ZipStream.entry (F:\xampp\htdocs\MyIonic\node_modules\zip-
stream\index.js:157:49)
    at Zip.append (F:\xampp\htdocs\MyIonic\node_modules\archiver\lib\plugins\zip
.js:53:15)
    at Archiver._moduleAppend (F:\xampp\htdocs\MyIonic\node_modules\archiver\lib
\core.js:172:16)
    at Archiver._onQueueTask (F:\xampp\htdocs\MyIonic\node_modules\archiver\lib\
core.js:370:8)
    at F:\xampp\htdocs\MyIonic\node_modules\async\dist\async.js:4069:9
    at process (F:\xampp\htdocs\MyIonic\node_modules\async\dist\async.js:2317:17
)

F:\xampp\htdocs\MyIonic>

any ideas ?

ok , after some investigation i found that this is a nodjs v8.0 related error, updating the nodjs version to +8.1 fixed my problem.
in windows , you can update nodejs by installing a new windows installer from the official site.

Or (better) use nvm-windows to manage your node installations: https://github.com/coreybutler/nvm-windows This solve many node-related problems (with permissions etc) on Windows and is quite nice to handle.