aimmac23 / selenium-video-node

Code to add video recording capability to Selenium Nodes
Other
100 stars 35 forks source link

No Video content found for session id #62

Open phaseen opened 5 years ago

phaseen commented 5 years ago

i am not seeing any video with the session id : it gives me this error

Video content not found for sessionId: 17f855562601eac96f4800e022ed2ab6

And i dont see any error in the HUB/Node logs.

http://127.0.0.1:2800/grid/admin/HubVideoDownloadServlet/?sessionId=17f855562601eac96f4800e022ed2ab6

Hub logs:

java -cp C:\xxxxx\selenium-video-node-2.9.jar;C:\xxxx\selenium-server-standalone-3.141.59.jar org.openqa.grid.selenium.GridLauncherV3 -role hub -port 2800 -servlets com.aimmac23.hub.servlet.HubVideoDownloadServlet

15:56:04.814 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358 15:56:04.984 INFO [GridLauncherV3.lambda$buildLaunchers$5] - Launching Selenium Grid hub on port 2800 15:56:05.058 INFO [HubVideoRegistry.] - Using class com.aimmac23.hub.videostorage.LocalTempFileStore to store videos 15:56:05.060 INFO [HubVideoRegistry.] - Download wait timeout currently set to 20000 milliseconds 15:56:05.060 INFO [Hub.] - binding com.aimmac23.hub.servlet.HubVideoDownloadServlet to /grid/admin/HubVideoDownloadServlet/* 2019-10-22 15:56:05.443:INFO::main: Logging initialized @940ms to org.seleniumhq.jetty9.util.log.StdErrLog 15:56:06.222 INFO [Hub.start] - Selenium Grid hub is up and running 15:56:06.225 INFO [Hub.start] - Nodes should register to http://xxxxx:2800/grid/register/ 15:56:06.225 INFO [Hub.start] - Clients should connect to http://xxxxx:2800/wd/hub 15:56:11.704 WARN [RegistrationRequestCorrector$V3ConfigurationCorrector.fixupConfig] - Reducing 'maxSession' value to 1: Video node does not support concurrent sessions 15:56:11.707 WARN [RegistrationRequestCorrector.correctCapabilities] - Reducing maxInstances for browser firefox to 1: Video node does not support concurrent sessions 15:56:11.707 WARN [RegistrationRequestCorrector.correctCapabilities] - Reducing maxInstances for browser internet explorer to 1: Video node does not support concurrent sessions 15:56:11.708 WARN [RegistrationRequestCorrector.correctCapabilities] - Reducing maxInstances for browser chrome to 1: Video node does not support concurrent sessions 15:56:12.330 INFO [DefaultGridRegistry.add] - Registered a node http://xxxxx:2801 15:57:09.984 INFO [HubVideoDownloadServlet.doGet] - Received request for video that was not found. Requested sessionId: 17f855562601eac96f4800e022ed2ab6

Node Logs:

java -Dwebdriver.chrome.driver="D:\xxxxx\chromedriver.exe" -Dwebdriver.gecko.driver="C:\xxxx\geckodriver.exe" -Dwebdriver.ie.driver="C:\xxxx\IEDriverServer.exe" -cp selenium-video-node-2.9.jar;selenium-server-standalone-3.141.59.jar org.openqa.grid.selenium.GridLauncherV3 -servlets com.aimmac23.node.servlet.VideoRecordingControlServlet -proxy com.aimmac23.hub.proxy.VideoProxy -role node -hub http://localhost:2800/grid/register -browser "browserName=firefox, maxInstances=5, platform=ANY, seleniumProtocol=WebDriver" -browser "browserName=internet explorer, version=11, platform=WINDOWS, maxInstances=5" -browser "browserName=chrome,version=ANY,maxInstances=5,platform=WINDOWS" -port 2801 15:56:08.761 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358 15:56:08.892 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Launching a Selenium Grid node on port 2801 15:56:09.844 INFO [JnaLibraryLoader.init] - 32-bit JVM detected - loading 32-bit libraries 15:56:09.943 INFO [VideoRecordController.] - Will attempt to record at 15 frames per second - adjust this value by setting -Dvideo.framerate= 15:56:10.042 INFO [VideoRecordController.] - Using Java AWT Robot Screenshot Source 15:56:10.043 INFO [SelfRegisteringRemote.addExtraServlets] - binding com.aimmac23.node.servlet.VideoRecordingControlServlet to /extra/VideoRecordingControlServlet/* 2019-10-22 15:56:10.096:INFO::main: Logging initialized @1677ms to org.seleniumhq.jetty9.util.log.StdErrLog 15:56:10.444 INFO [WebDriverServlet.] - Initialising WebDriverServlet 15:56:10.565 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 2801 15:56:10.566 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Selenium Grid node is up and ready to register to the hub 15:56:10.812 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms. 15:56:11.503 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://localhost:2800/grid/register 15:56:12.313 INFO [VideoRecordController.resetRecording] - resetRecording called but not recording - nothing to do 15:56:12.331 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use 15:56:28.216 INFO [ActiveSessionFactory.apply] - Capabilities are: { "acceptSslCerts": true, "browserName": "chrome", "chromeOptions": { "args": [ "--no-sandbox", "--start-maximized", "--log", "debug" ], "w3c": false }, "javascriptEnabled": true, "locationContextEnabled": true, "name": "Test", "nativeEvents": true, "platform": "WINDOWS", "w3c": false, "webStorageEnabled": true } 15:56:28.219 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService) Starting ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865@{#442}) on port 22556 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. 15:56:31.082 INFO [ProtocolHandshake.createSession] - Detected dialect: OSS 15:56:31.590 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session 17f855562601eac96f4800e022ed2ab6 (org.openqa.selenium.chrome.ChromeDriverService) 15:56:53.315 INFO [ActiveSessions$1.onStop] - Removing session 17f855562601eac96f4800e022ed2ab6 (org.openqa.selenium.chrome.ChromeDriverService)

aimmac23 commented 5 years ago

Hi phaseen,

That looks a bit odd - I don't see any log lines on either the hub or the node to indicate it has started recording. Both the node and the hub have logged on startup, so the code is definitely there.

I'll try to reproduce it this weekend with the same version of Selenium.

On Wed, 23 Oct 2019, 00:37 phaseen, notifications@github.com wrote:

i am not seeing any video with the session id : it gives me this error

Video content not found for sessionId: 17f855562601eac96f4800e022ed2ab6

And i dont see any error in the HUB/Node logs.

http://127.0.0.1:2800/grid/admin/HubVideoDownloadServlet/?sessionId=17f855562601eac96f4800e022ed2ab6

Hub logs:

java -cp C:\xxxxx\selenium-video-node-2.9.jar;C:\xxxx\selenium-server-standalone-3.141.59.jar org.openqa.grid.selenium.GridLauncherV3 -role hub -port 2800 -servlets com.aimmac23.hub.servlet.HubVideoDownloadServlet

15:56:04.814 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358 15:56:04.984 INFO [GridLauncherV3.lambda$buildLaunchers$5] - Launching Selenium Grid hub on port 2800 15:56:05.058 INFO [HubVideoRegistry.] - Using class com.aimmac23.hub.videostorage.LocalTempFileStore to store videos 15:56:05.060 INFO [HubVideoRegistry.] - Download wait timeout currently set to 20000 milliseconds 15:56:05.060 INFO [Hub.] - binding com.aimmac23.hub.servlet.HubVideoDownloadServlet to /grid/admin/HubVideoDownloadServlet/* 2019-10-22 15:56:05.443:INFO::main: Logging initialized @940ms to org.seleniumhq.jetty9.util.log.StdErrLog 15:56:06.222 INFO [Hub.start] - Selenium Grid hub is up and running 15:56:06.225 INFO [Hub.start] - Nodes should register to http://xxxxx:2800/grid/register/ 15:56:06.225 INFO [Hub.start] - Clients should connect to http://xxxxx:2800/wd/hub 15:56:11.704 WARN [RegistrationRequestCorrector$V3ConfigurationCorrector.fixupConfig] - Reducing 'maxSession' value to 1: Video node does not support concurrent sessions 15:56:11.707 WARN [RegistrationRequestCorrector.correctCapabilities] - Reducing maxInstances for browser firefox to 1: Video node does not support concurrent sessions 15:56:11.707 WARN [RegistrationRequestCorrector.correctCapabilities] - Reducing maxInstances for browser internet explorer to 1: Video node does not support concurrent sessions 15:56:11.708 WARN [RegistrationRequestCorrector.correctCapabilities] - Reducing maxInstances for browser chrome to 1: Video node does not support concurrent sessions 15:56:12.330 INFO [DefaultGridRegistry.add] - Registered a node http://xxxxx:2801 15:57:09.984 INFO [HubVideoDownloadServlet.doGet] - Received request for video that was not found. Requested sessionId: 17f855562601eac96f4800e022ed2ab6

Node Logs:

java -Dwebdriver.chrome.driver="D:\xxxxx\chromedriver.exe" -Dwebdriver.gecko.driver="C:\xxxx\geckodriver.exe" -Dwebdriver.ie.driver="C:\xxxx\IEDriverServer.exe" -cp selenium-video-node-2.9.jar;selenium-server-standalone-3.141.59.jar org.openqa.grid.selenium.GridLauncherV3 -servlets com.aimmac23.node.servlet.VideoRecordingControlServlet -proxy com.aimmac23.hub.proxy.VideoProxy -role node -hub http://localhost:2800/grid/register -browser "browserName=firefox, maxInstances=5, platform=ANY, seleniumProtocol=WebDriver" -browser "browserName=internet explorer, version=11, platform=WINDOWS, maxInstances=5" -browser "browserName=chrome,version=ANY,maxInstances=5,platform=WINDOWS" -port 2801 15:56:08.761 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358 15:56:08.892 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Launching a Selenium Grid node on port 2801 15:56:09.844 INFO [JnaLibraryLoader.init] - 32-bit JVM detected - loading 32-bit libraries 15:56:09.943 INFO [VideoRecordController.] - Will attempt to record at 15 frames per second - adjust this value by setting -Dvideo.framerate= 15:56:10.042 INFO [VideoRecordController.] - Using Java AWT Robot Screenshot Source 15:56:10.043 INFO [SelfRegisteringRemote.addExtraServlets] - binding com.aimmac23.node.servlet.VideoRecordingControlServlet to /extra/VideoRecordingControlServlet/* 2019-10-22 15:56:10.096:INFO::main: Logging initialized @1677ms to org.seleniumhq.jetty9.util.log.StdErrLog 15:56:10.444 INFO [WebDriverServlet.] - Initialising WebDriverServlet 15:56:10.565 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 2801 15:56:10.566 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Selenium Grid node is up and ready to register to the hub 15:56:10.812 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms. 15:56:11.503 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://localhost:2800/grid/register 15:56:12.313 INFO [VideoRecordController.resetRecording] - resetRecording called but not recording - nothing to do 15:56:12.331 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use 15:56:28.216 INFO [ActiveSessionFactory.apply] - Capabilities are: { "acceptSslCerts": true, "browserName": "chrome", "chromeOptions": { "args": [ "--no-sandbox", "--start-maximized", "--log", "debug" ], "w3c": false }, "javascriptEnabled": true, "locationContextEnabled": true, "name": "Test", "nativeEvents": true, "platform": "WINDOWS", "w3c": false, "webStorageEnabled": true } 15:56:28.219 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService) Starting ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865@{#442}) on port 22556 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. 15:56:31.082 INFO [ProtocolHandshake.createSession] - Detected dialect: OSS 15:56:31.590 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session 17f855562601eac96f4800e022ed2ab6 (org.openqa.selenium.chrome.ChromeDriverService) 15:56:53.315 INFO [ActiveSessions$1.onStop] - Removing session 17f855562601eac96f4800e022ed2ab6 (org.openqa.selenium.chrome.ChromeDriverService)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aimmac23/selenium-video-node/issues/62?email_source=notifications&email_token=ABRCFH3H7C5UEIWWI5IIENDQP6FC3A5CNFSM4JDZZKEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HTVBKTQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRCFH6ETCP4FF4HXHAKRCDQP6FC3ANCNFSM4JDZZKEA .

phaseen commented 5 years ago

i am using nightwatch test, does it need special signals from test to Grid to start recording or should it do automatically?

what is the default path where it stores the videos?

navhan commented 4 years ago

Hi Alasdair, I'm getting the exact same issue, my logs on hub and node are identical, there's no message to indicate the start of the recording in the logs. I checked the hub and node for .webm files but none were found. I tried with the default temp storage class and the permanent video storage specifying a path on the hub but no video.

Do we need to specify the start of the recording somehow? From what i understand it's done automatically. Many thanks.