Search Unity

[Solved] FormatException: String was not recognized as a valid DateTime.

Discussion in 'Unity IAP' started by GLeBaTi, Mar 24, 2017.

Thread Status:
Not open for further replies.
  1. GLeBaTi

    GLeBaTi

    Joined:
    Jan 12, 2013
    Posts:
    54
    Hello. I have this error every time when i start game in editor:

    Game work normaly
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @GLeBaTi

    Thank you for reporting this issue. I have passed it along to our engineers and I will let you know what they find.
     
  3. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    The fix for this issue will be in a future version of the IAP plugin.

    In the meantime, a workaround would be to clear your PlayerPrefs. That should clear the error and allow you to open your game again:
    https://docs.unity3d.com/ScriptReference/PlayerPrefs.html

    I apologize for the inconvenience this issue has caused.
     
  4. samizzo

    samizzo

    Joined:
    Sep 7, 2011
    Posts:
    487
    So was this fixed in 1.10.1? That's the latest right? I've updated to that version and I'm on Unity 5.6.0f3, and I'm seeing that error but only on my build machine when I do a build through Buildbot (the CI software I'm running). I've removed the player prefs but the error is still happening.

    Edit: Actually, looking at the decompiled source for the IAP update code, I can't see how this would be happening. And in fact it only happens when the build runs from inside Buildbot, and not when I manually run the exact same command-line that Buildbot runs at the build server shell.
     
    Last edited: Apr 24, 2017
  5. samizzo

    samizzo

    Joined:
    Sep 7, 2011
    Posts:
    487
    Urgh I'm not sure what's going on here. I remove the prefs file from ~/Library/Preferences, and every time the build runs, the IAP updater seems to write the PackageUpdaterLastChecked key with the exact same timestamp from earlier today when I first started debugging this issue (this is on macOS by the way).
     
  6. samizzo

    samizzo

    Joined:
    Sep 7, 2011
    Posts:
    487
    And now somewhere in amongst patching the IAP DLL to not do the update check, restarting Buildbot, and undoing the IAP DLL patch, it seems to be working fine. ARGH. One of those days..
     
Thread Status:
Not open for further replies.