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

Lambda@Edge function returns 502 error #64

Open
MartinEmrich opened this issue Mar 20, 2023 · 1 comment
Open

Lambda@Edge function returns 502 error #64

MartinEmrich opened this issue Mar 20, 2023 · 1 comment

Comments

@MartinEmrich
Copy link

Describe the bug
Upon filling the sample app form and submitting it, I get a generic cloudfront 502 error page.

Please see also: aws-ia/cloudformation-aws-marketplace-saas#54

To Reproduce
Steps to reproduce the behavior:

  1. Install the sample app as described
  2. try to buy the marketplace product

Expected behavior
The provided sample app should complete the way it should....

Apparently, the form sends the data as multipart/form-data, but the Lambda@edge function expects application/x-www-form-urlencoded.

@MartinEmrich
Copy link
Author

MartinEmrich commented Mar 20, 2023

I might have found the cause:

If the client uses one of the most popular content blockers (Adblock whatever, uBlock Origin, etc.) sourcing https://easylist.to/ ff., there ist a rule ||cloudfront.net/script.js therein, Which blocks the sample javascript.

If the javascript cannot be loaded, indeed the above behaviour happens.

After renaming the script.js to marketplace-script.js and modifying index.html accordingly, the error message no longer appears.

Yet then I only get this message in the browser console (which I would never see as a normal non-developer):

"\"Success! Registration completed. You have purchased an enterprise product that requires some additional setup. A representative from our team will be contacting you within two business days with your account credentials. Please contact Support through our website if you have any questions.\""

the page itself looks like nothing happened...
Update: The page also displays a notification, which was just hidden due to the small viewport, more an UX issue...

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

1 participant