Someone please help!

I implemented the Javascript Alarms API into my addon instead of using a setTimeout. Worked perfectly when I tested it and it was doing exactly what I planned, but when I uploaded it to AMO, it stopped working. I’ve tried my code on my test browser and it has also stopped working.

I don’t know why because all I did to move it into the release was remove the applications manifest key and any console.logs that I had in the code. Have been looking over the code and trying to fix it for over an hour and a half and I can’t get it working again.

Can someone please decompress the add from my Google Drive and tell me what I did wrong? It would be much appreciated because it is getting on my nerves.

There are no error messages in any of the debugging tools. Using the debugging, I can see that it successfully makes the alarm with the correct date code, but is just never triggered for some reason, but I can’t figure out why.

I did, and at the next full hour I heard a majestic clock … chiming. So I’d say there is nothing wrong.

all I did to move it into the release was remove the applications manifest key

Why didn’t you set the correct key in the first place?

I only ever include the applications manifest key in the development build so that the ZIP package can install on Nightly. I always take it out when I push it to AMO because it’s not required.

The difference I’m getting since the publish to AMO is that it no longer handles time changes. When I was testing it yesterday, I could load the addon into Nightly, wait a few seconds for the alarm to be created automatically, change my time to something like 9:59 and the alarm would go off at 10:00, but it’s not doing that anymore.

I would assume that’s how the alarm API works because it wants a datecode, not a countdown value? I don’t if that it how it’s supposed to work, but I swear to god, yesterday that’s the way that it was working when I was testing because I certainly didn’t wait for hours and hours to test it.

That’s not really a reason, is it? And there are definitely reasons for keeping it.


I would assume that’s how the alarm API works because it wants a datecode, not a countdown value

I guess semantically that is how it should work. But there is a good chance that it is translated to something similar to setTimeout calls internally. After a time change or a waking up from suspension, those timeouts would need to be updated.I think there is a fair chance that that is actually being done on wake, but I don’t think anybody expects people to (significantly) mess with the computers clock, because that’s generally a quite bad idea (there are many programs that rely on a chronological time flow).