RSelenium makeFirefoxProfile with Windows Task Scheduler - selenium

I am navigating a web page with firefox using RSelenium package. When i start building my script i used makeFirefoxProfile function to create temporary profile for setting download directory and related file type to download needed file into specific directory.
When i was trying to do that i got an error about zip files. After some research I installed rtools and succesfully managed this error. My script worked as I expected.
Now i want to that operation periodically on Windows Machine. To do that When I try to use taskscheduleR packgage to create task for Windows Task Scheduler i got the some zip error due to windows doesnt have built in comman-line zip tool
You can check the error code below, after i tried to operate the task
Error in file(tmpfile, "rb") : cannot open the connection
Calls: makeFirefoxProfile -> file
In addition: Warning messages:
1: In system2(zip, args, input = input, invisible = TRUE) :
'"zip"' not found
2: In file(tmpfile, "rb") :
cannot open file 'C:\Users\user\AppData\Local\Temp\RtmpKCFo30\file1ee834ae3394.zip': No such file or directory
Execution halted
Within R-Studio when i run my script there is no problem. Thank you for your help

Related

Unable to run a test from MTM - Config issue

I have set up a Test Controller and Test Agent running in separate machines and they are able to communicate with each other.
When I try to run the test from MTM (Selenium Tests), the test failed with the below error message
(QTController.exe, PID 1104, Thread 15) Could not use lab service account to access the build directory.
Failure: Network path does not exist or is not accesible using following user:
https://mydevelopment.visualstudio.com/defaultcollection/c2f372df-8c45-487a-9b51-4ced6e8f6037/_apis/build/builds/969/artifacts?artifactName=drop&%24format=zip
using MYDEV\timothy.alex. Error Code: 67
(QTController.exe, PID 1104, Thread 15) TcmRunner: Error starting the test run: The build directory of the test run either does not exist or access permission is required..
This clearly mentions that the error is because of access issue. But when I try downloading the build from the url mentioned in the error log using the same credentials mentioned in the ERROR log, I am able to download the drop zip file.
Is there any thing I am missing in the set up. Any help would be really really great.
It looks like you're using the new task-based build system. You can't run automated tests from a task-based build from MTM at present -- you have to use the older XAML build system for that.

MSYS2/pacman can't run update-core or sync database "filename too long" error

I'm attempting to install and use MSYS2 (just getting started with it). I used the installer msys2-x86_64-20150916.exe and that seemed to go fine. Following the install directions, I ran both the update-core script and package database sync. Both fail. I show some of the output of the update core script below. The database sync fails for same "filename too long" reasons.
==> Update package databases...
:: Synchronizing package databases...
downloading mingw32.db...
downloading mingw32.db...
downloading mingw32.db...
downloading mingw32.db...
downloading mingw32.db...
error: could not open file /var/lib/pacman/sync/process?a=-3-lqCLzXmOVMGhdCngyCV4_GayxZ9J_5BY5vi5g3cT8TnaVOyHNkP3i0c8d5C4blqAp5pNlE0ed_vEU-kPSDHKOg&b=PPNTxJgmwuDT5DPf_2sovf-m6J5IoL2zxXU84ePhgAUcZBDyVD_v4wfG6xGP3FZCi8b3EStJPpKrKU8ykIp4uPYrbGFuUlsd-FOf5alMDNO2Olf-YFTsRpUe24Yfq_ATwekjooJm-B-XXCVQ1YAE-3RUWx6oUzFYRJU02LpZIsToFNPuxq-KAou5Jn0dv8rnnKahdjG5tC2rTNNj4gWmj4P_9EX4TcaNgFcSKXzudqLljMnXiamdT4NGmqOPl_cDHrPSnLGDHLWoQHEqx1lL22LYPuzY135OpobhnKym1KM1DLksJiU3U9CwbJ7-2dUD2k1mXjQYV6qGC0I6VRGIkmjkOUCiGsiLMlz-OnHKs_CgI0NyreR38yFPfW6pnW4skarOGfYj0p9pp2MMCMeXtQF6XDDZs3Hah8QoEBL8ZQjD9pArAbk34E9jUIgJXG4I&blockedUrl=http%3A%2F%2Frepo.msys2.org%2Fmingw%2Fi686%2Fmingw32.db.sig.part: File name too long
...
==> Checking if there are critical packages to upgrade.
error: could not open file /var/lib/pacman/sync/mingw32.db: Unrecognized archive format
...
I am running on Windows 7 Enterprise.
Let's look at that long filename more carefully. Here is an excerpt from it:
blockedUrl=http%3A%2F%2Frepo.msys2.org%2Fmingw%2Fi686%2Fmingw32.db.sig
It looks like you are behind some sort of firewall or censoring software that is blocking a download. You should see if you can download http://repo.msys2.org/mingw/i686/mingw32.db.sig in a normal web browser. If not, then you can report the problem to your system administrator and ask them to unblock repo.msys2.org.
When you test the download, make sure that you are able to download the file without clicking through any interstitial web pages, because the MSYS2 software will not be able to do that. You should be able to just click on the link above and it should directly download the file.

ASP.NET 5 site fails to publish to azure appservice because of a long path

I'm trying to publish a relatively new ASP.NET site to azure appservice from Visual Studio.
I'm getting the following error message during the preview:
The "Dnu" task failed unexpectedly.
System.Exception:
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231
Copying to output path C:\Users*****\AppData\Local\Temp\PublishTemp*****************.********.WebApi114
Error: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at Microsoft.DNX.Tasks.Dnu.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
Path is long indeed. How do I fix it?
Error is from windows file API, not control by Azure App Service. Sadly I think you will have to find a way to shorter your file path in order to fix this issue.
I was running into the same issue trying to build an Angular2 app locally. So I tend to agree with Xiaomin that it may be a local issue. What worked for me was to run the dnu publish command from a command prompt with the output flag set with a shorter folder destination provided. For example, navigate to the location of the project you want to publish in a command prompt and type:
"dnu publish --runtime active -o c:\Sample"
The above command will post your output to c:\Sample.
You can interrogate the options as follows:
"dnu -help"
"dnu publish -help"

Jenkins: Error in Selenium Publish Report

I have properly configured the Seleniumhq plugin into Jenkins. I've also tried to run it in my local Jenkins and it worked. The problems I encounter are as follows:
suiteFile directory reads from C drive ONLY. Example, C:\TestSelenium\testSuite.html
When I try to specify the absolute path to my test suite (workspace), I get the error
The suiteFile is not a file or an url ! Check your build configuration.
Same thing happens with resultFile.
When I add post-build action "Publish Selenium Report," I'm getting an error because the newly created resultFile is saved into C:\TestResult\result.html and not in the workspace.

WebDeploy runcommand issue

I'm trying to deploy a package with WebDeploy V3.
The installation process is to sync between a source folder to a destination folder on the remote computer and run a certain powershell script after the sync is done.
The command being executed is:
'"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:dirPath='C:\source' -dest:dirPath='D:\destination',computerName=XXX -postSync:runcommand='powershell -inputformat none D:\destination\Install.ps1',successReturnCodes=0'
This yields the following error:
Info: Using ID '49edd786-d8a0-4acf-be7b-95dd6e1391cc' for connections to the remote server. Performing '-postSync'... Info:
Using ID '5ef9d005-82fa-4811-9f51-1741c8d622de' for connections to the remote server.
Info: Adding MSDeploy.runCommand (MSDeploy.runCommand).
Error: (11/28/2012 4:34:24 AM) An error occurred when the request was processed on the remote computer. Error: The entry type 'Unknown' was not expected at this time. The serialization stream may be corrupted.
Error count: 1.
Error during '-postSync'. Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
Searching the net for this error, I didn't see anybody who encountered it when using runcommand provider. If anybody encountered a similar issue and has ideas or suggestions I would be most thankful..
From what I've seen, using runCommand to execute an arbitrary command line might be a bit buggy. Try moving the commandline into a bat or cmd file and providing a (full?) path to that. The file will be uploaded and executed, as long as you don't try to pass in any arguments to it.
For future viewers of this post: I encountered this same specific error (Error: The entry type 'Unknown' was not expected at this time. The serialization stream may be corrupted) after adding runCommand provider usage to my MyProject.wpp.targets file for the Web Publishing Pipeline MSBuild process. The path was direct cmd shell input used in order to clear readonly flags with attrib -R.
In my case, my build server was configured with WebDeploy 3.0, while the server targeted by the deployment package was configured with Webdeploy 2.0. After upgrading the target server to Webdeploy 3.0 this particular problem was resolved.
However due to other errors surrounding runCommand (providing the correct path to the destination executable at package runtime) my solution still doesn't work entirely so take this all with a grain of salt.