I'm working on this block of code where it stores geofire locations:
let geoFireRef = admin.database().ref().child('customer_requests');
let geoFireApp = new geofire.GeoFire(geoFireRef);
await geoFireApp.set(context.params.pushId, [original.pickup.lat, original.pickup.lng]);
and stucked on this error based on Firebase logs:
TypeError: Cannot read properties of undefined (reading 'pieceNum_') at pathChild (/workspace/node_modules/geofire/dist/geofire/index.cjs.js:5727:23)
I have this realtime database on firebase named "customer_requests":
And this is my rule configuration:
"customer_requests" : {
".read": "auth != null",
".write": true
},
Can someone please help my solve this error. Thank you in advance.
EDIT:
Here's the values of pushId, pickup.lat, and pickup.lang
solved the issue by downgrading firebase and geofire versions. Thank you.