Description:
I'm not able to upload a build to my pro deploy instance.
Steps to Reproduce:
ionic loginionic upload --note="Test Deploy"Output:
ionic upload --note="Test Deploy"
[ERROR] Sorry! The configured backend (pro) does not know about ionic upload.
My ionic info:
cli packages: (/Users/hugo/dev/ourco/mobile/node_modules)
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3 browser 4.1.0 ios 4.4.0 ios_bk 4.4.0
Ionic Framework : ionic-angular 3.4.2-201707210037
System:
Android SDK Tools : 26.0.2
ios-deploy : 1.9.1
Node : v7.10.1
npm : 4.2.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
Same here:
Output:
ionic upload
[ERROR] Sorry! The configured backend (pro) does not know about ionic upload.
My ionic info:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
Cordova Platforms : android 6.2.3
Ionic Framework : ionic1 1.3.3
System:
Node : v6.11.2
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
Hi all,
Same error reported for me:
myApp$ ionic upload
[ERROR] Sorry! The configured backend (pro) does not know about ionic upload.
You can switch backends with ionic config set -g backend.
ionic info gives:
cli packages: (/.../myApp/node_modules)
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
local packages:
@ionic/app-scripts : 2.1.3
Ionic Framework : ionic-angular 3.6.0
System:
Node : v6.11.1
npm : 3.10.10
OS : Linux 4.4
@monkeytronics @HugoHeneault @MBALOTA
I'm also having this issue. Didi you guys solve it?
No, we ended up only using git for now... :(
Same here, try to run the command :
ionic config set -g backend
but I get this error :
nicolas$ ionic config set -g backend
[ERROR] value must not be empty.
what keyword do we need to add in order to use the cloud backend ?
Ok so I found out a solution, type :
ionic config set -g backend legacy
to get back to the cloud backend and be able to use the ionic upload command. If you want to go back to the pro version just type :
ionic config -set backend pro
The problem is the accounts created on the pro backend don't work on the legacy one.
@HugoHeneault
No, we ended up only using git for now... :(
This is my first time using Ionic Pro. I followed docs but I'm still stuck with error.
How were you able to upload your code to the Ionic Pro?
Push from git-hub to Ionic Pro? It'll be really helpful if you could explain the steps to deploy it to ionic cloud?
That is something I didn't like personally. :(
Now doing this force me to either get a paid private repository or make my code public on GitHub.
The Ionic team should have kept the upload service until 31 Jan.
@patwaswapnil The upload service is still up but you need to use the old backed.
You juste have to push to ionic as stated on the pro dashboard:
npm install -g ionic@latest
ionic start --pro-id YOUR_ID
cd test
ionic link --pro-id YOUR_ID
git push ionic master
git remote add origin [YOUR_REPOSITORY_URL]
git push --set-upstream origin master
I think others have summed it up nicely. For Ionic Pro, ionic upload is just git push ionic master.
@patwaswapnil
Now doing this force me to either get a paid private repository or make my code public on GitHub.
The Ionic team should have kept the upload service until 31 Jan.
Nope, having the ionic git remote doesn't force you to do either of those things. Your code is "pushed" to our servers instead of uploaded. Github has nothing to do with git push ionic master.
If you switch the CLI back with the commands @ngware stated, you get ionic upload back, but on Jan 31st it won't work anymore.
@dwieeb The problem is some plugins (as Cocoa) doesn't work on Deploy build environment. So uploading a build from our side would fix the problem.
@HugoHeneault Can you elaborate? This may be a feature request for Ionic Pro.
Sure: we're having issues when pushing a new snapshot using git push ionic branch : cocoapods is required for building or app (for the notifications plugin), but not installed on your build environment on Deploy.
So the build is failing online (working with the npm run build fallback, but not completely (APK images won't have the push plugin :()
I can create a separate issue if you want. Here or on the deploy plugin?
_Deploy_ can't update the APK/IPA on devices. It can only update non-binary files such as web assets. _Package_ is probably what you're referring to, which would require an app store update.
Package does not yet support cocoapods, but it's a highly requested feature and I'm sure it'll be in soon.
You may get a more official response from our support page (I don't work on Pro full-time, just the CLI): https://ionic.zendesk.com/hc/en-us/requests/new?ticket_form_id=632048
I already tried the support, which is quite slow. :(
I know, but Deploy is using cordova prepare, which is trying to use cocoapods.
So if you're build is using cocoapods, you can't create any prod builds on Deploy. :(
I created an issue one https://github.com/ionic-team/ionic-plugin-deploy/issues/138 but the repo does't seem updated for a while... :(
@dwieeb, My bad, I had confused this with PhoneGap build flow, Thank you so much for clarifying it.
@patwaswapnil No worries!
@HugoHeneault Deploy shouldn't use cordova prepare when you do git push ionic master. I see it running npm run build. What does it do for you?
@dwieeb Well it seems it is doing it while running app-script build --prod
Dunno why, we don't need it :(
Running with gitlab-ci-multi-runner 9.1.0
on IonicJS Runner 2
Using Shell executor...
Running on ip-
Cloning repository...
Cloning into '/home/gitlab-runner/'...
Checking out #### as develop...
Skipping Git submodules setup
$ fetch-updates
Checking for build process updates...
$ build-app
Fetching build dependencies...
Running: npm install
### truncated log here
npm install succeeded
Detected local install of ionic cli...
Running: ionic build --prod
[ANNOUNCE] Hi! Welcome to CLI 3.9.
We decided to merge core plugins back into the main ionic CLI package. The @ionic/cli-plugin-ionic-angular, @ionic/cli-plugin-ionic1, @ionic/cli-plugin-cordova, and @ionic/cli-plugin-gulp plugins have all been deprecated and won't be loaded by the CLI anymore. We listened to devs and determined they added unnecessary complexity. You can uninstall them from your project(s).
No functionality was removed and all commands will continue working normally. You may wish to review the CHANGELOG: https://github.com/ionic-team/ionic-cli/blob/master/CHANGELOG.md#changelog
Thanks,
The Ionic Team
[INFO] Running app-scripts build: --prod
[10:53:45] build prod started ...
[10:53:45] clean started ...
[10:53:45] clean finished in 1 ms
[10:53:45] copy started ...
[10:53:45] ngc started ...
[10:54:02] ngc finished in 16.51 s
[10:54:02] preprocess started ...
[10:54:02] deeplinks started ...
[10:54:04] deeplinks finished in 2.00 s
[10:54:04] optimization started ...
[10:54:04] copy finished in 18.87 s
[10:54:26] optimization finished in 21.92 s
[10:54:26] preprocess finished in 23.93 s
[10:54:26] webpack started ...
[10:56:26] webpack finished in 120.34 s
[10:56:26] sass started ...
[10:56:26] uglifyjs started ...
[10:56:32] sass finished in 6.58 s
[10:56:32] cleancss started ...
[10:56:37] cleancss finished in 4.98 s
[10:57:54] uglifyjs finished in 87.86 s
[10:57:54] postprocess started ...
[10:57:54] postprocess finished in 95 ms
[10:57:54] lint started ...
[10:57:54] build prod finished in 248.94 s
> ionic cordova prepare
> cordova prepare
[10:58:10] lint finished in 16.13 s
I cannot use legacy backend and upload my application since my account is made on pro backend, does that make sense?
Is there any workaround?
Yeah you have to use git, as I wrote there :)
ionic link --pro-id YOUR_ID
git push ionic master
@dwieeb Any updates about https://github.com/ionic-team/ionic-plugin-deploy/issues/138 ?
@HugoHeneault Running this command from app root directory I get:
fatal: 'ionic' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
@aleksvidak Have you done all that I wrote on https://github.com/ionic-team/ionic-cli/issues/2689#issuecomment-325339221 ?
@HugoHeneault yes, I followed those couple of steps, but it crashes at git push ionic master :(
Your message seems to say that you're not in a git repository... Maybe the linking was wrong, I don't know. But git push ionic master is the way of doing ionic upload in the pro backend version. 馃檪
@HugoHeneault I wonder if it has to do with ssh keys.
I am not the owner of the repository I am using in this case.
@aleksvidak
Here's what worked for us :
ionic link --pro-id abc45678
(Y) --> Choose YES to regenerate SSH keys
git remote add ionic [email protected]:ORGANIZATION-NAME/app-name.git
git add .
git commit -m "initial commit"
git push ionic master
@Kapsul-Brice
Thanks, it worked!
I am getting error "Permission denied (publickey)." when git push ionic master. How can I generate the SSH keys (not the OpenSSH) but like using an existing public key?
ionic ssh add with a file path
See ionic ssh --help
How can I configure the backend type on a per project basis? Our CI has no "global" config, even with backend: legacy in the project ionic.config.json it does not pickup this config setting.
@timbru31 If we do that, then devs would need to log in to each app independently. The backends do not share authentication. I'm fine with this being a configurable option, but it would be a feature request.
If you have a mix of Cloud and Pro apps, you could use different global config files for each backend with the IONIC_CONFIG_DIRECTORY environment variable: https://github.com/ionic-team/ionic-cli#environment-variables
I apologize for how convoluted this is. The CLI has a unique problem of handling both these backends. It does not have the luxury of having two distinct websites (https://apps.ionic.io and https://dashboard.ionicjs.com).
$ sudo git push ionic master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
@ciotrade Please open a new issue and fill out the issue template.
having this error after trying to push my work to ionic dashboard : failed to push some refs to '[email protected]:femith/myapp.git'
@femithz Please open a new issue and fill out the issue template.
Hey guys I found the way. The problem was ionic upload is for legacy account. use git push ionic <branch> for ionic pro
Most helpful comment
Ok so I found out a solution, type :
to get back to the cloud backend and be able to use the ionic upload command. If you want to go back to the pro version just type :