Error message when requesting route

Hi all,

My app will display a route for a list of POI/Address…etc. In the Android studio emulator half of the time it gives me different error messages

“Error in service response: Could not parse json. Error(offset 1449984): Missing a closing quotation mark in string.”


“Error in service response: Could not parse json. Error(offset 1826816): Missing a colon after a name of object member.”


Error in service response: Could not parse json. Error(offset 1630208): Miss fraction part in number.


“Error in service response: Could not parse json. Error(offset 1892352): Missing a comma or ‘}’ after an object member.”

The error messages above I received after keep going back and call the activity again. After few times it finally shows the route without any error messages.

The data (i.e. the poi address) and the code (most of the time) is never change. Any idea?

Thank you

Did you try to trace these requests to check the payload?

Did you mean the url request like:

D/Request: GET {}


The strange thing is sometimes it works properly with same set of data

Which SDK version are you using?
Can you share a piece of code that is causing this?

Hi Przemek,

Thank you for your patient first of all :slight_smile:

I am currently using

The code as below:

 private void displayRoutes() {
        if (!waypoints.isEmpty()) {
            LatLng[] route = new LatLng[waypoints.size()-2]; // minus the start and end
            for (int i=1;i<waypoints.size()-1;i++){

            RouteQuery routeQuery = new RouteQueryBuilder(waypoints.get(0),waypoints.get(waypoints.size()-1))

            Icon startIcon  = Icon.Factory.fromResources(this,R.drawable.ic_map_route_departure);
            Icon endIcon = Icon.Factory.fromResources(this,R.drawable.ic_map_route_destination);
                    .subscribe(new DisposableSingleObserver<RouteResponse>() {
                                   public void onSuccess(RouteResponse routeResponse) {

                                   private void displayRoutes(List <FullRoute> routes) {
                                       for (FullRoute fullRoute : routes) {
                                           tomtomMap.addRoute(new RouteBuilder(


                                   public void onError(Throwable e) {
                                       Toast.makeText(getApplicationContext(),e.getLocalizedMessage(), Toast.LENGTH_LONG).show();
Log.w("Route error","Error message "+e.getLocalizedMessage());


        } else {
            Log.w("DisplayRoute", "waypoint is empty");

Thank you once again.

I could not reproduce this. Maybe some specific location causes this? Can you share requests from logcat that are causing errors?

Hi Przemek,

The locations below are the one for the test


I also suspect will that be because the computer I use for the emulator is too slow (sometimes it takes few mins to get a task done regardless android related or not)

I used these points and it works every time.

Yes it works fine now too. Not sure if because my computer is way too slow (sometimes it takes forever just for a task)…

But thank you