Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Exception Thrown when keys are not in server policy data #7

Closed
jamesmontemagno opened this Issue · 5 comments

3 participants

@jamesmontemagno

Inside of "ProecessServerResponse" it looks like only the "VT" is there.

I changed it to this in the else:
this.SetValidityTimestamp(extras.ContainsKey("VT") ? extras["VT"] : DefaultValidityTimestamp);
this.SetRetryUntil(extras.ContainsKey("GT") ? extras["GT"] : DefaultRetryUntil);
this.SetMaxRetries(extras.ContainsKey("GR") ? extras["GR"] : DefaultMaxRetries);

@mattleibow
Owner

Thanks for your interest.

Theoretically this should never happen on a live app. (The keys should be in the response, but it is good to cover these cases)
You were probably using the custom server responses from your profile page?

Matthew

@jamesmontemagno

I "think" i was, it is hard to say to be honest.
I am also seeing a crash in my app the first time a new APK is uploaded to the marketplace and it has to the the validation... I am still investigating. my app is still in beta.

@mattleibow
Owner

Well, I hope you can find that reason for the crash, but don't hesitate to open an issue.
Matthew

@jamesmontemagno

Yeah I figured everything out. Was trying to update my listview on background thread. It only happened in weird timings though. Everything seems to work just fine. These values aren't returned with the custom server response, but I can put a "#if debug" in there to return true.

I guess teh odd thing is that the server could returned License, but if the VT isnt' there the Allow() will fail

@cail

To work properly with test responses (no VT), it should be:

this.SetValidityTimestamp(extras.ContainsKey("VT") ? extras["VT"] : null );

Otherwise it reports NotAllowed, because VT is Zero (but it should be 1 minute grace period)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.