IE error not being excluded
Opened this issue · 2 comments
I'm getting this fail when running on saucelabs IE 11, windows 10:
Fail: protractor-console-plugin Plugin Tests
Failure during teardown: Command not found: POST /session/XXXXXXXX-XXXX-XXXX-XXXX-XXXX49177dd1/log
Command duration or timeout: 16 milliseconds
Build info: version: '2.48.0', revision: 'b7b081a', time: '2015-10-07 15:48:56'
System info: host: 'WIN-SB3ER6JQ6ME', ip: '172.20.37.62', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_51'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, pageLoadStrategy=normal, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=about:blank, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]
Session ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXX49177dd1
UnknownError: Command not found: POST /session/XXXXXXXX-XXXX-XXXX-XXXX-XXXX49177dd1/log
Command duration or timeout: 16 milliseconds
Build info: version: '2.48.0', revision: 'b7b081a', time: '2015-10-07 15:48:56'
System info: host: 'WIN-SB3ER6JQ6ME', ip: '172.20.37.62', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_51'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, pageLoadStrategy=normal, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=about:blank, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]
Session ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXX49177dd1
at new bot.Error (/home/dclifford/git/admin-portal/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
at Object.bot.response.checkResponse (/home/dclifford/git/admin-portal/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
at /home/dclifford/git/admin-portal/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:379:20
at [object Object].promise.Promise.goog.defineClass.invokeCallback_ (/home/dclifford/git/admin-portal/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1337:14)
at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_.execute_ (/home/dclifford/git/admin-portal/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2776:14)
at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_ (/home/dclifford/git/admin-portal/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2758:21)
at goog.async.run.processWorkQueue (/home/dclifford/git/admin-portal/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:124:15)
at process._tickCallback (node.js:366:9)
For whatever reason the exclude array is not properly excluding this log. Here's what I've tried so far in the exclude array of my config file:
'Command not found: POST /session/'
/Command not found: POST \/session\/
RegExp("Command not found: POST /session/")
RegExp(".\*Command not found: POST /session/.\*")
I tried debugging, but I can't seem to figure out what's going on. Any suggestions on how to fix this, or how I would go about debugging this plugin to see why exactly this is getting through the regex match?
I tried debugging by doing this (and several variations of trying to print things out, etc), but nothing seems to work:
ConsolePlugin.includeLog = function(logMessage) {
//return ConsolePlugin.exclude.filter(function(e) {
// return (e instanceof RegExp) ? logMessage.match(e) :
// logMessage.indexOf(e) > -1;
//}).length === 0;
return ConsolePlugin.exclude.filter(function(e) {
return (e instanceof RegExp) ?
(! e.test(logMessage)) :
((logMessage.indexOf(e) > -1).length === 0);
});
};
I should also note, this error is being generated in the very last step of saucelabs, and not a POST that is being done by my web application, or manually through protractor. But saucelabs appears to force it on each run in the console.
Thanks!
I may look into this, but please note that at the moment only Chrome is supported for this plugin.
Thanks!
If you need anything from me (testing something on my end or something) just let me know and I'm happy to help.