Skip to Content

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

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

unnamed.png (56.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Nov 04, 2019 at 05:37 AM

    Dario Arrigo 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?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 04, 2019 at 01:50 PM

    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


    tracelog-ok.txt (9.5 kB)
    tracelog-ko.txt (3.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded