Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-file stream objects are not supported with SigV4 in AWS.S3 #18

Closed
jmelendev opened this issue Mar 3, 2017 · 8 comments
Closed

Non-file stream objects are not supported with SigV4 in AWS.S3 #18

jmelendev opened this issue Mar 3, 2017 · 8 comments

Comments

@jmelendev
Copy link

After turning on Juicebox and connectinf to S3 i am getting the following error when trying to upload new images via the admin panel "unable to upload: Error: Non-file stream objects are not supported with SigV4 in AWS.S3"

@Gottwik
Copy link
Owner

Gottwik commented Mar 7, 2017

Hey @jmelendev thanks for using enduro.

Could you update to the newest enduro.js version (npm i enduro -g) and try to set up s3 by running enduro setup s3.

If this fails, which region are you using? I've had some issues with some of the regions, could you try switching to eu-west-1

@jmelendev
Copy link
Author

jmelendev commented Mar 8, 2017

I followed all those steps but now im running into this error when i do enduro addadmin or enduro.
events.js:141 throw er; // Unhandled 'error' event Error: incorrect header check at Zlib._handle.onerror (zlib.js:363:17)

@Gottwik
Copy link
Owner

Gottwik commented Mar 8, 2017

I suspect the aws bucket does not exist. I improved error logging for this, could you please try again un update enduro?(npm i enduro -g)

@jmelendev
Copy link
Author

Ok so that fixed that issue but i'm still getting this when I try to upload an image via the admin panel. I am using region "eu-west-1"

[17:52:51 | + 60.41] making api call: img_upload [17:52:51 | + 0] Trying to upload a file [17:52:51 | + 0] uploading file: 01.jpg unable to upload: Error: Non-file stream objects are not supported with SigV4 in AWS.S3 at Request.computeSha256 (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/services/s3.js:200:18) at Request.callListeners (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/sequential_executor.js:97:18) at Request.emit (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/request.js:604:14) at Request.transition (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/request.js:21:12) at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/state_machine.js:14:12) at /usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request.<anonymous> (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/request.js:22:9) at Request.<anonymous> (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/request.js:606:12) at Request.callListeners (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/sequential_executor.js:104:18) at callNextListener (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/sequential_executor.js:90:14) at /usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/event_listeners.js:75:9 at finish (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/config.js:228:7) at /usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/config.js:244:9 at Credentials.get (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/credentials.js:126:7) at getAsyncCredentials (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/config.js:238:24) at Config.getCredentials (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/config.js:258:9) at Request.VALIDATE_CREDENTIALS (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/event_listeners.js:70:26) at Request.callListeners (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/sequential_executor.js:97:18) at Request.emit (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/request.js:604:14) at Request.transition (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/request.js:21:12) at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/state_machine.js:14:12) at Request.runTo (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/request.js:369:15) at Request.send (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/request.js:353:10) at makeRequest (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/service.js:169:27) at svc.(anonymous function) [as putObject] (/usr/local/lib/node_modules/enduro/node_modules/aws-sdk/lib/service.js:399:21) at /usr/local/lib/node_modules/enduro/node_modules/s3/lib/index.js:400:15

@Gottwik
Copy link
Owner

Gottwik commented Mar 9, 2017

It seems other people have this issue as well -> andrewrk/node-s3-client#69

I use eu-west-1 on enduro's website and it's always been working flawlessly

I will try to replicate this tomorrow and let you know. You can try to switch regions and see if it helps.

Also, you are sure you are uploading a valid file, right? Could you use the browse for file method?
image I guess if you paste the image, it could be anything based on your os and what you've copied.

@Gottwik
Copy link
Owner

Gottwik commented Mar 9, 2017

Well, I replicated the issue with the frankfurt region and I didn't manage to fix it. I guess frankfurt is somehow "special"(I guess it only accepts v4 signature) and it just doesn't work with the library enduro.js uses to handle s3 transfers.

This process works for me:

  1. create new project: enduro create testings3, cd into the folder
  2. go to aws console, create a new bucket in ireland

image

  1. go back to the terminal and hit enduro setup s3, put your keys, bucket name and region in:
    image

  2. s3 should be set up, just use

enduro upload http://i305.photobucket.com/albums/nn212/cc7643/funny-baby-animals-screensaver.jpg

to test this out:

image

This worked for me even with us-east-1 bucket, but it never worked with eu-central-1.

Could you confirm this works?

@jmelendev
Copy link
Author

Yeah, that's weird but I followed what you did above and it worked out perfectly! Thanks for your time!

@Gottwik
Copy link
Owner

Gottwik commented Mar 9, 2017

Happy to help. Good luck with your project.

@Gottwik Gottwik closed this as completed Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants