Adobe AIR help, Error: The product needs to be activated.Solved

Hello,

Upon calling this function [ ta.IsGenuineEx(30,15, false)] in Adobe Air, it is always returning this error [Error: The product needs to be activated.] on a very brand new machine with windows. This prevents the new users from trying the Trial.

Can you please shed some idea on this.

Thanks

More information is needed: https://wyday.com/limelm/help/faq/#useful-reports

Also, follow the example. What you're getting is expected. The example article and code show how to check if activated, and if not, offer a trial: https://wyday.com/limelm/help/using-turboactivate-with-adobe-air/

Info

1) using TurboActivate Version 4.2.0.0 (6.15 MB) from this link https://wyday.com/limelm/api/

2) using TurboActivate.dll file from bin-windows/x86 folder

3) using systa file from bin-windows/x86/additional/nodejs folder

4) using the source code for Adobe Air from this link https://wyday.com/limelm/help/using-turboactivate-with-adobe-air/

5) After calling ta.IsGenuineEx(90, 14, true); evt.ErrorObj always returns 'Error: The product needs to be activated.' And according to the example this runs EndLicensingCheck() function and then throws error. Thus, trial function, ta.UseTrial(); is never executed.

6) testing on 2 new machines Windows 10, 64 bit and another new machine Windows 8.1, 64 bit. Result is same.

7) Used AIR SDK versions 26.0,29.0.0.112,30.0.0.107,31.0.0.96 and 32.0.0.116 for testing.

Description:-a) What function is failing and what is the exact error code?- ta.IsGenuineEx(90, 14, true); function is executing fine but onIsGenuineEx(evt:TurboActivateEvent) is always returning error, 'Error: The product needs to be activated.' via evt.ErrorObj.

b) What do you expect to happen?- since this is being tested on completely new machines, this error should not happen instead evt.ErrorObj should return null.

c) Give us the product key!- since the error is throwing for the trial period, there is no need of product key.

d) Can you reproduce the behavior?- yes this can be reproduced every time. Tested on brand new 3 windows 64 bit machine with Win 10 and Win 8.1 The problem is not seen after activation is done with the product key. i.e evt.ErrorObj returns null when the application is already activated.

Let me know if you need more information.

Thanks

In TurboActivate.as, around line 532, you'll see if (RetCode == 4) evt.ErrorObj = null;

Replace that with this:

if (RetCode == TA_E_INET || RetCode == TA_E_ACTIVATE || RetCode == TA_E_IN_VM || RetCode == TA_E_REVOKED){ evt.ErrorObj = null;}

The next release will have that fixed. Thanks for reporting this.

Hello,

This has fixed to pass the error. However, the application is throwing new errors.

When the application executes the function ta.UseTrial(TrialCallback, trialFlags); inside function onIsGenuineEx(evt:TurboActivateEvent). This has 2 results.

1) in absence of internetevt.ErrorObj is returning the value ' Error: Connection to the server failed ' from the function onUseTrial(evt:TurboActivateEvent):void.

a) What do you expect to happen? - I believe for testing on trial period, there should be no need of internet. It should return null.

2) in presence of internetNothing happens. Neither function TrialCallback(status:uint) nor function onUseTrial(evt:TurboActivateEvent) is fired.

a) What do you expect to happen? Either function TrialCallback or function onUseTrial should have fired without any error. It should allow the trial period even in the presence of the internet.

Thanks

>> "1) in absence of internetevt.ErrorObj is returning the value ' Error: Connection to the server failed ' from the function onUseTrial(evt:TurboActivateEvent):void. "

No, that's the correct behavior. Handle the error in your code.

The reason IsGenuineEx() "nulls out" the error in some cases is because the function has specific error code for specific errors (see example, docs, etc.)

I have 2 questions from the previous post.

1) when the internet is present why it is not firing any event/function after ta.UseTrial(TrialCallback, trialFlags); is executed.

2) according to the example for Adobe Air.

private function onUseTrial(evt:TurboActivateEvent):void{ if (evt.ErrorObj == null) { // get the TrialDaysRemaining ta.TrialDaysRemaining(trialFlags); } else if (evt.ErrorObj.errorID == TurboActivate.TA_E_TRIAL_EXPIRED) { // no trials day remaining trialDaysRemaining = 0; EndLicensingCheck(); } else { // in a real world app don't throw exceptions. This is for debugging only throw evt.ErrorObj; }}

Only if evt.ErrorObj == null, we should proceed on getting the trial days. So, am I suppose to put one more condition for trapping 'Connection to the server failed ' error ? Should I call ta.TrialDaysRemaining(trialFlags); when this error is returned ?

Thanks

>> " So, am I suppose to put one more condition for trapping 'Connection to the server failed ' error ?"

No.

>> "Should I call ta.TrialDaysRemaining(trialFlags); when this error is returned ?"

Nope. Show the error to the user and tell them how to fix their connection.

Calling ta.TrialDaysRemaining(..) will give you another error. So, handle the first error -- don't keep barreling through.

Hello,

1) So you are explicitly saying, internet is must even to use the trial version ?

2) still waiting for the answer for functions/events not firing after executing ta.UseTrial(TrialCallback, trialFlags); in the presence of internet.

Thanks

1. Yes, for verified trials. Not for unverified trials. See the help documentation on the differences.

2. Yes, the initial call failed. If then initial call succeeds then callbacks will happen.

Hello,

Okay, so why the initial call ta.UseTrial(TrialCallback, trialFlags); is failing when the internet is present. After this the application does nothing. What am I suppose to do next ?

Thanks

>> "Okay, so why the initial call ta.UseTrial(TrialCallback, trialFlags); is failing when the internet is present."

Make sure you're adding the hook:

ta.addEventListener(TurboActivateEvent.USE_TRIAL, onUseTrial);

Follow the example app, add breakpoints so you can see how it's supposed to function.

Hello,

I have been completely following the example for adobe air from https://wyday.com/limelm/help/using-turboactivate-with-adobe-air/

The event ta.addEventListener(TurboActivateEvent.USE_TRIAL, onUseTrial); is definitely added along with ta.addEventListener(TurboActivateEvent.IS_GENUINE_EX, onIsGenuineEx); ta.addEventListener(TurboActivateEvent.TRIAL_DAYS_REMAINING, onTrialDaysRemaining);

This is why I am getting an error 'Connection to the server failed' from inside function onUseTrial(evt:TurboActivateEvent):void when there is no internet. Otherwise, this event would have never been called. I am getting no response when there is internet. The events are added, the function is executed but looks like the server is not returning anything. Please can you check once.

Thanks

Alright, I have checked in all 3 new windows machine by installing fresh windows, win 10 and win 8.1

All the events are attached as follows

ta.addEventListener(TurboActivateEvent.IS_GENUINE_EX, onIsGenuineEx);ta.addEventListener(TurboActivateEvent.USE_TRIAL, onUseTrial);ta.addEventListener(TurboActivateEvent.TRIAL_DAYS_REMAINING, onTrialDaysRemaining);

After executing the function call ta.UseTrial(TrialCallback, trialFlags); nothing happens in the presence of internet. Even this function TrialCallback(status:uint):void does nothing which according to the code should do something only if ta.UseTrial() has been called once in this process lifetime.

In the absence of internet, 'Error: Connection to the server failed ' is returned which according to you is valid in the verified trials. This sounds fair to me.

trialFlags is set as following inside the code:

private var trialFlags:uint = TurboActivate.TA_USER | TurboActivate.TA_VERIFIED_TRIAL;

I guess, something is missing here as well. Let me know if you need more details.

Thanks

>> "After executing the function call ta.UseTrial(TrialCallback, trialFlags); nothing happens in the presence of internet. Even this function TrialCallback(status:uint):void does nothing which according to the code should do something only if ta.UseTrial() has been called once in this process lifetime."

We can't reproduce this behavior. Use the latest TA and systa. And add a breakpoint to that function so that you can see that it's being executed.

Hello,

I am already using a dialogue box to see all the messages inside the functions which is just as good as putting the break point. But it is not showing, when it is showing for other parts.

Is there any way(may be administrative privilege) that I can reset the trial period on the machine as the one where I have my programming language, the trial period has already exceeded.

Thanks

>> "I am already using a dialogue box to see all the messages inside the functions which is just as good as putting the break point. "

Run in a debugger and use a breakpoint.

It's being executed. We can't reproduce a case where it is not executed. So if it's happening on your end, there's something wrong in your app logic. So, use a breakpoint to step through things so you know what's happening.

>> "Is there any way(may be administrative privilege) that I can reset the trial period on the machine as the one where I have my programming language, the trial period has already exceeded. "

Yes: https://wyday.com/limelm/help/

https://wyday.com/limelm/help/trials/

Also, start new topics for new questions. This has veered way off from the original question.