question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

updateDocument() method give error "lacks a collection id at index 55"

See original GitHub issue

Minimal Code to Reproduce the Problem

const firestore = FirestoreApp.getFirestore(email, key, projectId);
Logger.log(productsCollPath+'/'+dataToExport['product_id'])
 firestore.updateDocument(
    productsCollPath+'/'+dataToExport['product_id'], dataToExport);    
  

Explain the Problem in Detail

Here’s the log for document path I want to update

image

And this path exists

image

Other Comments

Library Version: 33

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Subroidcommented, Jul 19, 2020

I don’t see the value of productsCollPath in your question, it’s cut off.

Make sure that productsCollPath starts with "FreshFastStoresMain/”.

Now I got it fixed. You are right. Actually I added ‘/’ before “FreshFastStoresMain”. Removing it fixed the issue. Thank you so much.

1reaction
LaughDonorcommented, Jul 19, 2020

I don’t see the value of productsCollPath in your question, it’s cut off.

Make sure that productsCollPath starts with "FreshFastStoresMain/”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Document parent name lacks a collection id at index 53 in ...
I am trying to query a subcollection in Google Firestore. My goal is to get all records with a startDate (stored in Google...
Read more >
SharePoint Online: Enable Document ID Service using ...
Go to site settings >> Document ID settings >> Choose “Reset all Document IDs in this Site Collection to begin with these characters”...
Read more >
REST API Developer Guide
REST API is based on the usage of resources—pieces of data in Salesforce, such as records, collections of records, query results, metadata,.
Read more >
Spring Data MongoDB - Reference Documentation
Indicates whether an entity with the given ID exists. ListCrudRepository offers equivalent methods, but they return List where the CrudRepository methods return ...
Read more >
Lenovo XClarity Essentials OneCLI User Guide
Strategic problem determination tool for data collection, fault detection, and remediation. ... fod.lenovo.com/lkms/angular/app/pages/index.htm#/welcome.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found