ampproject / ampproject/amp-toolbox
@ampproject/toolbox-cors error on submitting amp-form from amp-email
- Dominant language
- HTML
- Stars
- 459
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
Following all of the setup instructions in the readme, @ampproject/toolbox-cors allows my amp-lists to retrieve dynamic content but when submitting an amp-form, the following error is displayed:
```
Uncaught (in promise) Error: Class$obf_1009: [https://dynamicmail-pa.googleapis.com/v2/xhrs:proxy?alt=protojson] Cg: Unsupported HTTP status: 400: Class$obf_1011: [object Object]
log.js:258 [amp-form] Form submission failed: Error: Request viewerRenderTemplate failed: Error: Class$obf_1009: [https://dynamicmail-pa.googleapis.com/v2/xhrs:proxy?alt=protojson] Cg: Unsupported HTTP status: 400: Class$obf_1011: [object Object]
```
I can see from my logs that the request is never reaching my server.
Here is a minimal version of my server setup for reference https://github.com/davecook88/firebase-minimal
Contributor guide
Research direction
Start with the @ampproject/toolbox-cors README setup and compare the amp-form request with the amp-list request described in the report. Reproduce the 400 from dynamicmail-pa.googleapis.com/v2/xhrs:proxy using the linked firebase-minimal server; done means form submission reaches the server without the reported proxy error.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100