TLDR: Chrome 150 will throw an error if an extension calls `chrome.alarms.create()` with alarm names longer than 1024 bytes.
Dear extension developers,Chrome will soon limit the length of alarm names passed into `chrome.alarms.create()`. Chrome 148 and 149 log a warning every time your extension creates an affected alarm.
Starting with Chrome 150, the warning will turn into an error: calls to `chrome.alarms.create()` with alarm names longer than 1024 bytes will throw an exception with the same message.
The `chrome.alarms` API was never designed to handle long name strings and performance can quickly degrade for all extensions if one extension misuses the API. Prior to Chrome 150, the `chrome.alarms` API assumed that extensions will behave themselves and never pass long alarm names. Chrome 150 closes this accidental oversight and introduces a generous limit expected to affect only a small number of users.
The new alarm name limit is computed in bytes. 1024 standard ASCII characters is exactly 1024 bytes long, but accented or Unicode (e.g., Emoji) characters typically consume multiple bytes.
If you use Chrome 148 or Chrome 149 and see these warnings, please update your code to use shorter alarms. If your extension intentionally stored data in alarm names, please migrate data to a dedicated extension storage in `chrome.storage`.Expected impactAlarm name length limit is expected to affect only a tiny number of extension users. According to our telemetry, only 0.003% of extension installations attempt to register affected long alarm names. This limit is expected to improve extension responsiveness and browser memory usage because the total amount of alarm data Chrome stores will have a fixed limit. Chrome introduces this limit in coordination with other browser vendors (you can see the discussion here and here). Previously Chrome 117 introduced a limit of 500 alarms per extension and that change did not cause any widespread breakage.
Thanks,
Oliver on behalf of Chrome Extensions DevRel