MapboxGeocoding - Not a JSON Array - Error processing response
I've tried to get some results from MapboxGeocoding query but I'm getting this response: java.lang.IllegalStateException: Not a JSON Array: {"type":"Point","coordinates":[-95.36812,29.761636]}
Gradle:
mapboxAnnotationPluginVersion = '0.5.0'
mapboxServicesVersion = '4.7.0' . (Also tried with 4.6.0 and 4.8.0)
mapboxVersion = '8.2.0'
Expected Behavior
Current Behavior
Getting : java.lang.IllegalStateException: Not a JSON Array: {"type":"Point","coordinates":[-95.36812,29.761636]}
Possible Solution
Steps to Reproduce
- Hardcoded a string (valid address) on query parameter
- Execute de code above in the screenshots
- Get the response error parsing
Context (Environment)
Detailed Description
Possible Implementation
@nstele Thanks for your feedback! I could not reproduce the issue locally with the current information. I have the following test code with mapboxServicesVersion = '4.7.0' and the logs seems to be correct.
MapboxGeocoding mapboxGeocoding = MapboxGeocoding.builder()
.accessToken(AC_TOKEN)
.query("701 Brazos St Suite 504")
.build();
mapboxGeocoding.enqueueCall(new Callback<GeocodingResponse>() {
@Override
public void onResponse(Call<GeocodingResponse> call, Response<GeocodingResponse> response) {
System.out.println("response: " + response.body().features());
}
@Override
public void onFailure(Call<GeocodingResponse> call, Throwable throwable) {
System.out.println("error: " + throwable.getMessage());
}
});
Could you provide the full stack trace and maybe more info about your setup? Thanks!
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.