nordnet / cordova-hot-code-push-cli

[DEPRECATED] - This is a command line utility for Cordova Hot Code Push Plugin.
https://github.com/nordnet/cordova-hot-code-push-cli/issues/79
143 stars 139 forks source link

cordova-hot-code-push not deploying #58

Closed sahil-khanna closed 8 years ago

sahil-khanna commented 8 years ago

I have my code (HTML, CSS and JS) along with chcp.json, chcp.manifest and cordova-hcp.json in the same folder on AWS. When I execute the command cordova-hcp deploy I get the error in the attached image

cytgw

nikDemyankov commented 8 years ago

It feels like it can't reach your server. Did you run cordova-hcp login (https://github.com/nordnet/cordova-hot-code-push-cli#login-command)? Also, check, that YOUR_PROJECT_NAME/cordova-hcp.json file exists, and it has correct content-url, s3bucket and s3region.

seme1 commented 8 years ago

I've initially had the same problem. This is a credential problem with the user trying to connect to S3. Please verify that the user has the right credential and your problem should be resolved.

sahil-khanna commented 8 years ago

I tried re-doing all the steps again, but am getting the same error

1) I've run the commands in the following order 1.1) cordova-hcp init 1.2) cordova-hcp login 1.3) cordova-hcp build 1.4) cordova-hcp deploy 2) cordova-hcp.json file is created within the project folder 3) I'm able to open the content_url (in cordova-hcp.json) in the bowser without any errors (refer to attached image) 4) In cordova-hcp login, i'm using the same credentials to login to S3 console (in browser) 5) The bucket has all required permissions (refer to attached image)

01 02

seme1 commented 8 years ago

I think you need to create a new IAM user and give him explicit permission to access the new S3 bucket. When creating the new IAM user, you will be presented with an access key and secret. You will be using these two with cordova-login (NOT the username/password used when logging in through the browser). There are many guides on the internet for how this can be done.

Also, use policy simulator to verify that the user has the right credentials ( you need GET, PUT and List bucket content. For me, I gave new IAM user all access to the specific S3 bucket I created for updating the app). Best of luck.