Chrome Version: 65.0.3325.181 (Official Build) (64-bit)
OS: Linux
What steps will reproduce the problem?
(1) Issue two concurrent calls to chrome.gcm.register, e.g.:
chrome.gcm.register(['123'], id1 => { console.log('id1 =', id1); });
chrome.gcm.register(['123'], id2 => { console.log('id2 =', id2); });
What is the expected result?
Both calls succeed.
What happens instead?
One call succeeds and the other fails with chrome.runtime.lastError.message == 'Asynchronous operation is pending.'.
This isn't an especially hard issue to work around, but it's undocumented, and it breaks encapsulation when an extension needs to register for GCM notifications in two modules that don't otherwise have a need to coordinate with one another. Ideally multiple concurrent calls should just work, but at a minimum I'd like to see the docs updated to reflect the fact that only one call to chrome.gcm.register may be outstanding at a time.