URGENT (bug?): Including the update_url in manifest breaks addon

I have an addon that works fine if I load it via about:debugging#addons

Now, in the process of trying to figure out how to self host (I’m not allowed to have it listed, it’s too ‘specialised’), I came across a page that said I need to include this in the manifest:

“applications”: {
“gecko”: {
“update_url”: “https://troysecure.com/dlbcaddy/dlbcaddy.updates.json
}
},

That’s ok, it does kind of work. If I install the plugin from local then force updates, it does update.

The problem is, my background code breaks, specifically this block, which works fine without the above addition to the manifest:

chrome.contextMenus.create({
id: ‘sync_ids’,
title: ‘Sync Referral IDs’,
contexts: [‘all’]
});

Because chrome is now undefined (seen in console)

I waited 10+ days to get my addon signed, now I can’t get the addon self hosted and working.

I know this is also you, but for anyone looking for a solution, this is filed as a bug report.