Amplify-cli: Can't `amplify push` 'cannot read join property of null' error

Created on 26 May 2020  Â·  15Comments  Â·  Source: aws-amplify/amplify-cli

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

Describe the bug
I basically added a couple of cognito hooks and tried to amplify push my changes and I get the following error: "An error occurred when pushing the resources to the cloud
Cannot read property 'join' of null. An error occurred during the push operation: Cannot read property 'join' of null" see this: https://imgur.com/a/qTydLGM

Amplify CLI Version
Amplify version: 4.18.0

Most helpful comment

Turned out I had some old lambda references in the Amplify config files. Something was missed when I removed the lambda I guess. Manually removing the references put me in the clear.

All 15 comments

FYI: this is also happening with latest Amplify CLI: 4.21.0

@damianrr How were you able to resolve the issue?

@kaustavghosh06 I restored my backend (amplify pull --restore) (and added my auth hooks again and it changed the error, now at least it tries to push.
I'm having now: (AWS::AppSync::GraphQLSchema Tue May 26 2020 12:12:59 GMT-0400 (Eastern Daylight Time) The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey;) I was about to do some digging to be sure it wasn't an error on my side, and if not, open a ticket with the appropriate error message.

@damianrr I believe the above issue is due to your API Key being expired. You can find the resolution steps out here to rotate your API Key - https://docs.amplify.aws/cli/graphql-transformer/config-params#createapikey

That was it @kaustavghosh06. Thanks.

I'm also running into this now. Already tried these steps:

deleting node_modules and yarn.lock
npm install (not using yarn now)
amplify push

They worked for the env I was on, but the moment I switched to a different env, it reoccured. Redoing the steps doesn't help.

Happens on push and publish.

Turned out I had some old lambda references in the Amplify config files. Something was missed when I removed the lambda I guess. Manually removing the references put me in the clear.

I'm getting this exact message. After an attempt at merging new work from a feature branch/env ...
back to the the dev branch/env:

# from feature branch/env
amplify env checkout devenv
amplify push
git add .
git commit ...
# other dev working on branch
amplify pull 
# resolve some regressions b/c amplify and git ... 
amplify status
# looks good ... changes to push
amplify push
? Are you sure you want to continue? Yes
✖ An error occurred when pushing the resources to the cloud

Cannot read property 'join' of null
An error occurred during the push operation: Cannot read property 'join' of null

We generally avoid using amplify pull because it seems to result in crashed environments like this and this is, essentially, a dress rehearsal for mergin into the release branch for a beta, so some pressure here on finding a path to manage branches and merges here --- before we could hack around it

... and then he notices this issue is closed ... will open a new one

I got this error and got it fixed using amplify remove function instead of doing a rm -Rf myFunctionFolder

Turned out I had some old lambda references in the Amplify config files. Something was missed when I removed the lambda I guess. Manually removing the references put me in the clear.

yes. For me it was the issue as well. backend-config.json had references to non existing lambdas! Thanks a lot !

backend-config.json had references to non existing lambdas

@ahtokca thank you, got exactly the same issue!

I have referenced a lamda function in my schema but not created it in local environment. After adding missing function pushed and it worked.

Was this page helpful?
0 / 5 - 0 ratings