ampproject / ampproject/amphtml
[amp-mustache] Throwing "Unclosed section" randomly even though section is properly closed
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
I am using `amp-render` in combination with `amp-mustache` tags for conditional rendering inside the `` tag. In some random occasions the `amp-mustache` component is throwing the following error:
`[amp-mustache] Unclosed section "show" at 11387 …`
...even though the **closing tag is there**. I tried it several times with "fresh" AMP installations (web pages) and it behaves in the same way.
### Reproduction Steps
Here's an example to help you reproduce the issue:
```
{{#show}}
The html to be displayed
{{/show}}
Contributor guide
Research direction
Start with the amp-render and amp-mustache component entry points and reproduce the intermittent "Unclosed section" error using the template and boolean show value from the report. Compare successful and failing page reloads, including the external, internal, and inline JSON sources mentioned. Done means valid closed sections render reliably without the false error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100