telenordigital / connect-android-sdk

Android SDK for CONNECT ID
https://telenordigital.github.io/id-docs.telenordigital.com/
Other
16 stars 14 forks source link

Fix npe in well known config #178

Closed SerhiiBovtriuk closed 5 years ago

SerhiiBovtriuk commented 5 years ago

The issue can happen, when this part is called from a different thread, however, it's hard to reproduce. The solution is to make a workaround to prevent crashes, while investigating deeply.

jorunfa commented 5 years ago

@SerhiiBovtriuk, @metatelenor, @vlarsen: Sorry slow reply. The analyticsEndpoint can be null if the request has not finished or if the request failed if it's the first time ever fetching it. I.e.: https://github.com/telenordigital/connect-android-sdk/blob/master/connect/src/com/telenor/connect/ConnectSdk.java#L517 https://github.com/telenordigital/connect-android-sdk/blob/master/connect/src/com/telenor/connect/ConnectSdk.java#L523

The UI does not stop the user from signing in or doing whatever, even if this request is still loading or has failed. A bug/feature of sorts - I think the idea was not to block the user even if this failed or delay the user from signing in. The old forced header enrichment (before instant verification) also depends on this endpoint, so it's also a source of that sometimes not working as expected (instant verification does not depend on this request to get any config).