Cordova Geolocation doesn't recognize objects

I’m using a component named “trip” and this component tries to recover some information, like ‘rider id’, ‘tax’ and ‘distance’ between driver and rider.

When Geolocalization function is passing to the component, it doesn’t recover all the objects. I think that Cordova Plugin doesn’t ok.

I tried to increase to “high accuracy” in location settings and I’ve set the permissions to try to solve this issue.

Runtime Error Firebase.set failed: First argument contains undefined in property 'deals.xk7ePu6qC8ZrPeJ0jPxZ7K9kBw33.fee'

Race requisition:

makeDeal(driverId, origin, destination, distance, fee, currency, note, paymentMethod, promocode, discount) { let user = this.authService.getUserData(); return this.db.object('deals/' + driverId).set({       passengerId: user.uid,       currency: currency,       origin: origin,       destination: destination,       distance: distance,       fee: fee,       note: note,       paymentMethod: paymentMethod,       status: DEAL_STATUS_PENDING,       createdAt:,       promocode: promocode,       discount: discount     }); }

Search the API for the location, id, of the nearby drivers, and calculate the distance:

getDriver(id) { return this.db.object('drivers/' + id); } // get driver position   getDriverPosition(locality, vehicleType, id) { return this.db.object('localities/' + locality + '/' + vehicleType + '/' + id); }    getActiveDriver(locality, vehicleType) { return this.db.list('localities/' + locality + '/' + vehicleType); }

Can anyone help me?

The error message tells you that something’s missing: Your ‘fee’ element is undefined.
Check your code for what sets fee.

Beyond that, we can’t see your code, so we can’t help really.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.