cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve metadata failed because the OData server returned HTTP code, 401

0 Kudos

Hello experts,

I create an offline native app which uses a Destination exposed by Cloud Connector with Principal Propagation as SSO mechanism.

Sometimes, when the app uses a destination the following error occurs:

unnamed.png

For example, if I call 4 times, in 2 minutes, the services these are the results:
1) Retrieve metadata failed because the OData server returned HTTP code, 401, with message: null

2) HTTP status from the back end is 200.

3) Retrieve metadata failed because the OData server returned HTTP code, 401, with message: null
4) HTTP status from the back end is 200.

How can I solve it?


Many thanks,
Dario

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hello Stant,

1) Yes, sometimes I get data successfully. For example, If I call the services 4 times, 2 times goes to forbidden and 2 times goes OK with this pattern:
First call: OK (Status Code: 200)

Second call: KO (Status Code: 401, Forbidden)

Third call: OK (Status Code: 200)

Fourth call: KO (Status Code: 401, Forbidden)

2) I call the method downloadOfflineStore() already

defined in the app when creating it through SDK for iOS assistant

3) I turn on network trace and I attach two file:
- tracelog-ok.txt when the call is OK (200, OK)

-tracelog-ko.txt KO when the call is KO (401, Forbidden)

Many Thanks,
D

former_member190800
Contributor
0 Kudos

darrigo can you file a ticket under component MOB-SDK-IOS-OFL? Please attach the two traces, and also if you can share the service and a test user to the Support team that would greatly aid our ability to debug.

BR, Stan

former_member190800
Contributor
0 Kudos

darrigo can you share some additional information:

1. are you *ever* able to get data successfully?

2. what types of 'calls' are you making?

3. Can you turn on 'Network Trace', and re-run the series you describe above?