sfn-callback-urls icon indicating copy to clipboard operation
sfn-callback-urls copied to clipboard

Response rejected, Invalid Payload

Open wlnt360 opened this issue 4 years ago • 2 comments

I am trying to use this application to test one of the solution and when I was testing this using the steps on this article hosted at jtekdata.

After the final step, when I tried to execute the Step function, I got the following error after clicking on either of Approve or Reject URL.

Approve URL click response

Response rejected!
Details:
{
  "error": "InvalidPayload",
  "message": "Base64 error (Incorrect padding)"
}

Reject URL click response

Response rejected!
Details:
{
  "error": "InvalidPayload",
  "message": "Decryption error (SerializationError:No signature found in message)"
}

I followed all the steps in exact order as mentioned in the article. I was trying to understand how to resolve this issue. Any help would be appreciated.

Debugging options tried

  • I tried to get the URL generated in the CloudWatch logs (Got urls:{} section) and apparently that URL works like a charm. So seems like there is an issue when that URLs are sent out via SNS topic.

TIA!

wlnt360 avatar Dec 20 '20 03:12 wlnt360

First, I would make sure you're using the original article, which was on the AWS blog, just to make sure there wasn't an error when it was reposted (without permission) to that site. https://aws.amazon.com/blogs/aws/using-callback-urls-for-approval-emails-with-aws-step-functions/

Second, if the URL as logged in CloudWatch and the URL you've attempted to use from the email are different, can you compare the two and let me know what the difference appears to be?

benkehoe avatar Jan 03 '21 23:01 benkehoe

I have come across a very similar error. I am not sure though if it is due to the changes made mentioned here https://github.com/benkehoe/sfn-callback-urls/issues/8

The URL's that are sent are over 2048 characters when using KMS encryption. Using Outlook, if I right-click on the link and select 'Copy Hyperlink', the link is truncated to 2048 characters in the clipboard. Same if I click the link, it will only pass 2048 characters to the browser (FF in my case). If I copy the link instead by selecting the text in the email, then paste in the browser, it works. I am then seeing a DecryptKeyError which is more than likely my fault but no longer see the Base64 error.

sc-alscient avatar Jan 14 '21 17:01 sc-alscient