cancel
Showing results for 
Search instead for 
Did you mean: 

Mobile Development Kit Client - Error with Odata metadata on app update

rpanneel
Participant
0 Kudos

Hello experts,

We are trying to get a MDK app running that accesses an OData service on our SAP back-end using mobile services in Cloud Foundry. So, we connected our CF account to the cloud connector and created a destination for our back-end in the CF also.

In Mobile services we created a Hybrid App and connected it to our OData service, see steps below:

When I ping or test the OData service it returns no errors.

At this point I have the feeling that my configuration on Mobile Services side is quite ok. We followed the steps on the tutorials for MDK, so the NEO instance has a destination that points towards the mobile-services on CF. We then follow the steps in following tutorial:

https://developers.sap.com/tutorials/cp-mobile-dev-kit-online-app.html

When we then open the app on the mobile phone we get following issue:

Any idea what might be causing this?

Thanks in advance!

Kind regards,

Robin

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

panneels.robin

If i recall correctly, this issue has already been addressed via OSS. Would you mind sharing the working solution (it might help others) and close this thread?

Accepted Solutions (1)

Accepted Solutions (1)

rpanneel
Participant
0 Kudos

The issue was that in the metadata of the service I used, there was a reference towards another service. So we had two options:

  1. Enable ignoreAllReferences in the CDSL options of the service in the MDK project
  2. Modify the rewrite urls in the destination in Mobile services

I tested option 1 and this worked for my case

Answers (2)

Answers (2)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Robin,

I would start by checking the Mobile Services logs for your application to see if there is a more descriptive error message. In Mobile Services go to Analytics > Logs and see if there is more detail related to the error.

Additionally, I would try accessing your application API url for that destination in the browser to confirm you can retrieve the metadata. So for your example it would be https://<id>-trial-01-be-odata-redirect.cfapps.eu10.hana.ondemand.com/be.odata.redirect/$metadata?au... just to verify it is accessible (I would guess it is).

--Bill

rpanneel
Participant
0 Kudos

Bill,

Thanks for reply.

No relevant logs available when running the app.
I can confirm that https:// - trial-01-be-odata-redirect.cfapps.eu10.hana.ondemand.com/be.odata.redirect/$metadata?auth=uaa is accessible and returns the metadata.

Kr,

Robin

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

The error seems to indicate a discrepancy somewhere. In the screenshots I don't see a reference to be.rpan.test.odata. I am also assuming your destination is the root of your service.

--Bill

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

panneels.robin

Couple of things you can look into:

  1. In Mobile Network trace feature in Mobile Services cockpit > select Log message (header & body) and start recording
  2. Reproduce the issue on client side.
  3. Switch back to MS cockpit, stop recording and check if you find anything relevant in the trace file.

Are you trying it on MDK public store client (check once if you have already updated it to 4.2.1)? If so, you can connect your Android device to PC and can access ClientLog.txt file via the Android Studio> View menu > Tools Window > Device File Explorer>data>data>com.sap.....>files>ClientLog.txt , there you may find some more info.

rpanneel
Participant
0 Kudos

Jitendra,

Thanks for reply.

I followed your steps to start network tracing and searched the trace file for errors but no errors there.
I can see the metadata call gets response status 304.

Kr,

Robin