We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

How to connect to Cloud Firestore

Answered
James Jane asked on April 2, 2021

I've been trying to connect google Cloud Firestore data but I keep getting this error:
It seems that this file doesn't exist or 'Access-Control-Allow-Origin' header is absent in the requested resource.

Read more info about this error
Details: { "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \"449266301\": Cannot bind query parameter. Field '449266301' could not be found in request message.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "description": "Invalid JSON payload received. Unknown name \"449266301\": Cannot bind query parameter. Field '449266301' could not be found in request message."
I enabled CORS on the browser but to no avail.
Thanks for your time

3 answers

Public
Milena Pechura Milena Pechura Flexmonster April 2, 2021

Hello!
 
Thank you for posting to our forum.
 
Our team has investigated the provided info and came up with a suggestion that can help.
 
Please specify allowBrowsersCache: true in the options object of your report:

report: {
  dataSource: {...},
  options: {
    allowBrowsersCache: true
  }
}

By default, this property is set to false, which disables caching: Flexmonster appends a unique id to the data source’s URL to ensure that the URL stays unique.
Perhaps this id caused the error.
 
Please let us know if our suggestion helped.
Looking forward to your response.
 
Best regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster April 9, 2021

Hi!
 
How are you?
 
We were wondering whether our suggestion helped.
Could you please let us know if the issue is resolved?
 
Waiting for your reply.
 
Kind regards,
Milena

Public
Vera Didenko Vera Didenko Flexmonster April 26, 2021

Hello, James,
 
Hope you're having a great day!
 
Our team is wondering if the allowBrowsersCache: true option worked for you.
Did it work to connect to Cloud Firestore?
 
Please let us know if everything worked and if any questions remain - we will be happy to help.
Looking forward to your response.
 
Kind regards,
Vera

Please login or Register to Submit Answer