Skip to main content
Answered

Intercom("showArticle") doesn't show article, possible race condition

  • September 4, 2024
  • 2 replies
  • 84 views

 I’m using `Intercom(“showArticle”, articleId)` to show article content inside the Intercom widget. 

Under certain circumstances, after calling `Intercom(‘showArticle’,  articleId)`, instead of seeing the expected article, I instead get a “broken” version of the home screen. In particular, 

  1. The bottom navigation tabs are missing
  2. The help article links are inactive (clicking them does nothing)

 

My best theory so far is that there’s a race condition in the widget between loading the home screen content and the article content. My evidence to support this theory is

  1. The “broken” home state opens in the article frame (wide container, no navigation tabs)
  2. This state only (or exceedingly often) happens when calling `showArticle` before the messenger has been opened during the session. In that case, I believe `showArticle` is first loading/rendering the homescreen, increasing the likelihood of a race condition. 
  3. I can eliminate the bug by changing my article link onclick to `Intercom('show'); setTimeout(() => {Intercom('showArticle', '{{ id }}')}, 2000);`. This opens the messenger and gives it time to load before showing the article. 
  4. I’m much more likely to see the bug with “Disable cache” checked in chrome dev tools. 
  5. I’ve seen a case where the article content does show, but then clicking the “back” button in the widget closes the widget entirely. The expected behavior seems to be that clicking back from the article detail goes back to the home screen. When I observe “back” closing the widget entirely, it seems like maybe the widget wasn’t able to load the home screen content and add it to the navigation stack properly. 

This appears related to, albeit not identical to, this thread. 

Best answer by mateusz.leszkiewicz

Hi Tom Larsen, It’s Mat from the Support Engineering Team 😀

It looks like a something off is happening on our side. I will open up a conversation for you in Intercom. Our Team will take it from there.

View original
Did this topic help you find an answer to your question?

2 replies

Diana Tripac
Intercom Team
Forum|alt.badge.img+2
  • Senior Community Program Manager @Intercom
  • 151 replies
  • September 5, 2024

Looping in @Nathan Sudds and @mateusz.leszkiewicz in case they can advise on that 🙌


mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi Tom Larsen, It’s Mat from the Support Engineering Team 😀

It looks like a something off is happening on our side. I will open up a conversation for you in Intercom. Our Team will take it from there.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings