It seems like alarm creation (from the WebExtensions API) is a no-op. To isolate the issue, I've created a barebones web extension that creates an alarm and then lists all alarms. Below is a relevant snippet:
console.log("Creating alarm.");
const periodInMinutes = 1;
browser.alarms.create("alarm", { periodInMinutes });
const alarms = await browser.alarms.getAll();
console.log(alarms);
console.log("Done!");
When I inspect the output, alarms
is an empty array. I manually tried out alarm creation with some other args but could not get alarms.getAll()
to return anything but an empty array.
When running the same extension on Firefox, the alarm is created as expected.
For context, I am trying to create an Orion port of a company web extension that lets developers access internal sites. The existing implementation heavily relies on alarms. I recently discovered Orion and absolutely love it, but being stuck using Firefox (no hate, but Orion's better) for eight hours a day is a bummer.
I expected alarms.create
to create an alarm, but it did not. There were no errors, but alarms.getAll()
returned an empty array.
0.99.129-beta, Sonoma 14.7
Sonoma (14)