geofirex icon indicating copy to clipboard operation
geofirex copied to clipboard

Observable from await get(query) not functioning properly

Open bananamann opened this issue 7 years ago • 10 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!

bananamann avatar Sep 14 '18 03:09 bananamann

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

ahanusek avatar Sep 24 '18 21:09 ahanusek

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

arensade avatar Sep 25 '18 18:09 arensade

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

dawidvdh avatar Nov 11 '18 20:11 dawidvdh

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

Any help would be great.

ljcremer avatar Nov 14 '18 16:11 ljcremer

same here, any thought will be helpful

vsyw avatar Jan 28 '19 12:01 vsyw

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.

georgeMorales avatar Mar 06 '19 19:03 georgeMorales

same here!

fabidona avatar Apr 03 '19 17:04 fabidona

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

Windovvsill avatar May 03 '19 19:05 Windovvsill

any update?

azurechen avatar Oct 20 '19 23:10 azurechen

https://github.com/codediodeio/geofirex/issues/23#issuecomment-526935295 the answer

azurechen avatar Oct 22 '19 06:10 azurechen