codediodeio / geofirex

:globe_with_meridians: :round_pushpin: Geolocation Queries with Firestore & RxJS

Home Page:https://geo-test-c92e4.firebaseapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Observable from await get(query) not functioning properly

bananamann opened this issue · comments

So here is my code:

getRooms().then((res) => {
    console.log(res);
}).catch((err) => {
    console.log(err);
});

async function getRooms() {
    const query = collection.within(point, 1, 'location')
    const rooms = await get(query)
    console.log(rooms);
}

For some reason I keep getting an error on the Observable subscriber saying this._next is not a function and the top of the stack is Observable.Subscriber, next is listener, pointing to Query.js.

Any idea why this is happening? I have tried this way with a promise and also the other way with a subscribe and I get the same error.

My first thought was that there were no results or the collection was empty but I can add things just fine and they're pointed to the same place. Also, the geo-hashes match perfectly. I have tried bigger and smaller radiuses (radii?) and can't get around it.

Would appreciate some help!

I have the same issue on React Native, maybe this library doesn't work properly with RN?

Same problem.
When I subscribe query below error shows up:
this._next is not a function

Also same issue here, Any info/help on this would be great

I have the same issue at the moment.
It seems like it might be related to this:
ReactiveX/rxjs#1057

Any help would be great.

commented

same here, any thought will be helpful

Some solution to this, I work with queries that are not real time with...
const query = await eventsGeo.within (center, radius, field);
const eventQuery = await get (query);
But I have no idea how to do the query in real time.

same here!

I'm having the same issue.

It would be great if anyone knows how to get this working on React Native.

I'm using
rxjs: 6.2.1
geofirex: 0.0.6
react-native-firebase: 5.2.1

I can add documents to the Firestore, using the example from the docs cities.add({ name: "Phoenix", position: point.data });
but any interaction with an Observable like await geofirex.get(cities.within(point, radius, field)); or query.subscribe(console.log); (from the setup docs) throws the same error:

this._next is not a function

any update?

#23 (comment)
the answer