LA_E_TIME leaves activation on server

We are using allowedClockOffset=60 in our licenses. If I set the time back 20 minutes on a test machine and try to call ActivateLicense, the application sees error 47 (LA_E_TIME) as expected. But what surprised me was that an activation had been created on the server despite the error. Our code assumes that an error from ActivateLicense means that no activation has been created so it doesn’t attempt to deactivate.

Do you expect that some failure modes of ActivateLicense will still create an activation? If so, can you tell me which error codes will require us to make a DeactivateLicense call.

Regards,
Gary

Hi Gary,

Only in case of time error, the activation is created on the server but the error is returned in the client.

Regards,
Ahmad.

Hi Ahmad,

We thought we could handle this by calling DeactivateLicense after getting the LA_E_TIME error. But this does not work, it just returns LA_FAIL.

We can ignore this for now because we are setting allowedActivations to unlimited in our licenses. But if we decide in the future to go to limited activations we could have a problem with stray activations being left on the server in this error condition. I think it is clearly a bug in LexActivator. If that library is going to tell the client that it could not make an activation, then it really should not leave an activation on the server.

Regards,
Gary

Hi Gary,

I agree this behaviour is bit weird. We will atleast allow Deactivation to work in this case to prevent zombie activations.

Regards,
Adnan

Thank you. That should be fine.

Regards,
Gary

Did this ever get fixed? I have just tested with LexActivator 3.28.0 on Windows and we seem to have the same problem. Our licenses allow the default 60 second clock offset. If I set my system to 5 minutes different and try to activate, an activation is created on the server but I get an LA_E_TIME error in my client app. If I try to deactivate it simply returns LA_FAIL and the activation is left on the server until its lease expires.
I used a mildy modified version of the test app on github. The api calls I use are SetProductFile(), SetProductId(), SetCryptlexHost(), SetLicenseKey(), SetActivationMetadata(), Activate() and Deactivate().
What should happen is that the activation is never made on the server or is immediately deleted because of the invalid clock settings.