skip to Main Content

my Code for firestore

my Code for firestore SET

I have tried:

  1. firebase.firestore().settings({ experimentalForceLongPolling: true,merge:true });
  2. firebase.firestore().settings({ experimentalForceLongPolling: true });
  3. firebase.firestore().settings({ experimentalAutoDetectLongPolling:true});

Nothing works … still getting the error.

This is the ERROR:

WARN [2022-07-07T23:56:51.946Z] @firebase/firestore: Firestore (8.2.2): Connection WebChannel transport errored: {"a": {"C": null, "K": [Circular], "a":
{"A": 0, "B": [U], "C": true, "F": 45000, "G": false, "I": true, "J": -1, "K": "qWV1iUI-i7uAv4TY0w-d_A", "Ka": 5000, "Ma": false, "Na": false, "Oa": false,
"P": 0, "Pa": 2, "Qa": undefined, "R": [Object], "S": 0, "T": 65073, "Ta": 1, "U": true, "Ua": 10000, "V": 4, "X": false, "Y": [Object], "a": null, "b": [zd], "c": [bc], "f": [Z], "fa": false, "g": [Array], "ga": undefined, "h": null, "ha": "https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel", "i": null, "ia": "", "j": null, "ja": 8, "l": null, "m": null, "ma": 12, "na": [U], "o": 3, "oa": 600000, "pa": "Gw6V9oY7XHlRiEFuqqRCs5zpnZf9pAwBw2sVbO1PSVM", "qa": -1, "ra": [Ed], "s": null, "u": 0, "v": "gsessionid"}, "b": {"database": "projects/banana-ee2ef/databases/(default)"}, "c": {"a": [Object], "b": 4, "src": [Circular]}, "f": {"a": [Circular]}, "i": undefined, "j": false, "l": true, "m": true, "o": "https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel"}, "defaultPrevented": false, "status": 1, "target": {"C": null, "K": [Circular], "a": {"A": 0, "B": [U], "C": true, "F": 45000, "G": false, "I": true, "J": -1, "K": "qWV1iUI-i7uAv4TY0w-d_A", "Ka": 5000, "Ma": false, "Na": false, "Oa": false, "P": 0, "Pa": 2, "Qa": undefined, "R": [Object], "S": 0, "T": 65073, "Ta": 1, "U": true, "Ua": 10000, "V": 4, "X": false, "Y": [Object], "a": null, "b": [zd], "c": [bc], "f": [Z], "fa": false, "g": [Array], "ga": undefined, "h": null, "ha": "https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel", "i": null, "ia": "", "j": null, "ja": 8, "l": null, "m": null, "ma": 12, "na": [U], "o": 3, "oa": 600000, "pa": "Gw6V9oY7XHlRiEFuqqRCs5zpnZf9pAwBw2sVbO1PSVM", "qa": -1, "ra": [Ed], "s": null, "u": 0, "v": "gsessionid"}, "b": {"database": "projects/banana-ee2ef/databases/(default)"}, "c": {"a": [Object], "b": 4, "src": [Circular]}, "f": {"a": [Circular]}, "i": undefined, "j": false, "l": true, "m": true, "o": "https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel"}, "type": "c"}

2

Answers


  1. There’s a similar error discussed here but it’s related configuration of the local emulator. Are you using the emulator?

    Are you only having problems with the ‘set‘ method with this particular collection and/or document?

    Note, that the Firestore reference should be the db reference obtained from the below method.

    const db = firebase.firestore();.

    It’s not really clear how you are setting up the database. Could you share that code here too?

    And just a minor comment. You can simplify your code like below:

    {
      userId,
      email,
      password,
      username,
    }
    

    See https://attacomsian.com/blog/javascript-object-property-shorthand

    Login or Signup to reply.
  2. You can try switching to fire base version 8.10.1

     yarn add [email protected]
    

    or

     npm install --save [email protected]
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search