<amp-autocomplete> Validator sometimes throws error even though it's the same html code and valid amp-autocomplete
What's the issue?
Uncaught (in promise) Resource: failed to build: amp-autocomplete#20: amp-autocomplete should contain exactly one or
How do we reproduce the issue?
- Go to https://cartia.ro/carti/pentru-Tineri_intre_13_si_18_ani
- Look at console, sometimes it works with now errors, but on some refreshes, it throws the error
- the input is always present in
What browsers are affected?
Tested on Chrome Version 87.0.4280.88 (Official Build) (x86_64)
Which AMP version is affected?
Powered by AMP ⚡ HTML – Version 2011252111002 https://cartia.ro/carti/pentru-Tineri_intre_13_si_18_ani
We are transitioning to AMP framework but we do it progressive, so there are still some amp errors, we tried this with no other JS besides AMP and it's still reproducible.
I looked into the amp-autocomplete code and the only thing that may happen is maybe the DOM is not fully initialized yet when amp-autocomplete runs the querySelectorAll() or since the method returns a static (not live) list, it may not be "ready" yet?
I'm not able to repro this issue with Chrome v87 and AMP version 2012232217000 (AMP version in the URL specified in steps to repro above). I also tried interacting with the authors autocomplete component, but still could not repro.
I was able to consistently reproduce the following JS error: main.modern.cartia.js?v=2.2.45:1 TypeError: window.AMP.setState is not a function
Is this something that you are aware of?
I'm not able to repro this issue with Chrome v87 and AMP version 2012232217000 (AMP version in the URL specified in steps to repro above). I also tried interacting with the authors autocomplete component, but still could not repro.
I was able to consistently reproduce the following JS error:
main.modern.cartia.js?v=2.2.45:1 TypeError: window.AMP.setState is not a functionIs this something that you are aware of? -> yes this is expected and will be fixed , unfortunately un-related since I reproduced the bug even with this js file not loaded at all
thank you @dmanek for trying to reproduce, can you also try this page? https://cartia.ro/carti here the first 2.3 autocomplete compoments work, but the last ones don't work,I get the same
Uncaught (in promise) Resource: failed to build: amp-autocomplete#20: amp-autocomplete should contain exactly one <input> or <textarea> descendant amp-autocomplete
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.