I recently ported one of my extensions (Remindoro) to firefox - Remindoro – Get this Extension for 🦊 Firefox (en-GB). The context menus suddenly stopped showing. Context menus are showing fine in developer mode using web-ext tool
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
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