Resolved: Unhandled exception running test: [Error 299] Only part of a

I’ve been trying to correct an old webpagetest setup by a previous employee here. And I’ve made some strides towards making it work (updated to 19.04 on a Windows 10 agent, and Windows 2012 server). In making these updates, I’ve had cases where the program does sometimes work well.

Tests can be automatically generated with a batch file that someone created and it comes out in the format looking like this:

File: 190917000006.190917_9Z_6.p5

Test ID=190917_9Z_6 url=https://www.****.com/ Capture Video=1 runs=2 bwIn=5000 bwOut=1000 latency=28 plr=0 browser=Chrome orientation=default IPAddr=****

I launch with the following batch command

@setlocal enableextensions @cd /d "%~dp0" python wptagent.py -vvvv --server "http://webpagetest.****.org:8333/work/" --location WEBQAWEBPGTST1-WPTDriver --poll 30 --log wptlog.txt timeout 60

As evidenced here:

But there’s other times, like today, where no amount of restarting the computer or deleting the web page test location and restoring a backup from the last time I made this work will result in anything other than

The testing completed but failed. Unhandled exception running test: [Error 299] Only part of a ReadProcessMemory or WriteProcessMemory request was completed: '(originated from ReadProcessMemory)'

Example of part of the feedback from the command line.

[quote][libx264rgb @ 000002352decb500] kb/s:12148.94
Exiting normally, received signal 2.
11:43:01.651 - Terminating all instances of ffmpeg.exe
ERROR: The process with PID 5944 (child process of PID 1476) could not be terminated.
Reason: Access is denied.
ERROR: The process with PID 8208 (child process of PID 1664) could not be terminated.
Reason: Access is denied.
11:43:01.920 - Unhandled exception in test run: [Error 299] Only part of a ReadProcessMemory or WriteProcessMemory request was completed: ‘(originated from ReadProcessMemory)’
Traceback (most recent call last):
File “wptagent.py”, line 182, in run_single_test
browser.run_task(self.task)
File “C:\wptagent-master\internal\chrome_desktop.py”, line 152, in run_task
DevtoolsBrowser.run_task(self, task)
File “C:\wptagent-master\internal\devtools_browser.py”, line 210, in run_task
self.on_stop_recording(task)
File “C:\wptagent-master\internal\chrome_desktop.py”, line 218, in on_stop_recording
DesktopBrowser.on_stop_recording(self, task)
File “C:\wptagent-master\internal\desktop_browser.py”, line 551, in on_stop_recording
kill_all(‘ffmpeg.exe’, True)
File “C:\wptagent-master\internal\os_util.py”, line 24, in kill_all
wait_for_all(exe, timeout)
File “C:\wptagent-master\internal\os_util.py”, line 32, in wait_for_all
pinfo = proc.as_dict(attrs=[‘pid’, ‘name’, ‘exe’])
File “C:\Python27\lib\site-packages\psutil_init_.py”, line 638, in as_dict
ret = meth()
File “C:\Python27\lib\site-packages\psutil_init_.py”, line 775, in exe
return guess_it(fallback=err)
File “C:\Python27\lib\site-packages\psutil_init_.py”, line 757, in guess_it
cmdline = self.cmdline()
File “C:\Python27\lib\site-packages\psutil_init_.py”, line 790, in cmdline
return self._proc.cmdline()
File “C:\Python27\lib\site-packages\psutil_pswindows.py”, line 718, in wrapper
raise convert_oserror(err, pid=self.pid, name=self._name)
File “C:\Python27\lib\site-packages\psutil_pswindows.py”, line 708, in convert_oserror
raise exc
WindowsError: [Error 299] Only part of a ReadProcessMemory or WriteProcessMemory request was completed: ‘(originated from ReadProcessMemory)’
Traceback (most recent call last):[/quote]

Perhaps it isn’t WebPageTest’s issue but I figured I’d ask. Another thing I’ve noticed is that even with the working tests, I don’t think I’ve ever seen a video link work. I’m curious if that also has something to do with what’s going on with the readprocessmemory.

The closest thing to this issue was something resolved here:
https://github.com/WPO-Foundation/wptagent/issues/217
But it’s still not the same.

Seemingly resolved the problem:

I replaced the FFMPEG that was installed with ImageMagick. It was mentioned in the install documentation but I had seen it run without it plenty of times so I had assumed that wouldn’t be the issue. The batch file I’m also no longer running as admin just in case that tip mattered.

Now I need to figure out how to make webpagetest not close every browser (just Chrome and Firefox).