Closed ceich closed 6 years ago
This is keeping me from publishing, which is a pain.
Update: I found the -f flag so I am not blocked from publishing the front end.
It was a bug and it's been fixed. please get the latest version 1.0.12
Do you think it'll work if there are a mix of MH-created and imported APIs?
the fix made sure that even if no backend update is needed, frontend publish is still executed. Please give it a try and let us know.
For some reason (perhaps due to having used older versions of the CLI before) it now thinks a backend update is required and still fails. Same error as above.
My most recent comment suggested that the push would still fail if a MH-created (and locally edited) API needed to push, but an imported (and not locally edited) API also existed.
I tried a pull before trying publish (to try to sync up state) but did not sync backend with #current-backend-info. Should I have?
$ diff -b -r awsmobilejs/{#current-backend-info,backend}
Only in awsmobilejs/#current-backend-info: aws-exports.js
Only in awsmobilejs/#current-backend-info: backend-details.json
Only in awsmobilejs/backend: cloud-api
diff -b -r awsmobilejs/#current-backend-info/mobile-hub-project.yml awsmobilejs/backend/mobile-hub-project.yml
9c9
< api-arn: "arn:aws:execute-api:us-east-1:305905853980:w50y4cvwed"
---
> api-arn: 'arn:aws:execute-api:us-east-1:305905853980:w50y4cvwed'
14c14
< "/{proxy+}": !com.amazonaws.mobilehub.v0.Function {}
---
> '/{proxy+}': !com.amazonaws.mobilehub.v0.Function {}
Yes, please execute awsmobile pull
and sync backend with #current-backend-info
Makes no difference. Same diffs as above, and publish still wants to push.
Looking at backend-update.js, I understand why it wants to push (last push failed).
The problem is the push failing, not the decision that a push is needed. Go back to the original error: the tool does not seem to support an imported API.
We will notify our server side team on this issue
Update: I just realized the message above is not a fail but a warning (indeed push returns status 0), but nevertheless something about the imported API causes publish to not proceed to deploy the front end.
Hi @ceich I did reproduced the issue. We are working on a fix and planning to publish it ASAP.
Thanks
This is a bug, and it has been fixed. The fix will be released in the next version. Thanks for providing the information.
The latest update (v 1.0.13) should have resolved this issue.
Thanks, it seems to work for me. Warning is still in place for an expected situation, but the push/publish both run to completion.
I haven't tried with a backend that mixes imported and MH-created APIs.
I set up a MobileHub project a few days ago with an imported Cloud API,
TokenGenerator
. As expected, there is no code for this API pulled down byawsmobile pull
. As not expected,awsmobile push
does not work. I had been using awsmobile-cli@1.0.10, but just upgraded to 1.0.11:removed 12 packages and updated 4 packages in 4.274s
I get the same error: