mapbox-gl-geocoder icon indicating copy to clipboard operation
mapbox-gl-geocoder copied to clipboard

Search hanging despite successful api call

Open benrudolph opened this issue 7 years ago • 4 comments

Mapbox version: 0.44.1 Geocoder version: 2.2.0

I'm attempting to get the geocoder to work, but it consistently hangs despite the network request returning successful: screen shot 2018-04-09 at 4 00 52 pm

Additionally I've tracked down that this then clause never gets called. I tried digging into the client to figure out why but didn't make much progress: https://github.com/mapbox/mapbox-gl-geocoder/blob/master/lib/index.js#L166. Any guidance would be helpful!

My setup is local and the code I'm using to call it is:

map.addControl(new MapboxGeocoder({
        country: 'US',
        accessToken: AccessToken,
 }));

benrudolph avatar Apr 09 '18 23:04 benrudolph

I have seen this too (the autocomplete box just won't open), but I was never able to replicate it consistently and only noticed it infrequently.

Are you saying you never see that autocomplete list open up regardless of what you type in?

andrewharvey avatar Apr 09 '18 23:04 andrewharvey

Correct, I never see the autocomplete box show up. The response from the server from what I can tell is formatted correctly too

benrudolph avatar Apr 10 '18 05:04 benrudolph

One other thing I've noticed is that the Promise that is supposed to resolve seems to go into an infinite loop, still trying to figure out why: screen shot 2018-04-10 at 8 04 08 am (check out callstack, that's for a single query)

benrudolph avatar Apr 10 '18 15:04 benrudolph

That would be upstream in https://github.com/mapbox/mapbox-sdk-js, but still something we'll need to resolve.

Is it specific to a browser version? It could be something else in your application is affecting this because I can't replicate it in a standalone test app. Do you think you could reduce it down to a minimally reproducible example?

andrewharvey avatar Apr 10 '18 22:04 andrewharvey