You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
at org.openqa.selenium.remote.ErrorHandler$FrameInfoToStackFrame.apply(ErrorHandler.java:297)
at org.openqa.selenium.remote.ErrorHandler$FrameInfoToStackFrame.apply(ErrorHandler.java:1)
at com.google.common.collect.Iterators$8.next(Iterators.java:782)
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:644)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
at com.google.common.collect.Lists.newArrayList(Lists.java:138)
at com.google.common.collect.Iterables.toCollection(Iterables.java:312)
at com.google.common.collect.Iterables.toArray(Iterables.java:290)
at org.openqa.selenium.remote.ErrorHandler.rebuildServerError(ErrorHandler.java:270)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:118)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:269)
at org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:172)
at org.openqa.selenium.remote.RemoteWebElement.findElementById(RemoteWebElement.java:205)
at org.openqa.selenium.By$ById.findElement(By.java:215)
at org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:168)
From looking at some of the agents' source, it seems possible that sometimes a stack frame might contain lineNumber = "" (empty string) or even lineNumber = "Not available", which could explain the above CCE.
ErrorHandler$FrameInfoToStackFrame.apply should be more defensive when pulling LINE_NUMBER from the map. It also currently bails-out with no info if the line number is absent, whereas it seems reasonable that it could create a stack frame with line number = -1, negative (but not -2 == in-native) being conventional for unknown per java.lang.StackTraceElement.
The text was updated successfully, but these errors were encountered:
javabrett
added a commit
to javabrett/selenium
that referenced
this issue
Jun 10, 2015
…eNumber, and also attempts to safely parse a non-Number Object if it receives a non-Number.
If absent or non-numeric it now continues to build the StackTraceElement (instead of aborting that frame) and uses the conventional -1 for lineNumber.
Signed-off-by: Brett Randall <[email protected]>
…nd also attempts to safely parse a non-Number Object if it receives a non-Number.
If absent or non-numeric it now continues to build the StackTraceElement (instead of aborting that frame) and uses the conventional -1 for lineNumber.
Signed-off-by: Alexei Barantsev <[email protected]>
Selenium 2.46.0, Firefox 38.0.5.
Saw this exception during a test:
From looking at some of the agents' source, it seems possible that sometimes a stack frame might contain
lineNumber = ""
(empty string) or evenlineNumber = "Not available"
, which could explain the above CCE.ErrorHandler$FrameInfoToStackFrame.apply
should be more defensive when pullingLINE_NUMBER
from the map. It also currently bails-out with no info if the line number is absent, whereas it seems reasonable that it could create a stack frame with line number = -1, negative (but not -2 == in-native) being conventional for unknown perjava.lang.StackTraceElement
.The text was updated successfully, but these errors were encountered: