Context Menus not showing suddenly for my extension (Remindoro)

Hi,

I recently ported one of my extensions (Remindoro) to firefox - https://addons.mozilla.org/en-GB/firefox/addon/remindoro/. The context menus suddenly stopped showing. Context menus are showing fine in developer mode using web-ext tool

The source for the extension can be found here - https://github.com/palerdot/remindoro

Any help would be appreciated.

If you use the Console in the Debug window, do you get any error messages related to displaying the context menu?

I mean the Debug window that opens from the about:debugging page when you click Debug or Inspect for your extension. https://developer.mozilla.org/docs/Tools/about:debugging

No … nothing of that sort … If I run my production zip package locally, context menus are appearing … Context menu is not showing only when installed from mozilla addons store … this is super weird as everything works fine locally

I can see a runtime error in both consoles when clicking context menu item:

But it’s a bit strange - it’s the same error written in both consoles at the same time, but in two different files??? Also the code doesn’t correspond to the error - the is no “a”, maybe source-maps were loaded automatically??? Crazy.

I really hope error reporting will improve in future versions of Firefox…

I finally figured out the root cause for this issue. My context menu initialization was done inside onInstalled event which was working fine in Chrome and whatever was done within the onInstalled persisted across browser restarts. But in Firefox, I had to move it outside the onInstalled event.

Though, Firefox way of working looks more accurate, for extensions that was ported from chrome like mine this was a bummer to debug.

If anyone faces similar issues porting chrome extension, check if any extension initialization like context menu bootstrapping inside onInstalled event