Reputation: 21
I am getting the following console error:
Uncaught (in promise) DOMException: The requested version (1) is less than the existing version (3).
Looking through the all IndexedDB options for my domain in Chrome developer tools > 'Application' (tab) > 'Storage' selection (in sidebar) > 'IndexedDB' (dropdown):
The only selection that I see with a version 3 is the fcm_token_details_db
option.
Has something changed? Is this a bug? It seems to me that there's no way for me to explicitly declare the version for this, that it's declared in the FCM messaging library.
Upvotes: 1
Views: 337
Reputation: 21
The issue was from running 2 different versions of the FCM scripts in different places. In one file we had:
importScripts('https://www.gstatic.com/firebasejs/4.6.2/firebase-app.js')
importScripts('https://www.gstatic.com/firebasejs/4.6.2/firebase-messaging.js')
and in another area we had:
importScripts('https://www.gstatic.com/firebasejs/5.4.1/firebase-app.js')
importScripts('https://www.gstatic.com/firebasejs/5.4.1/firebase-messaging.js')
Somewhere between the above mentioned script versions, Firebase made updates to the Indexedb version number.
There doesn't seem to be mention of this in the release docs.
https://firebase.google.com/support/release-notes/js
Upvotes: 1