Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

incorrect error message when chrome fails to create a screenshot #4

Open
skwakman opened this issue Jun 5, 2015 · 1 comment
Open

Comments

@skwakman
Copy link
Contributor

skwakman commented Jun 5, 2015

In some cases chrome is not able to create a screenshot. This happens sometimes when a user is running a test and causes the managed browser to lose focus.

Currently, visualreview-protractor reports such errors as 'something went wrong while sending a screenshot'. This is misleading as something went wrong while creating a screenshot. This message should be corrected.

@RRMoelker
Copy link
Contributor

command: protractor conf.js

created run with ID 5
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
F

Failures:

  1) Protractor Demo App should have a title
   Message:
     Error: VisualReview-protractor: Something went wrong while sending a screenshot to the VisualReview server. UnknownError: unknown error: cannot take screenshot
from unknown error: Failed to capture tab: unknown error
JavaScript stack:
Error: Failed to capture tab: unknown error
    at checkForExtensionError (chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/background.js:14:17)
    at Object.callback (chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/background.js:37:5)
    at safeCallbackApply (extensions::sendRequest:21:15)
    at handleResponse (extensions::sendRequest:72:7)
  (Session info: chrome=43.0.2357.81)
  (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Mac OS X 10.10.2 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60 milliseconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'rBook', ip: '127.0.0.1', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.2', java.version: '1.7.0_75'
Session ID: d78eeeb03b5568ab591fc23573efec89
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=/var/folders/gj/9v9p7xqd30d77b9t743vgblc0000gp/T/.org.chromium.Chromium.kA2c84}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=43.0.2357.81, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]
   Stacktrace:
     Error: VisualReview-protractor: Something went wrong while sending a screenshot to the VisualReview server. UnknownError: unknown error: cannot take screenshot
from unknown error: Failed to capture tab: unknown error
JavaScript stack:
Error: Failed to capture tab: unknown error
    at checkForExtensionError (chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/background.js:14:17)
    at Object.callback (chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/background.js:37:5)
    at safeCallbackApply (extensions::sendRequest:21:15)
    at handleResponse (extensions::sendRequest:72:7)
  (Session info: chrome=43.0.2357.81)
  (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Mac OS X 10.10.2 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60 milliseconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'rBook', ip: '127.0.0.1', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.2', java.version: '1.7.0_75'
Session ID: d78eeeb03b5568ab591fc23573efec89
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=/var/folders/gj/9v9p7xqd30d77b9t743vgblc0000gp/T/.org.chromium.Chromium.kA2c84}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=43.0.2357.81, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]
    at <project_root>/node_modules/visualreview-protractor/visualreview-protractor.js:195:17
    at _rejected (<project_root>/node_modules/visualreview-protractor/node_modules/q/q.js:844:24)
    at <project_root>/node_modules/visualreview-protractor/node_modules/q/q.js:870:30
    at Promise.when (<project_root>/node_modules/visualreview-protractor/node_modules/q/q.js:1122:31)
    at Promise.promise.promiseDispatch (<project_root>/node_modules/visualreview-protractor/node_modules/q/q.js:788:41)
    at <project_root>/node_modules/visualreview-protractor/node_modules/q/q.js:604:44
    at runSingle (<project_root>/node_modules/visualreview-protractor/node_modules/q/q.js:137:13)
    at flush (<project_root>/node_modules/visualreview-protractor/node_modules/q/q.js:125:13)
    at process._tickCallback (node.js:355:11)
From: Task: <anonymous>
    at VisualReview.takeScreenshot (<project_root>/node_modules/visualreview-protractor/visualreview-protractor.js:166:41)
    at [object Object].<anonymous> (<project_root>/spec.js:9:8)
From: Task: Asynchronous test function: it()
Error
    at [object Object].<anonymous> (<project_root>/spec.js:5:3)
    at Object.<anonymous> (<project_root>/spec.js:4:1)

Finished in 1.536 seconds
1 test, 1 assertion, 1 failure

[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
test finished. Your results can be viewed at: http://localhost:7000/#/1/1/5/rp
[launcher] Process exited with error code 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants