Closed dan1elhughes closed 6 years ago
> node --version; npm --version; awsmobile --version
v10.5.0
6.1.0
1.1.4
it means, you don't have catch!
var promise = dynamodb.get(getItemParams).promise();
promise.then(function(data) {
})
.catch(function(err) {
console.log('ERROR: ' + JSON.stringify(err));
});
Don't forget to catch.
This one: TypeError: Cannot read property 'lastPushSuccessful'
somone else will have to give you the answer to that one. This variable doesn't appear in any of my project files.
try deleting the #current-backend-info folder and do a 'awsmobile pull' again.
@jbarwick Yup, I'm familiar with .then
/.catch
, but it's in the CLI so there's nowhere to add the catch unless I go digging around in the source.. Which may take me some time to wrap my head around. 😄
OK I've made some progress, I've found that deleting the /awsmobilejs/backend/appsync
directory allows me to successfully awsmobile pull
.
However that's not much use as I assume if I run a awsmobile publish
now, it'll delete all my appsync work. I can see from version control that before awsmobile pull
I have around 350 lines in awsmobilejs/backend/appsync/schema.graphql
, but after the pull I have 65 lines which appear to be a default schema set. It also deletes all my resolver mappings.
The contents inside the folder awsmobilejs/.awsmobile/info
is probably manually modified, that's why the cli is complaining because it sees the appsync
folder inside awsmobilejs/backend
, but it can not find any information about the appsync feature, which is stored in the file awsmobilejs/.awsmobile/info/appsync-info.json
If you could, please tell us the steps that lead to this error, like how appsync is added to the project, what's been edited, and push/pull operations you have done prio to this error. etc. It'd greatly help us to understand issue and investigate further.
Has there been an update on AWS side on how the CLI communicates? I'm now seeing a flag "lastPushSuccessful": false
in awsmobilejs/.awsmobile/info/appsync-info.json
, and I'm able to deploy successfully. I don't think I changed anything, other than doing yet another git reset and awsmobile pull. The immediate problem is resolved, but I don't actually know how I resolved it - what does that flag indicate? What adds it to the project, and how come it wasn't being added before?
I'm also getting the following keys deleted from my aws-exports.js
when I pull, but I don't think that's new (shall I open a new issue for this?) :
aws_appsync_graphqlEndpoint: '...',
aws_appsync_region: '...',
aws_appsync_authenticationType: '...',
The appsync feature is not in the aws mobile hub services, it's an experimental add-on in the awsmobile cli, it's not a complete feature. If you do not use appsync, you should remove everything related to it by executing 'awsmobile features` and de-select the appsync feature.
close this issue for now, feel free to re-open it or open another one if you see other problems.
I'm not entirely sure what this error means or how to go about resolving it, I get the same error when I try to push or deploy