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.

Lighthouse Card not hidden when annotation removed from catalog entity

See original GitHub issue

Expected Behavior

When removing a Lighthouse annotation from a catalog entity, that entity is no longer registered with lighthouse.

Current Behavior

My component had a test annotation of:

annotations:
  lighthouse.com/website-url: https://spotify.com

Note I did not actually run spotify.com through my Lighthouse instance, so it’s NOT in the Lighthouse database. I ended up removing that annotation from catalog-info.yaml. I waited for the refresh, but also forcibly re-registered the component. But now every time I visit the overview page, the Lighthouse card displays (which it now should not) and it also errors out with:

image

Because I never actually ran an audit for that site. But I believe the error msg is just an effect of the root cause being my component still thinks it has a Lighthouse annotation (when it doesn’t).

Possible Solution

Steps to Reproduce

  1. Install Lighthouse plugin
  2. Add a Lighthouse annotation to a component pointing to any fake web site (no need to actually run an audit against it!)
  3. Remove the Lighthouse annotation
  4. See that Lighthouse card is still visible on the entity

I have a feeling the edge case here is an audit website (annotation value) that never exists, maybe somehow doesn’t let it get unregistered full??

Context

I just added this annotation as a test, but seems now I can’t remove it. I wondered if maybe I needed a hook to remove it from the plugin, however in this instance it must be the entity itself which believes the annotation still exists in the catalog, otherwise the card would never even TRY to loop. So I wonder if all annotations are somehow not cleaned up or orphaned in some way?

I’ve tried with other ones which DID exist with an audit, and they DO seem to remove. I’m still working out edge cases, but opening in case others saw similar or know any related issues.

Your Environment

  • NodeJS Version (v12): 12
  • Operating System and Version (e.g. Ubuntu 14.04): Windows 10 1909 WSL2 Ubuntu 18.04
  • Browser Information: Microsoft Edge

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
adamdmharveycommented, Jan 19, 2021

Fix works like a charm, @freben thanks! Adding annotation, refresh picked it up. Removing annotation, refresh hid the card. Thanks for quick fix!! 🎉

1reaction
frebencommented, Jan 18, 2021

PR is up

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog - Roadie.io
A list of all new and updated features so you can get a quick overview of what has changed in the product.
Read more >
Changelog - Default Theme - Hyvä Docs
This version of the reset theme changes the main container CSS class if the product-full-width page layout is selected, and styling in the...
Read more >
Text - GovInfo
For payment by credit card, call toll-free, 866-512-1800, or DC area, 202-512-1800, ... If patient records are not copied or removed, patient identifying ......
Read more >
Adobe Commerce 2.4.3 release notes
Previously, the application did not remove the gift card from the order when the shopper selected the card and then clicked Remove. The ......
Read more >
Introducing Rich Cards | Google Search Central Blog
What about the Structured Data report in Search Console? The Structured Data report will continue to show only top-level entities for the existing...
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