{"action":"created","issue":{"url":"https://api.github.com/repos/sharetribe/sharetribe/issues/3347","repository_url":"https://api.github.com/repos/sharetribe/sharetribe","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/3347/labels{/name}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/3347/comments","events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/3347/events","html_url":"https://github.com/sharetribe/sharetribe/issues/3347","id":330325269,"node_id":"MDU6SXNzdWUzMzAzMjUyNjk=","number":3347,"title":"S3 [Error] Failed to load resource/ 400 (Bad Request)","user":{"login":"sainineeraj","id":2074796,"node_id":"MDQ6VXNlcjIwNzQ3OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/2074796?v=4","gravatar_id":"","url":"https://api.github.com/users/sainineeraj","html_url":"https://github.com/sainineeraj","followers_url":"https://api.github.com/users/sainineeraj/followers","following_url":"https://api.github.com/users/sainineeraj/following{/other_user}","gists_url":"https://api.github.com/users/sainineeraj/gists{/gist_id}","starred_url":"https://api.github.com/users/sainineeraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sainineeraj/subscriptions","organizations_url":"https://api.github.com/users/sainineeraj/orgs","repos_url":"https://api.github.com/users/sainineeraj/repos","events_url":"https://api.github.com/users/sainineeraj/events{/privacy}","received_events_url":"https://api.github.com/users/sainineeraj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-07T15:29:59Z","updated_at":"2018-06-07T17:55:37Z","closed_at":null,"author_association":"NONE","body":"_Please add only one problem per Issue. If you are facing multiple problems, add multiple Issues._\r\n\r\n##### Sharetribe Version:\r\n7.3.0\r\n_Share the git commit hash of the version of Sharetribe that you are using. You can find it by running `git rev-parse HEAD` in your Sharetribe directory._\r\n66adb5a71e33286c8880f0c2e662b17ab865f307\r\n##### Environment:\r\n\r\nLinux ip-172-26-1-66 4.4.0-1060-aws #69-Ubuntu SMP Sun May 20 13:42:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux\r\non AWS LIGHTSAIL\r\n\r\n> node -v\r\nv7.8.0\r\n> npm -v\r\n4.2.0\r\n```\r\n\r\n##### Server mode:\r\nProduction\r\n\r\n##### Description:\r\nI have configured S3 bucket following your instructions but I am unable to upload any image\r\nHere is my config.yml\r\n```\r\ncat config/config.yml\r\nproduction:\r\n  always_use_ssl: true\r\n#AWS Credentials\r\n  aws_access_key_id: xxxx\r\n  aws_secret_access_key: xxxx\r\n#S3 Configuration\r\n  s3_region: ap-south-1\r\n  s3_bucket_name: xxxxxx\r\n  s3_upload_bucket_name: xxxxx_upload\r\n```\r\n\r\nI have the CORS enabled \r\n```\r\n<CORSConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\r\n<CORSRule>\r\n    <AllowedOrigin>*</AllowedOrigin>\r\n    <AllowedMethod>GET</AllowedMethod>\r\n    <AllowedMethod>POST</AllowedMethod>\r\n    <MaxAgeSeconds>3000</MaxAgeSeconds>\r\n    <AllowedHeader>*</AllowedHeader>\r\n</CORSRule>\r\n</CORSConfiguration>\r\n```\r\n\r\nBucket policy:\r\n```\r\n{\r\n    \"Version\": \"2012-10-17\",\r\n    \"Id\": \"Policy1528383473120\",\r\n    \"Statement\": [\r\n        {\r\n            \"Sid\": \"Stmt1528383465994\",\r\n            \"Effect\": \"Allow\",\r\n            \"Principal\": {\r\n                \"AWS\": \"iam:arn:xxxxx\"\r\n            },\r\n            \"Action\": \"s3:*\",\r\n            \"Resource\": \"s3:arnxxxxx\"\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\nHere is the request sent from my browser when I try to upload:\r\n```\r\n\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc\r\nContent-Disposition: form-data; name=\"key\"\r\n\r\nuploads/listing-images/2018/6/20180607T1458Z-5e42cbd56daef7f2eaac680adb2253a7/1/50kmph.jpg\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc\r\nContent-Disposition: form-data; name=\"acl\"\r\n\r\npublic-read\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc\r\nContent-Disposition: form-data; name=\"policy\"\r\n\r\neyJleHBpcmF0aW9uIjoiMjAxOC0wNi0wOFQwMDo1ODoyOVoiLCJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJ1cGxvYWRzL2xpc3RpbmctaW1hZ2VzLyJdLFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiaW1hZ2UvIl0sWyJzdGFydHMtd2l0aCIsIiRzdWNjZXNzX2FjdGlvbl9zdGF0dXMiLCIyMDAiXSxbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwwLDEwNDg1NzYwMF0seyJidWNrZXQiOiJjeWNsb3Atc3QtdG1wLWltYWdlcyJ9LHsiYWNsIjoicHVibGljLXJlYWQifV19\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc\r\nContent-Disposition: form-data; name=\"signature\"\r\n\r\nPG+fZ3pFNIGqZF9YrYmckmEQH7A=\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc\r\nContent-Disposition: form-data; name=\"AWSAccessKeyId\"\r\n\r\nAKIAIB3CVBUMBX4RZEEQ\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc\r\nContent-Disposition: form-data; name=\"success_action_status\"\r\n\r\n200\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc\r\nContent-Disposition: form-data; name=\"Content-Type\"\r\n\r\nimage/jpeg\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc\r\nContent-Disposition: form-data; name=\"file\"; filename=\"50kmph.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundaryXqxbauSLZoy9idhc--\r\n\r\n```\r\n\r\nThis is the response I get:\r\n**[Error] Failed to load resource: the server responded with a status of 400 (Bad Request)**\r\n\r\n##### Steps To Reproduce:\r\n\r\n_List the actions that will reproduce the issue._\r\n\r\n_This is the **most important** part of the issue report. If we're not able to reproduce the issue, there's not much we can do about it. Please provide precise steps how to reproduce the issue._\r\n\r\n1. I have installed the open source version on my was instance\r\n1. try to upload image during listing but it fails\r\n1. more details provided above\r\n\r\nExpected result: _What was the expected result after running the steps above?_\r\nthe image should upload properly\r\n\r\nActual result: _What was the actual result after running the steps above?_\r\nError:\r\n[Error] Failed to load resource: the server responded with a status of 400 (Bad Request)\r\n"},"comment":{"url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments/395509757","html_url":"https://github.com/sharetribe/sharetribe/issues/3347#issuecomment-395509757","issue_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/3347","id":395509757,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTUwOTc1Nw==","user":{"login":"sainineeraj","id":2074796,"node_id":"MDQ6VXNlcjIwNzQ3OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/2074796?v=4","gravatar_id":"","url":"https://api.github.com/users/sainineeraj","html_url":"https://github.com/sainineeraj","followers_url":"https://api.github.com/users/sainineeraj/followers","following_url":"https://api.github.com/users/sainineeraj/following{/other_user}","gists_url":"https://api.github.com/users/sainineeraj/gists{/gist_id}","starred_url":"https://api.github.com/users/sainineeraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sainineeraj/subscriptions","organizations_url":"https://api.github.com/users/sainineeraj/orgs","repos_url":"https://api.github.com/users/sainineeraj/repos","events_url":"https://api.github.com/users/sainineeraj/events{/privacy}","received_events_url":"https://api.github.com/users/sainineeraj/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T17:55:37Z","updated_at":"2018-06-07T17:55:37Z","author_association":"NONE","body":"I also tried removing s3 conf completely and tried to upload directly to server file system. thats also failing\r\n\r\nThe image is stuck at \"Processing uploaded image....) with this error in the browser console\r\n\r\nFailed to load resource: the server responded with a status of 404(Not found)\r\n\r\nI have a worker job running on the server, that still doesn't clear the \"processing\" \r\nall images in the browser console show up as \"missing.png\"\r\n"}}
{"actor":{"display_login":"sainineeraj"}}