question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

errors in Firefox

See original GitHub issue

we have a valid page featuring a deep SVG where labels are set using amp-list. Works fine Chrome, but we see these errors in FF (84.0.1)

for: -moz-text-size-adjust -webkit-text-size-adjust

we see: Error in parsing value for ‘-webkit-text-size-adjust’. Declaration dropped. index.html:1:237 Elements matching selector: body NodeList(1) ​ 0: <body class="amp-mode-mouse" style="opacity: 1; visibility: …rmal none running none;" data-new-gr-c-s-check-loaded="8.867.0"> ​ length: 1 ​ <prototype>: NodeListPrototype

and

Unknown property ‘text-size-adjust’. Declaration dropped. index.html:1:312 Elements matching selector: body NodeList(1) ​ 0: <body class="amp-mode-mouse" style="opacity: 1; visibility: …rmal none running none;" data-new-gr-c-s-check-loaded="8.867.0"> ​ length: 1 ​ <prototype>: NodeListPrototype


also:

Unrecognized at-rule or error parsing at-rule ‘@-ms-keyframes’ Unrecognized at-rule or error parsing at-rule ‘@-o-keyframes’.

and

Ruleset ignored due to bad selector. html.i-amphtml-singledoc.i-amphtml-embedded { -ms-touch-action:pan-y; touch-action:pan-y }

any thoughts about what’s happening with the amp runtime and Firefox?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jaygray0919commented, Jan 7, 2021

@kristoferbaxter thank you for the excellent analysis and detail. i see how to fix this. will also bookmark the process as i see similar problems but did not know how to determine root cause. thanks again …

1reaction
kristoferbaxtercommented, Jan 7, 2021

This appears to be a difference in the rendering output from Chromium and Gecko based browsers.

The <template> element is specifying the width and height of the SVG Element, as seen here: Screen Shot 2021-01-07 at 12 18 27 PM

This would be supplied by the inline AMP State, if it contained the values. Screen Shot 2021-01-07 at 12 20 15 PM

But, as you can see, width and height are actually properties of the 0th and 1st items in the items array. So the template when rendered by mustache generates empty attributes for these attributes in the updated DOM.

These empty values are flagged as invalid by Firefox, and the declarations dropped.

Screen Shot 2021-01-07 at 12 21 56 PM

The same is happening in Chromium based browsers.

Screen Shot 2021-01-07 at 12 22 50 PM

However, this is where the difference in rendering output occurs.

Chromium based browsers inherit the height of the SVG from the surrounding amp-list Element. Screen Shot 2021-01-07 at 12 24 08 PM

Whereas, Gecko based browsers do not. Screen Shot 2021-01-07 at 12 25 45 PM

Options for remedying

  • If the value of the height and width is intended to be passed into the <amp-mustache> render, it needs to be specified differently in the <amp-state> object. Screen Shot 2021-01-07 at 12 27 59 PM

  • specify a 100% width and height via CSS. Screen Shot 2021-01-07 at 12 30 30 PM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error messages: what they mean and how to fix
If a website requires a secure connection that cannot be established, Firefox will not connect and will show you an error page. Learn...
Read more >
Websites don't load - troubleshoot and fix error messages
First, let's figure out where the problem is · Open a new tab and check to see if you can load another website...
Read more >
Troubleshooting | Firefox Help - Mozilla Support
How to troubleshoot time related errors on secure websites ... Use the Troubleshooting Information page to help fix Firefox issues.
Read more >
How to troubleshoot security error codes on secure websites
Clicking the Advanced button, you can view the specific error Firefox encountered. This article explains why you might see the error codes ...
Read more >
Troubleshoot and diagnose Firefox problems - Mozilla Support
1. Restart your computer · 2. Clear your cookies and cache · 3. Restart Firefox in Troubleshoot Mode · 4. Reinstall Firefox ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found