sap-tutorials / How-Tos

How-To documents for sap.com - DEPRECATED
Creative Commons Attribution 4.0 International
24 stars 19 forks source link

Build a geofencing app #217

Closed MichaelinNY closed 6 years ago

MichaelinNY commented 6 years ago

Hi, I got the error when click on GeoLocation "Error: JsonError: Expected token start character, found '<'."

Here is the Xcode console log:

2017-08-16 21:33:29.260033+0800 SAPGeo[1230:47428] [general] # ServiceDataAccessLogger - ERROR - (Main) - SAPGeoServiceDataAccess.swift.executeRequest - Error happened in the downloading process. (Error: JsonError: Expected token start character, found '<'.) 2017-08-16 21:33:29.262407+0800 SAPGeo[1230:47428] [general] # MasterViewControllerLogger - ERROR - (Main) - MasterViewController.swift.updateTable(completionHandler:) - Could not update table. (Error: JsonError: Expected token start character, found '<'.)

Would you please help to solve it, thanks in advance!

Matt

qualiture commented 6 years ago

Hi @MichaelinNY,

I don't know for sure, but since the response started with a < I suspect you get an HTML response indicating an authentication issue -- can you debug the result?

In Step 8 of the tutorial, when creating the OData destination, have you specified Basic Authentication and supplied the SYSTEM user credentials?

MichaelinNY commented 6 years ago

Thanks @qualiture for the quick respond, I re-created the whole thing, including HANA MDC database and application onMobile Service for Development and Operations, now everything works fine!

I'm sure I was using SYSTEM user credentials for destination, but not sure what was causing the problem, thanks again!