{"action":"closed","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-js/issues/745","labels_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/745/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/745/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/745/events","html_url":"https://github.com/aws/aws-sdk-js/issues/745","id":110243899,"number":745,"title":"SQS sendmessage returns InvalidChecksum with apparently valid message","user":{"login":"ReinsBrain","id":1740167,"avatar_url":"https://avatars.githubusercontent.com/u/1740167?v=3","gravatar_id":"","url":"https://api.github.com/users/ReinsBrain","html_url":"https://github.com/ReinsBrain","followers_url":"https://api.github.com/users/ReinsBrain/followers","following_url":"https://api.github.com/users/ReinsBrain/following{/other_user}","gists_url":"https://api.github.com/users/ReinsBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/ReinsBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReinsBrain/subscriptions","organizations_url":"https://api.github.com/users/ReinsBrain/orgs","repos_url":"https://api.github.com/users/ReinsBrain/repos","events_url":"https://api.github.com/users/ReinsBrain/events{/privacy}","received_events_url":"https://api.github.com/users/ReinsBrain/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-js/labels/Closing%20Soon%20-%20Feedback%20Requested","name":"Closing Soon - Feedback Requested","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-07T14:56:44Z","updated_at":"2015-11-19T00:36:54Z","closed_at":"2015-11-19T00:36:54Z","body":"I should mention that my code was working well with SQS before and only recently returns this error object:\r\n\r\n```json\r\n{\r\n    \"message\": \"sendMessage returned an invalid MD5 response. Got \\\"undefined\\\", expecting \\\"4c7178998961f02210ca0a798f19f004\\\".\",\r\n    \"retryable\": true,\r\n    \"code\": \"InvalidChecksum\",\r\n    \"messageIds\": [\r\n        null\r\n    ],\r\n    \"time\": \"2015-10-07T13:53:38.299Z\",\r\n    \"statusCode\": 200\r\n}\r\n```\r\n\r\nI reduced my code for testing and I am quite convinced that i am not sending in any invalid characters (UTF-8) per http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html.\r\n Here is a reduction of my code (that was formerly working fine):\r\n\r\n```js\r\nvar credentials = {\r\n\taccessKeyId: \"***\",\r\n\tregion: \"us-west-2\",\r\n\tsecretAccessKey: \"***\"\r\n};\r\nvar message =  {\r\n\temail: {\r\n\t\tto:[\"x@x.com\"],\r\n\t\tlocals: {},\r\n\t\ttemplate: {\r\n\t\t\thtml:true,\r\n\t\t\tBody:\"<<SUBJ>>test<</SUBJ>><<TEXT>>test<</TEXT>><<STYL>><</STYL>><<HTML>>test<</HTML>>\"\r\n\t\t}\r\n\t}\r\n};\r\nmessage = JSON.stringify( message );\r\nvar queue = \"https://sqs.us-west-2.amazonaws.com/***/notifications_email\"\r\nvar params = {\r\n  MessageBody: message,\r\n  QueueUrl: queue,\r\n  DelaySeconds: 0\r\n};\r\nAWS.config.update(credentials);\r\nvar sqs = new AWS.SQS();\r\nsqs.sendMessage ( params, function ( error, data ) {\r\n\tnext( error, data );\r\n});\r\n```\r\nNote, I have hidden my accessKeyId, secretAccessKey and queue id (I'm not sending in asterisks).\r\n\r\nThe error message is not enough to go on - I've searched up and down and can find nothing (related to my problem) about it. Need help please :)\r\n\r\nupdate: i just noticed that while sendMessage returns an error, it is still getting into the Queue (which is probably why the statusCode = 200). More unusual, in some instances I have the same message repeating 3 more times (my worker consumes the messages and sends out email via SES).\r\n\r\nalso, i found this seemingly related issue with the go sdk although it's resolution seems unclear:\r\nhttps://github.com/aws/aws-sdk-go/issues/339\r\n\r\njust thought of another tidbit of information: i am running this locally on my node server while in development which was accessed at the localhost loopback address (127.0.0.1). I changed my vagrant configuration (recently although I couldn't tell if that change coincides with the error) such that the host now is accessed at an internal class c address ( 192.168.x.x )...\r\n\r\nperhaps there is some checking of the request host during creation of the checksum and, not finding a vpn or host at that address on AWS, it fails. If so, I couldn't know that because the documentation doesn't go to those lengths. I suppose I could do another test (change back to localhost) but I'm weary now with this and it could be any number of issues anyway - I'd prefer if an expert could chime in at this point.\r\n"}}