Navigation

    OpenIAP

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    OpenRPA can't record for some applications on my machine

    General Discussion
    openrpa
    2
    15
    126
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Bill Xiao last edited by

      Hi Allan,

      I'm new to OpenRPA. Today I found I can't record operation steps for "Control Panel" and "Resource Manager". And I can't even open Start Menu when recording. In Logging window, I saw the following exceptions.

      Record on "Control Panel":
      [14:13:32.333][Error] System.NullReferenceException: Object reference not set to an instance of an object.
      at OpenRPA.Windows.WindowsSelectorItem..ctor(AutomationElement element, Boolean isRoot, Int32 IndexInParent)
      at OpenRPA.Windows.WindowsSelector..ctor(AutomationElement element, WindowsSelector anchor, Boolean doEnum)
      at OpenRPA.Windows.Plugin.<>c__DisplayClass25_0.<OnMouseUp>b__0()
      [14:13:31.483][Information] Selector had 7 items to root, but traversing children only matched 4
      [14:13:31.248][Error] System.NullReferenceException: Object reference not set to an instance of an object.
      at OpenRPA.Windows.WindowsSelectorItem..ctor(AutomationElement element, Boolean isRoot, Int32 IndexInParent)
      at OpenRPA.Windows.WindowsSelector..ctor(AutomationElement element, WindowsSelector anchor, Boolean doEnum)
      at OpenRPA.Windows.Plugin.<>c__DisplayClass25_0.<OnMouseUp>b__0()
      [14:13:30.403][Information] Selector had 7 items to root, but traversing children only matched 4
      [14:13:29.995][Error] System.NullReferenceException: Object reference not set to an instance of an object.
      at OpenRPA.Windows.WindowsSelectorItem..ctor(AutomationElement element, Boolean isRoot, Int32 IndexInParent)
      at OpenRPA.Windows.WindowsSelector..ctor(AutomationElement element, WindowsSelector anchor, Boolean doEnum)
      at OpenRPA.Windows.Plugin.<>c__DisplayClass25_0.<OnMouseUp>b__0()
      [14:13:29.097][Information] Selector had 7 items to root, but traversing children only matched 4

      Record on "Resource Manager":
      [14:14:53.602][Error] System.NullReferenceException: Object reference not set to an instance of an object.
      at OpenRPA.Windows.WindowsSelectorItem..ctor(AutomationElement element, Boolean isRoot, Int32 IndexInParent)
      at OpenRPA.Windows.WindowsSelector..ctor(AutomationElement element, WindowsSelector anchor, Boolean doEnum)
      at OpenRPA.Windows.Plugin.<>c__DisplayClass25_0.<OnMouseUp>b__0()
      [14:14:52.919][Error] System.NullReferenceException: Object reference not set to an instance of an object.
      at OpenRPA.Windows.WindowsSelectorItem..ctor(AutomationElement element, Boolean isRoot, Int32 IndexInParent)
      at OpenRPA.Windows.WindowsSelector..ctor(AutomationElement element, WindowsSelector anchor, Boolean doEnum)
      at OpenRPA.Windows.Plugin.<>c__DisplayClass25_0.<OnMouseUp>b__0()
      [14:14:52.748][Information] Selector had 10 items to root, but traversing children only matched 8
      [14:14:52.073][Information] Selector had 10 items to root, but traversing children only matched 8
      [14:14:50.923][Error] System.NullReferenceException: Object reference not set to an instance of an object.
      at OpenRPA.Windows.WindowsSelectorItem..ctor(AutomationElement element, Boolean isRoot, Int32 IndexInParent)
      at OpenRPA.Windows.WindowsSelector..ctor(AutomationElement element, WindowsSelector anchor, Boolean doEnum)
      at OpenRPA.Windows.Plugin.<>c__DisplayClass25_0.<OnMouseUp>b__0()
      [14:14:50.054][Information] Selector had 9 items to root, but traversing children only matched 7

      But it works fine for Calculator and "Microsoft Store". It seems to me OpenRPA can't work for classic applications, only work for new Windows 10 applications. Why is that?

      I'm using OpenRPA 1.2.20 and 1.2.31, installed by using your msi installer files. Both have the same issue.

      1 Reply Last reply Reply Quote 0
      • B
        Bill Xiao last edited by

        I debug the code and found it's WindowsSelectorItem constructor throwing exception.

        44bad398-6447-479e-9239-9b96b8fef3e2-image.png

        I tried to solve the issue by adding info.Filename != null in the if clause. This exception is gone but there is another exception thrown in WorkflowTrackingParticipant.cs file when playing the recorded workflow.
        2c070eef-0648-4654-8c3f-f44a2c1403a6-image.png

        So clicking Start button and launching an application still can't work on my machine.

        Allan Zimmermann 2 Replies Last reply Reply Quote 0
        • Allan Zimmermann
          Allan Zimmermann @Bill Xiao last edited by

          Hey Bill
          Thank you for taking your time to report and troubleshoot this.
          So the last part about WorkflowTrackingParticipant.cs is clearly a mistake, I should not expect all activities to have a display name.
          But regarding recording. Neither me, nor anyone i have done remote support with, have ever had issues finding things in the start menu or explorer. I'm also not able to reproduce issues with resource manager. Except if launching the resource manager from task manager, then it will not work. Openrpa should always run in the user context, and there fore it will not have permission to interact with task manager or resource manager launched from task manager, but if you launch resource manager from the start menu, it has no issues interacting with it.

          B 1 Reply Last reply Reply Quote 0
          • Allan Zimmermann
            Allan Zimmermann @Bill Xiao last edited by

            So clicking Start button and launching an application still can't work on my machine.

            You are not suppose to launch things from the start menu, but use the "Open Application" activity.

            1 Reply Last reply Reply Quote 0
            • B
              Bill Xiao @Allan Zimmermann last edited by

              Yes, it's very strange. One of my friends don't experience my issue. On his machine, OpenRPA can record all operations on Start button, on Control Panel, and on Resource Manager without any issue. We're using the same version of Windows 10, 2004. The only difference is I'm using 2 monitors. He is using one. But I unplug one of my monitors, the issue is still there.

              Allan Zimmermann 1 Reply Last reply Reply Quote 0
              • Allan Zimmermann
                Allan Zimmermann @Bill Xiao last edited by Allan Zimmermann

                Since you seem to be no stranger to C# and visual studio and already have the code base locally. Try adding a breakpoint to GetProcessInfo inside OpenRPA.Interfaces.Extensions and see why it's returning nothing.
                My best guess is a permission issue ?

                B 4 Replies Last reply Reply Quote 0
                • B
                  Bill Xiao @Allan Zimmermann last edited by

                  Hi Allan,
                  Just now, I carefully debug the code and found the exception was actually thrown in the GetProcessInfo(), shown below:
                  ac9d63fa-c471-4575-b79a-8585d37c93a5-image.png
                  And to avoid Filename is null, I added an additional line of code in 444 to set Filename to ProcessName, which seems solve the issue, as I know afterwards the Filename property will be used in multiple places. So set it to something is better leave it null.
                  But I still don't know why on my machine the Process.MainModule would throw exception for some applications. And my Windows account has administrator privilege indeed.
                  And actually, I installed OpenRPA on several other machines today. They all have no same issue as I met on my machine. It's really weird. I googled and found there were discussions about this kind of exception, like the following link.
                  https://social.msdn.microsoft.com/Forums/vstudio/en-US/4f946750-6c47-406c-810c-21a2b103b5c4/crash-in-processmainmodulequotonly-part-of-a-readprocessmemory-or-writeprocessmemory-request-was?forum=csharpgeneral
                  But still can't figure out what causes the exception on my machine.

                  And meanwhile, to replay the recording, sometimes, Track() method of WorkflowTrackingParticipants class throws exception, as shown below:
                  990cbe99-4ef1-4b19-9238-69201d4194fc-image.png
                  Sometimes, All activities in the collection of Instance.Activities are null. So to avoid the exception I added another condition in the if clause, which seems solve the issue. Please help check if the change is necessary.

                  Allan Zimmermann 1 Reply Last reply Reply Quote 0
                  • Allan Zimmermann
                    Allan Zimmermann @Bill Xiao last edited by

                    Based on the links you found. Could you change the openrpa to x64 and see if that fixes the issue ?
                    87906592-e946-4801-9fbc-25edbf735ca9-image.png
                    Also, we should avoid nulls completely in the array, so try and change line 183 instead
                    7deb7004-f2d4-40ab-aeb0-c96d7df45379-image.png

                    Allan Zimmermann 1 Reply Last reply Reply Quote 0
                    • Allan Zimmermann
                      Allan Zimmermann @Allan Zimmermann last edited by

                      If I google "Only part of a ReadProcessMemory or WriteProcessMemory request was completed" some posts say this error is specific to windows 10 ( you confirmed that ) but others are also blaming it defender.
                      Are you using some anti virus software besides Microsoft Defender ? If you are, are you will to try and disable/uninstall it for a short test, to see if that is the issue ?

                      1 Reply Last reply Reply Quote 0
                      • B
                        Bill Xiao @Allan Zimmermann last edited by

                        When I opened the project setting and found the platform target is already x64 by default. So this should not be a reason.
                        a4b11abc-6561-4b3f-a8ba-69186364b263-image.png

                        Allan Zimmermann 1 Reply Last reply Reply Quote 0
                        • Allan Zimmermann
                          Allan Zimmermann @Bill Xiao last edited by

                          Oh, maybe we DID find the issue then.
                          On mine it's set too "Any CPU" and most posts mention that the fix is setting it to "any CPU" ( but I assumed yours already was, so I just recommended to test the opposite )

                          1 Reply Last reply Reply Quote 0
                          • B
                            Bill Xiao @Allan Zimmermann last edited by

                            Yes, there is an anti-virus software running on my machine. But it should not be the reason, because as I said I tried on other machines, which have almost the same Windows and other software, including anti-virus one. Only my machine got that exception.

                            Allan Zimmermann 1 Reply Last reply Reply Quote 0
                            • Allan Zimmermann
                              Allan Zimmermann @Bill Xiao last edited by

                              Makes sense, lets try the any cpu thing then.

                              1 Reply Last reply Reply Quote 0
                              • B
                                Bill Xiao @Allan Zimmermann last edited by

                                I changed OpenRPA to Any CPU and rebuilt the whole solution, but the exception is still there as before.
                                9b215de4-c25c-498d-9641-bb092e02707c-image.png

                                Allan Zimmermann 1 Reply Last reply Reply Quote 0
                                • Allan Zimmermann
                                  Allan Zimmermann @Bill Xiao last edited by

                                  Ok, that's a shame. I'm running out of good idea's then.
                                  I came a cross some code on how to get the information using native windows dll's instead of .net, I will see if I can find it a little later.

                                  1 Reply Last reply Reply Quote 0
                                  • Locked by  A az 
                                  • First post
                                    Last post