Forum Discussion

Don's avatar
Don
Contributor
7 years ago

OnLogError Sender Returning Null Value, Updated to X64 for TestComplete and Office 2016

Hello Community,

 

I recently upgraded to the new TestComplete 12.42 which has x64 bit support. Because TC automatically installs x64 support, I installed Office 2016 with AccessDatabase 2016 both which are x64. 

 

Now every time I have an error when the GeneralEvents_OnLogError(Sender, LogParams) is called, it returns a null value. I tried testing it with the 32bit versions in other machines and they return the value with no problems.

 

I tried Installing AccessDatabase for 2016, 2010, 2013 and it's still giving me the same issue. I also changed the calls from

Microsoft.ACE.OLEDB.12.0 to Microsoft.ACE.OLEDB.16, Microsoft.ACE.OLEDB.15, Microsoft.ACE.OLEDB.14, etc.

 

The tests run fine, it's only when I get an error with the OnLogError where I'm having issues. Does anyone know if I have to change something somewhere in the settings, I tried looking and still no luck.

 

I even looked into the GeneralEvents and looked at the OnLogError but still cannot find the issue.

 

Any help is appreciated.

 

Regards

  • Ok So I may have found the solution.

     

    First I uninstalled the latest version of testcomplete and did a complete uninstall of office 2016. I then installed office 16, followed by Access Database 2010 followed by an older version of testcomplete. I then upgraded to the latest version.

     

    I also removed the excel code within the onLogError code. This excel code was there so it can write to the excel sheet the problem that occurred during the run. By removing it I won't be able to see why the run failed but I will still see that it failed. I will have to find a new solution for this but this is better than not having my tests work at all when doing a regression run.

     

    One last note. I installed only 32 bit version of office and access database. I am also using the 32bit version of TestComplete instead of the 64 bit. 

     

    Thanks to everyone who replied to this post. I will continue to update if needed with any new findings.

     

    I hope this helps anyone running into a similar issue.

    • Don's avatar
      Don
      Contributor

      Thanks marsha, I'll go ahead and contact support. In the meantime if anyone else has a solution please post. :)

  • Don's avatar
    Don
    Contributor

    Ok So I may have found the solution.

     

    First I uninstalled the latest version of testcomplete and did a complete uninstall of office 2016. I then installed office 16, followed by Access Database 2010 followed by an older version of testcomplete. I then upgraded to the latest version.

     

    I also removed the excel code within the onLogError code. This excel code was there so it can write to the excel sheet the problem that occurred during the run. By removing it I won't be able to see why the run failed but I will still see that it failed. I will have to find a new solution for this but this is better than not having my tests work at all when doing a regression run.

     

    One last note. I installed only 32 bit version of office and access database. I am also using the 32bit version of TestComplete instead of the 64 bit. 

     

    Thanks to everyone who replied to this post. I will continue to update if needed with any new findings.

     

    I hope this helps anyone running into a similar issue.

    • TanyaYatskovska's avatar
      TanyaYatskovska
      SmartBear Alumni (Retired)

      Hi Don,

       

      Thanks for posting the solution here! I'm sure it will help many other community members.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    What is in your OnLogError event handler code?  It might be helpful to see what's being executed there to determine what other changes might need to be done.

     

    Additionally, while by default TestComplete runs in 64 bit, you can still access a 32-bit version.  Typically installed in C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\

    • Don's avatar
      Don
      Contributor

      Thanks for the info about accessing the 32bit version. I am already fully invested in the 64 bit version and if I can't find a solution I will uninstall everything and reinstall it with the 32bit version

       

      Here is the code that I am using. It works fine with the 32 bit version that I haven't updated but like mentioned in the main post the 64 bit doesn't send the Sender value.

       

       

      function GeneralEvents_OnLogError(Sender, LogParams){
      //  Log.Message(Sender);
        if (driver == true){
        Log.Message(typeof runSheet);
        var type = typeof runSheet;
        if(String(runSheet.cells(loopCounter,2)).search("AD_") == 0) {
        excel_library.quitExcel();
      //    eval("excel_library.quitExcel()");
        }
        handlingRecursiveCallPopup();

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I think you misunderstood... you don't need to re-install anything... the 32-bit version is installed already along with the 64-bit version.  You just need to run from a different directory.  I would try that and see if that works for you.

         

        In any case, I'm not sure the "Sender" is something generally accessible and usable.  If it's returning a "null" value, then it's probably because there's nothing there for you to access in the way of Log.Message.  I'm assuming, from your original post, that is what the problem is, that the Log.Message(Sender) line is not functioning?

         

        I see some code in there referencing Excel, some object called "runSheet" and a library of excel_library.  Could share that code as well?  It's possible that something needs updated in there to use the 64-bit drivers.

  • Don's avatar
    Don
    Contributor

    Ok so I kind of figures out what's going on. 

     

    I think the issue may have to do with Office 2016 or that the OnLogError is not triggering. 

     

    I am not getting any help from smartbear support as they are not replying to my emails at all(So much for my paid subscription), so it looks like i'm going to have to figure this thing out myself. 

     

    Thanks to everyone who replied to this thread I will continue to update it as I go.

      • Don's avatar
        Don
        Contributor

        Yes I used the link to contact them. I even contacted my representative but he is also not contacting me as well. I may have to request a supervisor because this has happened in the past where my support request went unanswered