An unexpected error occured - InvalidCastException

I have installed LR 12.55 on a Win 7 machine, and get the following error when trying to start recording:

An unexpected error has occured.

Source: HP.LR.VuGen.StartRecordingDialog
Target Method: Void RealLocalProxySettings(HP.LR.VuGen.RecorderBackEnd.RecordingInfo)
Message: Unable to cast object of type 'System.Int32' to type 'System.Byte[]'.

Does someone have a solution?


  • Hi

    Which protocol are you trying to record in?

    if web - are you recording in local proxy mode or "normal" mode? if in Local proxy, can you modify back to "normal" and see if this recreates? does this happen in each recoding attempt? does this happen on other machines as well?



  • Hi,

    Could you please send the VuGen log located at %TEMP%\HP.LR.VuGen.log?

    You can use Help>Send us your feedback menu in VuGen or send directly to



  • Hi, COuld you please provide a screenshot, and if applicable, also copy the "inner excetipn" infromatiion to us? Thanks.

  • Hi,

    We are recording on the Webprotocol. It is the same on both modes, and it does only happen on some machines. We suspect it has something to do with permissions, but we need anything more specific to report.

    The funny thing is that webrecording works when using mulitprotocol (Citrix HTTP)!

  • There are 0 inner exceptions.

    Here are some screen shots:

    Uten navn.pngUten navn2.png


  • Hi,

    I've got he same issue right now.

    Would it be wrong privilege during installation ?




  • Hi

    Please open a support ticket and we will provide you a patch that will fix this issue



  • I now have this same problem.  Was there a fix created?

  • I got this error when trying to record an SSO login script.  I ran VUGen using "Run As" a test user account, instead of my normal AD credentials - hoping that I could record IE while using one of our test userids.  (I can record this application using my own AD credentials, but my personal account is set up with Multi-factor authentication, which I do NOT want to script).

    When I am running VUGen 12.55 using this other user account I also get this error "Unable to cast object of type 'System.Int32' to type 'System.Byte[]'." 

    I think what this error means is that VUGen is encountering an issue (improperly handled in its error logic) while trying to configuring a Proxy for recording - due to a permissions issue in the registry (ReadLocalProxySettings).




    2018-06-23 12:38:25,468 UTT           [  1] ERROR - Unhandled WPF exception caught
    System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.Byte[]'.
       at HP.LR.VuGen.StartRecordingDialog.ProxyRecordingHelper.ReadLocalProxySettings(RecordInfo currRecordInfo) in e:\LT\LT-CORE\win32_release\12.55.911.0\app\VuGen\FrontEnd\Current\CoreAddins\StartRecordingDialog\CommonStartRecordingDialog\ProxyRecordingHelper.cs:line 313
       at HP.LR.VuGen.StartRecordingDialog.ProxyRecordingHelper.ModifyRecordInfoForProxyRecording(CommonDlgDataStructure currDlgData, RecordInfo currRecordInfo) in e:\LT\LT-CORE\win32_release\12.55.911.0\app\VuGen\FrontEnd\Current\CoreAddins\StartRecordingDialog\CommonStartRecordingDialog\ProxyRecordingHelper.cs:line 174
       at HP.LR.VuGen.StartRecordingDialog.BaseStartRecordDataModel.FillDataToRecordStructure() in e:\LT\LT-CORE\win32_release\12.55.911.0\app\VuGen\FrontEnd\Current\CoreAddins\StartRecordingDialog\CommonStartRecordingDialog\DataModel\BaseStartRecordDataModel.cs:line 142
       at HP.LR.VuGen.StartRecordingDialog.CommonRecordViewModel.BtnOkClick2() in e:\LT\LT-CORE\win32_release\12.55.911.0\app\VuGen\FrontEnd\Current\CoreAddins\StartRecordingDialog\CommonStartRecordingDialog\ViewModel\CommonRecordViewModel.cs:line 2164
       at HP.LR.VuGen.StartRecordingDialog.CommonRecordViewModel.BtnOkClick() in e:\LT\LT-CORE\win32_release\12.55.911.0\app\VuGen\FrontEnd\Current\CoreAddins\StartRecordingDialog\CommonStartRecordingDialog\ViewModel\CommonRecordViewModel.cs:line 1842
       at HP.LR.VuGen.StartRecordingDialog.CommonStartRecordingDialogUI.BtnOkClick(CustomDialog cd) in e:\LT\LT-CORE\win32_release\12.55.911.0\app\VuGen\FrontEnd\Current\CoreAddins\StartRecordingDialog\CommonStartRecordingDialog\CommonStartRecordingDialogUI.xaml.cs:line 59

  • Hi

    We already fixed this issue .

    You can ask support to get the patch on top of 12.55 ,

    Or to use 12.57 which include this fix also .