I\'m getting the rather simple error:
Document references must have an even number of segments.
I\'m aware of what it is telling me and ho
Because neither the above nor other similar posts helped me..
I got this error when calling set data and then immediately after .getDocument(...) (i.e. reading data). When I called my read data method in the completion handler of the setData method then the error message disappeared.
Your userId
variable probably has a slash in it. Document ids can't have slashes, since they are interepreted as dividers between collections and documents when forming the "path" to a document.
It's also possible that the string may be empty, which is invalid.