I tried uploading new changes to an existing ionic 2 app and keep gettin the following message:
c:\Magaza>ionic upload
WARN: No ‘upload:before’ gulp task found!
If your app requires a build step, you may want to ensure it runs before upload.
Uploading app… An error occurred uploading the build: Session expired (401). Please log in and run this command again.
Session expired (401). Please log in and run this command again. (CLI v2.0.0-beta.37)
Your system information:
Cordova CLI: 5.3.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
OS: Windows 8.1
Node Version: v0.12.7
Before now I’ve had no issues uploading. I’ve tried logging in via the browser but no dice. Is there a way to force a login from the CLI or otherwise? I’ve checked online and this situation doesn’t seem to be that common.
I don’t think it was your lack of Zzzzzzzz’s. I’ve been using Ionic for months now and never had this issue. Usually the “ionic upload” would just prompt for the username and password when my session had expired. I did an “ionic --help” and did not see the “ionic login” (maybe I am blind, looked there again and still do not see it). I found the “–email” and “–password” parameters for the “ionic upload” and assumed that would be the answer. It still failed with the 401. So I tried the “ionic login” and life is good now—yep, it is simple when you know the command exists :-). Thanks for your question @semoju and the assist from @SereneSounds.