Mobile navigation bar dropdown throws console error on close

AI-generated summary

A very low-priority bug causes an uncaught Ember error in the console when closing the mobile navigation bar dropdown — either by clicking a link or outside the menu. The error reads: ‘Assertion Failed: You attempted to remove a function listener which did not exist on the instance…’ — but has no visible impact on user experience or site functionality. Reproduced in Firefox and Chrome responsive/mobile views, including in safe mode and the Theme Creator site. While harmless to end users, it may alarm developers using the addNavigationBarItem pluginAPI, as it can falsely suggest a broken implementation. Alteras notes this occurred during local dev and was initially alarming despite being benign.

Priority/Severity:
Very low - No discernible impact on UX. However, will give anyone working with the addNavigationBarItem pluginAPI a scare.

Platform:
Reproduced in Firefox & Chrome in responsive mode, Mobile site view.
Effect visible in sites with debug logging and in safe mode.

Description:
When the user in mobile site view closes the navigation bar dropdown menu (either by click on a link or by clicking outside dropdown), Ember will throw an uncaught error in the console. There is no discernible impact on the actual functionality of the site.

Uncaught (in promise) Error: Assertion Failed: You attempted to remove a function listener which did not exist on the instance, which means you may have attempted to remove it before it was added.

The issue has been observed in a local dev env, in the Theme Creator site, both in safe mode.

Reproducible steps:

  1. Go to any page with a navigation bar/dropdown (latest, top, etc.) in the mobile site
  2. open the dropdown
  3. close the dropdown (either by clicking outside the dropdown or by clicking on one of the links)


This is a very low priority bug with no impact to normal users. It did however give me a scare as I was working on adding a nav item via addNavigationBarItem pluginAPI and thought I had broken the world when it occurred.

2 Likes