Skip to content

is:issue subcollection name's don't support colons ":" #9419

@JonathanAsbury-Dovaxis

Description

@JonathanAsbury-Dovaxis

Operating System

Windows

Environment (if applicable)

NodeJS v20.17.0, ReactJS 18.2.0

Firebase SDK Version

"firebase": "^11.1.0" and "firebase-admin": "^13.0.0"

Firebase SDK Product(s)

Firestore

Project Tooling

Tried several. It seems related to the SDK because it happens under multiple dev techniques (e.g browser, command, script, etc.).

Detailed Problem Description

It's not possible to get documents from a subcollection when the subcollection uses a name with a colon ":".
It is possible to call the subcollection without the semicolon.
This is true on both the modular and admin SDK.

Steps and code to reproduce issue

Create a document with two subcollections. Call the first "SubCollection: First" and "SubCollection Second".
Populate both of them with the same documents, ideally more than one.
Try to query using whatever technique you want. I've tried many. But the prescriptive technique is to a collectionGroup.

First won't return anything but the parent document. Second will return all documents in the SubCollection.

Note: The REST API allows you to query the data so long as you escape the subcollection name using encodeURIComponent which replaces the colon and space with %3A%20.

The SDKs reject the encoding.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions