Skip to content

Extra information from UnhandledWebDriverError #6

@rkaiser0324

Description

@rkaiser0324

With the arrival of Firefox 8, I'm getting an UnhandledWebDriverError. At least in my case, there's no message associated with the exception. I added some extra debug code to WebDriverBase::curl and find that there's a bunch of extra info in the JSON that comes back from Selenium:

Array
(
    [sessionId] =>
    [status] => 13
    [value] => Array
        (
            [message] =>
            [localizedMessage] =>
            [cause] =>
            [class] => java.lang.NullPointerException
            [hCode] => 22543186
            [stackTrace] => Array
                (
                    [0] => Array
                        (
                            [fileName] => CapabilitiesComparator.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 147
                            [className] => org.openqa.selenium.remote.server.CapabilitiesComparator$FuzzyPlatformScorer
                            [nativeMethod] =>
                            [methodName] => score
                            [hCode] => -1481158125
                        )

                    [1] => Array
                        (
                            [fileName] => CapabilitiesComparator.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 1
                            [className] => org.openqa.selenium.remote.server.CapabilitiesComparator$FuzzyPlatformScorer
                            [nativeMethod] =>
                            [methodName] => score
                            [hCode] => -1481158271
                        )

                    [2] => Array
                        (
                            [fileName] => CapabilitiesComparator.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 89
                            [className] => org.openqa.selenium.remote.server.CapabilitiesComparator$5
                            [nativeMethod] =>
                            [methodName] => compare
                            [hCode] => 1824282868
                        )

                    [3] => Array
                        (
                            [fileName] => CapabilitiesComparator.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 1
                            [className] => org.openqa.selenium.remote.server.CapabilitiesComparator$5
                            [nativeMethod] =>
                            [methodName] => compare
                            [hCode] => 1824282780
                        )

                    [4] => Array
                        (
                            [fileName] => CompoundOrdering.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 48
                            [className] => com.google.common.collect.CompoundOrdering
                            [nativeMethod] =>
                            [methodName] => compare
                            [hCode] => -454389178
                        )

                    [5] => Array
                        (
                            [fileName] => CapabilitiesComparator.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 107
                            [className] => org.openqa.selenium.remote.server.CapabilitiesComparator
                            [nativeMethod] =>
                            [methodName] => compare
                            [hCode] => -137231881
                        )

                    [6] => Array
                        (
                            [fileName] => CapabilitiesComparator.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 1
                            [className] => org.openqa.selenium.remote.server.CapabilitiesComparator
                            [nativeMethod] =>
                            [methodName] => compare
                            [hCode] => -137231987
                        )

                    [7] => Array
                        (
                            [fileName] => ComparatorOrdering.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 40
                            [className] => com.google.common.collect.ComparatorOrdering
                            [nativeMethod] =>
                            [methodName] => compare
                            [hCode] => -1149190690
                        )

                    [8] => Array
                        (
                            [fileName] => Ordering.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 637
                            [className] => com.google.common.collect.Ordering
                            [nativeMethod] =>
                            [methodName] => max
                            [hCode] => 2059421298
                        )

                    [9] => Array
                        (
                            [fileName] => Ordering.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 595
                            [className] => com.google.common.collect.Ordering
                            [nativeMethod] =>
                            [methodName] => max
                            [hCode] => 2059421256
                        )

                    [10] => Array
                        (
                            [fileName] => CapabilitiesComparator.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 103
                            [className] => org.openqa.selenium.remote.server.CapabilitiesComparator
                            [nativeMethod] =>
                            [methodName] => getBestMatch
                            [hCode] => -931133671
                        )

                    [11] => Array
                        (
                            [fileName] => DefaultDriverFactory.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 44
                            [className] => org.openqa.selenium.remote.server.DefaultDriverFactory
                            [nativeMethod] =>
                            [methodName] => getBestMatchFor
                            [hCode] => -1768462927
                        )

                    [12] => Array
                        (
                            [fileName] => DefaultDriverFactory.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 54
                            [className] => org.openqa.selenium.remote.server.DefaultDriverFactory
                            [nativeMethod] =>
                            [methodName] => newInstance
                            [hCode] => -1365021422
                        )

                    [13] => Array
                        (
                            [fileName] => DefaultSession.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 177
                            [className] => org.openqa.selenium.remote.server.DefaultSession$BrowserCreator
                            [nativeMethod] =>
                            [methodName] => call
                            [hCode] => 2056168426
                        )

                    [14] => Array
                        (
                            [fileName] => DefaultSession.java
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => 1
                            [className] => org.openqa.selenium.remote.server.DefaultSession$BrowserCreator
                            [nativeMethod] =>
                            [methodName] => call
                            [hCode] => 2056168250
                        )

                    [15] => Array
                        (
                            [fileName] =>
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => -1
                            [className] => java.util.concurrent.FutureTask$Sync
                            [nativeMethod] =>
                            [methodName] => innerRun
                            [hCode] => 1144956884
                        )

                    [16] => Array
                        (
                            [fileName] =>
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => -1
                            [className] => java.util.concurrent.FutureTask
                            [nativeMethod] =>
                            [methodName] => run
                            [hCode] => 424519275
                        )

                    [17] => Array
                        (
                            [fileName] =>
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => -1
                            [className] => java.util.concurrent.ThreadPoolExecutor$Worker
                            [nativeMethod] =>
                            [methodName] => runTask
                            [hCode] => -1076768003
                        )

                    [18] => Array
                        (
                            [fileName] =>
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => -1
                            [className] => java.util.concurrent.ThreadPoolExecutor$Worker
                            [nativeMethod] =>
                            [methodName] => run
                            [hCode] => -166011880
                        )

                    [19] => Array
                        (
                            [fileName] =>
                            [class] => java.lang.StackTraceElement
                            [lineNumber] => -1
                            [className] => java.lang.Thread
                            [nativeMethod] =>
                            [methodName] => run
                            [hCode] => 1432591020
                        )

                )

        )

    [class] => org.openqa.selenium.remote.Response
    [hCode] => 7578443
)

I'm enough of php noob that I need to do some homework to figure out a good way of making this information available from either WebDriverException or perhaps just UnhandledWebDriverError if that's more appropriate, but I bet you know a good way.

Do you agree this would be helpful? Any pointers on how to pull it off are greatly appreciated...or even a patch that takes care of it :)

Thanks much.

-DB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions