Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jamesmontemagno opened this issue Aug 17, 2012 · 5 comments
Closed

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

jamesmontemagno opened this issue Aug 17, 2012 · 5 comments

Comments

@jamesmontemagno
Copy link

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
Copy link
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
Copy link
Author

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
Copy link
Owner

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

@jamesmontemagno
Copy link
Author

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
Copy link

cail commented Sep 7, 2012

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants