Skip to content

s3.listObjects() is Suddenly returning Null #1024

@justinpeake

Description

@justinpeake

My s3.listObjects() is suddenly returning a null data object when I run locally. There is no "permission denied" console message from AWS. Similarly, I am no longer able to access my bucket via Cyberduck. When I enter the appropriate access key id, and secret key... it still says "login failed".

This has only been happening for a week. The app was functioning perfectly since Feb. I have not altered the .env (where access keys are stored).

STRANGELY, the same app code is running perfectly on Heroku, no errors, and the s3.listObjects() is returning an array of filenames. As I mentioned... everything was working very well until last week.

Thanks for your help... I'm kind of stumped.

Here is the error:

node_modules/aws-sdk/lib/request.js:30
throw err;
^

TypeError: Cannot read property 'Contents' of null
at Response. (/Volumes/ARTICULATED/figuresApp passporthack/app.js:329:35)
at Request. (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/request.js:354:18)
at Request.callListeners (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/request.js:596:14)
at Request.transition (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/request.js:21:10)
at AcceptorStateMachine.runTo (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/request.js:37:9)
at Request. (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/request.js:598:12)
at Request.callListeners (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at Request.emit (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/request.js:596:14)
at Request.transition (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/request.js:21:10)
at AcceptorStateMachine.runTo (/Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Volumes/ARTICULATED/figuresApp passporthack/node_modules/aws-sdk/lib/state_machine.js:26:10

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions