User library code causes error in remote execution

Bug reports.
kOoO
Posts: 9
Joined: Wed Oct 17, 2018 11:15 am
Location: Zlin, CR

User library code causes error in remote execution

Post by kOoO » Fri May 17, 2019 3:45 pm

Hello,

Today I encountered an issue while trying to run test on remote agent. After pressing the "run" button, it either throwed error (rxbug.jpg or rxbug2.jpg) or just hanged on the "Packing" step forever (Screenshot_3.jpg). When I run the test suite locally, it worked.

I tried to reinstall Ranorex, cleared caches, reports ... But the problem was in project. After many "revert and try to run" cycles I have found a file that is causing the exception.

This is the file: https://pastebin.com/HpCyQnRZ . Code is not nice, however it compiles. There must be something wrong (like some escape character) when trying to pack that into xml.
This is the last version of that file, that worked: https://pastebin.com/EDckKA6Q

This is what was in the log:

Code: Select all

2019-05-17 16:29:20.380| WARN|Ranorex.Studio|ICSharpCode.Core.ResourceNotFoundException: Resource not found : ProjectBrowser.Folder.Missing
   at ICSharpCode.Core.WinForms.WinFormsResourceService.GetBitmap(String name)
   at ICSharpCode.SharpDevelop.IconService.GetBitmap(String name)
2019-05-17 16:29:20.414| INFO|Ranorex.Studio|CurrentProject changed to W4KNew
2019-05-17 16:29:20.414| WARN|Ranorex.Studio|Codon (GitLog) specified in the insertafter of the [Codon: name = MenuItem, id = GitControlMenu, addIn=C:\Program Files (x86)\Ranorex\Studio\Bin\AddIns\SourceControl\GitAddin\GitAddin.addin] codon does not exist!
2019-05-17 16:29:22.990|DEBUG|Ranorex.Studio|AbstractViewContentWithRepository.LoadInternal: RepositoryEditor.LoadRepositoryFromFile: C:\Users\SESA511780\Documents\Ranorex\RanorexStudio Projects\W4K1\monument-testing\W4KNew\W4KNewRepository.rxrep
2019-05-17 16:29:31.661|ERROR|Ranorex.Studio|Invalid XML documentation: The 'docroot' start tag on line 1 position 2 does not match the end tag of 'summary'. Line 1, position 13.
2019-05-17 16:29:37.114| INFO|Ranorex.Studio|Loading addin Search & Replace
2019-05-17 16:29:38.164| INFO|Ranorex.Studio|Loading addin SharpRefactoring
2019-05-17 16:29:44.869| WARN|Ranorex.Studio|CompilerMessageView.GetCategory(string categoryName): category 'PackageManagement' not found.
2019-05-17 16:29:45.002|ERROR|Ranorex.Studio|Invalid XML documentation: The 'docroot' start tag on line 1 position 2 does not match the end tag of 'summary'. Line 1, position 13.
2019-05-17 16:29:45.682| INFO|Ranorex.Studio|Start pr-building Ranorex Automation Helpers
2019-05-17 16:29:45.682| INFO|Ranorex.Studio|Start pr-building W4KNew
2019-05-17 16:29:45.682| INFO|Ranorex.Studio|Start pr-building W4KNew
2019-05-17 16:29:45.682| INFO|Ranorex.Studio|Finished pre-building W4KNew, success=True
2019-05-17 16:29:45.690| INFO|Ranorex.Studio|Finished pre-building Ranorex Automation Helpers, success=True
2019-05-17 16:29:45.690| INFO|Ranorex.Studio|Start building Ranorex Automation Helpers
2019-05-17 16:29:47.204| INFO|Ranorex.Studio|Finished building Ranorex Automation Helpers, success=True
2019-05-17 16:29:48.700| INFO|Ranorex.Studio|Finished pre-building W4KNew, success=True
2019-05-17 16:29:48.700| INFO|Ranorex.Studio|Start building W4KNew
2019-05-17 16:29:50.025| INFO|Ranorex.Studio|Finished building W4KNew, success=True
2019-05-17 16:29:50.025| INFO|Ranorex.Studio|Start building W4KNew
2019-05-17 16:29:50.025| INFO|Ranorex.Studio|Finished building W4KNew, success=True
2019-05-17 16:29:50.703|ERROR|Ranorex.Studio|Invalid XML documentation: The 'docroot' start tag on line 1 position 2 does not match the end tag of 'summary'. Line 1, position 13.

Can someone investigate this, please?

Also it would be nice to have more detailed error reporting. Maybe I havent looked on all places, but I have turned on loging level to "Trace" and have not seen the problematic file path nowhere.

Also 2, in the screenshot there is highlithed button that doesn't work.
Attachments
Screenshot_3.jpg
Screenshot_3.jpg (7.02 KiB) Viewed 173 times
rxbug2.jpg
rxbug2.jpg (53.55 KiB) Viewed 173 times
rxbug.jpg
rxbug.jpg (24.46 KiB) Viewed 173 times

kOoO
Posts: 9
Joined: Wed Oct 17, 2018 11:15 am
Location: Zlin, CR

Re: User library code causes error in remote execution

Post by kOoO » Mon May 20, 2019 8:57 am

Ok so it has something to do with number of lines/characters in user library class/method.

For example, this does't work too:

Code: Select all

        public static string cmd(string ip, string cmd){
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	
        	
        	return "";
        }
but this works (20 lines less):

Code: Select all

        public static string cmd(string ip, string cmd){
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	Report.Info("Test");
        	
        	
        	return "";
        }

Is there any known limitation for user library code class for remote execution or is it a bug?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11889
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: User library code causes error in remote execution

Post by Support Team » Tue May 21, 2019 8:57 am

Hello kOoO,

I tried to reproduce the issue as you described, but it works independently of the number of lines/characters. The error message actually says that the test executable W4KNew.exe cannot be opened. Can you confirm that it exists in the given folder?
Can you execute the test when copying all files (the whole bin\debug folder) to the machine manually and start the test?
Do the versions of Ranorex Studio and Ranorex Agent match? Please update Ranorex and the Agent to the latest version if you haven't done so already.

Regards,
Bernhard
.
Image

kOoO
Posts: 9
Joined: Wed Oct 17, 2018 11:15 am
Location: Zlin, CR

Re: User library code causes error in remote execution

Post by kOoO » Tue May 21, 2019 1:21 pm

I can confirm that the exe file doesn't exist in that folder. This is all get that extracted:
Screenshot_1.jpg
Screenshot_1.jpg (54.88 KiB) Viewed 95 times
If I try to manually download and extract the ZIP file from the host computer (http://host:8081/api/files/92fce50370ba ... f9b234.zip), it says its corrupted (CRC fail).
Screenshot_2.jpg
Screenshot_2.jpg (47.38 KiB) Viewed 95 times
On both computers I am using Ranorex Studio 9.0.1. Agent's version is 5.0.0.

When I copy all files on the agent computer, I can run the test without problem.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11889
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: User library code causes error in remote execution

Post by Support Team » Thu May 23, 2019 1:28 pm

Hi kOoO,

Thank you for the information. Your solution seems to be very big. Most probably the zip archive doesn't get created correctly.
I'm afraid in order to analyze the issue, we need your Ranorex Solution. Would you mind creating a support ticket and add a zipped version of your Ranorex Solution.

Thank you!
Bernhard
.
Image