"Create index" link not provided (firebase 8.7.1)
Describe your environment
- Operating System version: MacOS 11.4 (20F71)
- Browser version: Node v14.16.0
- Firebase SDK version:
firebase8.7.1 - Firebase Product: Firestore
Describe the problem
I wrote a query that requires an index. It errors with this message (which doesn't contain a link to create the index):
- Expected: link to create index
- Actual: no link

Steps to reproduce:
- Write a query with where/orderBy on multiple fields
Relevant Code:
const query = db.collection('iterations')
.where('courseCode', '==', code)
.orderBy('iterationCode', 'desc')
.limit(1)
.get()
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
It seems that only the Client SDKs are returning an error "FirebaseError: No matching index found" instead of index creation links. The Admin SDK still throws an error with the link. You can try running your query in Firebase Functions emulator and get the link from there. I've posted a similar answer on Stackoverflow.
export const getIndexLink = functions.https.onRequest(async (request, response) => {
try {
const snap = const query = db.collection('iterations')
.where('courseCode', '==', code)
.orderBy('iterationCode', 'desc')
.limit(1)
.get()
console.log(snap.size)
response.send( snap.size, "documents matched");
} catch (error) {
console.log(error)
response.send(error.message)
// Error with index creation link
}
});
You can try calling this function in a browser and get the index creation link.
Hi @charles-allen, thanks for the report. I was able to replicate the issue. Let me bring this matter to the attention of our engineers here and update this thread if I have any information to share.
I guess the even older versions of firebase library aren't providing url

We're also seeing similar reports on other platforms. It seems to be a backend issue and currently being tracked internally. For reference, see b/193768583.
We are encountering this too for all required indexes not built. "firebase": "^8.7.1", "firebase-admin": "^9.11.0", "firebase-tools": "^9.16.0",
any updates?
Got the same error, any updates ?
Looks like we're going to stick with this problem and create the indexes manually :(
Any updates? It breaks my app completely.
Any updates? It breaks my app completely.
Unless your app is automatically creating missing indexes (which sounds like a questionable design decision), this is not breaking your app.
Just create the index manually in Firebase Console. It's slightly less convenient, but I wouldn't consider this bug to be blocking.
I'm having the same issue and for some reason I can't even create an index manually from the console.
Looks like we're going to stick with this problem and create the indexes manually :(
I mean you can still create those click to create index links from Admin SDK in emulator @jailsondamasceno 👀
Hi ,
Any update on this.
FYI If manually create on console it also not working as intended.
for some reason I can't even create an index manually from the console.
FYI If manually create on console it also not working as intended.
This is not what I'm seeing. I made an index manually using the console and my code now runs fine.
If you're having problems with the console you should open an issue with details, screenshots, etc.
Also having troubles with this. I can create an index via the console but it still does not recognise it once it is built, giving me the same error.
@dionkas Here, likewise
Same problem...
Same issue and its really costing me a lot of time .... Please fix
@r-ndom-developer @Lazy-Developer-here @dionkas @jailsondamasceno - I have only reported the lack of link in the error message. You are not reporting the same as what I'm seeing and reported. If you have an additional issue you must provide:
- query you're executing
- index you made (screenshot)
- error message
In my case, I was able to make an index & run my code. I am not blocked at all. Additionally this was for a class. My students were also able to make the index successfully (though many of them first made typos in the collection name, field names, or direction). In all cases we corrected the index and the code ran successfully.
Please share the details of your failing index