Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Failed: TypeError: Cannot read property 'GET_LOG' of undefined #12

Open
usherfu opened this issue Feb 18, 2016 · 4 comments
Open

Failed: TypeError: Cannot read property 'GET_LOG' of undefined #12

usherfu opened this issue Feb 18, 2016 · 4 comments

Comments

@usherfu
Copy link

usherfu commented Feb 18, 2016

On Windows encounter following error when executing ".\node_modules.bin\protractor protractor.conf.js"

Failures:

  1. deep tree baseline should be fast!
    Message:
    Failed: TypeError: Cannot read property 'GET_LOG' of undefined
    Stack:
    Error: TypeError: Cannot read property 'GET_LOG' of undefined
    at proxyDone.fail (C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasminewd2\index.js:89:34)
    at promiseReactionJob (C:\D\Dev\benchpress-tree-master\node_modules\benchpress\node_modules\es6-shim\es6-shim.js:1920:27)
    at Immediate._onImmediate (C:\D\Dev\benchpress-tree-master\node_modules\benchpress\node_modules\es6-shim\es6-shim.js:1933:11)
    From: Task: Run it("should be fast!") in control flow
    at Object. (C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasminewd2\index.js:81:14)
    at attemptAsync (C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1819:24)
    at QueueRunner.run (C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1774:9)
    at C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1801:16
    at C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1745:9
    at C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasminewd2\index.js:18:5
    at Array.forEach (native)
    From asynchronous test:
    Error
    at Suite. (C:\D\Dev\benchpress-tree-master\tree_benchmark.spec.js:16:3)
    at addSpecsToSuite (C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:743:25)
    at Env.describe (C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:713:7)
    at jasmineInterface.describe (C:\D\Dev\benchpress-tree-master\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:3219:18)
    at Object. (C:\D\Dev\benchpress-tree-master\tree_benchmark.spec.js:15:1)

1 spec, 1 failure
Finished in 4.569 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1

C:\D\Dev\benchpress-tree-master>

@hitigon
Copy link

hitigon commented Mar 2, 2016

you might have a wrong version of selenium-webdriver, try to reinstall your packages by NPM

@Andre-H
Copy link

Andre-H commented Apr 1, 2016

Exactly the same error. Also
$ npm view selenium-webdriver version
2.53.1
Update: Downgraded to [email protected] and it worked.

@thompsnm
Copy link

thompsnm commented Apr 1, 2016

I'm getting the same issue. Looks like this is a bug in Benchpress itself to me, it appears to be failing at this line.

It appears the interface changed on webdriver somewhere between 2.48.2 and 2.52.0 to no longer expose CommandName. I added a log statement just before the offending line to see what is available on webdriver. Here's what I saw:

// 2.48.2

{ ActionSequence: { [Function] checkModifierKey_: [Function] },
  Builder: [Function],
  By:
   Object {
     className: [Function],
     css: [Function],
     id: [Function],
     linkText: [Function],
     js: [Function],
     name: [Function],
     partialLinkText: [Function],
     tagName: [Function],
     xpath: [Function] },
  Capabilities:
   { [Function]
     superClass_: Object { serialize: [Function] },
     base: [Function],
     android: [Function],
     chrome: [Function],
     firefox: [Function],
     ie: [Function],
     ipad: [Function],
     iphone: [Function],
     opera: [Function],
     phantomjs: [Function],
     safari: [Function],
     htmlunit: [Function],
     htmlunitwithjs: [Function] },
  Command: [Function],
  EventEmitter: [Function],
  FileDetector: [Function],
  Serializable: [Function],
  Session: [Function],
  WebDriver:
   { [Function]
     attachToSession: [Function],
     createSession: [Function],
     acquireSession_: [Function],
     toWireValue_: [Function],
     fromWireValue_: [Function],
     executeCommand_: [Function],
     Navigation: [Function],
     Options: [Function],
     Timeouts: [Function],
     Window: [Function],
     Logs: [Function],
     TargetLocator: [Function] },
  WebElement:
   { [Function]
     superClass_: Object { serialize: [Function] },
     base: [Function],
     ELEMENT_KEY: 'ELEMENT',
     equals: [Function] },
  WebElementPromise:
   { [Function]
     superClass_:
      Object {
        constructor: [Object],
        getDriver: [Function],
        getId: [Function],
        getRawId: [Function],
        serialize: [Function],
        schedule_: [Function],
        findElement: [Function],
        isElementPresent: [Function],
        findElements: [Function],
        click: [Function],
        sendKeys: [Function],
        getTagName: [Function],
        getCssValue: [Function],
        getAttribute: [Function],
        getText: [Function],
        getSize: [Function],
        getLocation: [Function],
        isEnabled: [Function],
        isSelected: [Function],
        submit: [Function],
        clear: [Function],
        isDisplayed: [Function],
        getOuterHtml: [Function],
        getInnerHtml: [Function] },
     base: [Function] },
  Browser: [Getter],
  Button: [Getter],
  Capability: [Getter],
  CommandName: [Getter],
  Key: [Getter],
  error: [Getter],
  logging: [Getter],
  promise: [Getter],
  stacktrace: [Getter],
  until: [Getter] }
// 2.52.0

{ ActionSequence: [Function: ActionSequence],
  Browser:
   { ANDROID: 'android',
     CHROME: 'chrome',
     EDGE: 'MicrosoftEdge',
     FIREFOX: 'firefox',
     IE: 'internet explorer',
     INTERNET_EXPLORER: 'internet explorer',
     IPAD: 'iPad',
     IPHONE: 'iPhone',
     OPERA: 'opera',
     PHANTOM_JS: 'phantomjs',
     SAFARI: 'safari',
     HTMLUNIT: 'htmlunit' },
  Builder: [Function: Builder],
  Button: { LEFT: 0, MIDDLE: 1, RIGHT: 2 },
  By:
   [Function: name(name) {
       return By.css('*[name="' + escapeCss(name) + '"]');
     }],
  Capabilities: [Function: Capabilities],
  Capability:
   { ACCEPT_SSL_CERTS: 'acceptSslCerts',
     BROWSER_NAME: 'browserName',
     ELEMENT_SCROLL_BEHAVIOR: 'elementScrollBehavior',
     HANDLES_ALERTS: 'handlesAlerts',
     LOGGING_PREFS: 'loggingPrefs',
     NATIVE_EVENTS: 'nativeEvents',
     PLATFORM: 'platform',
     PROXY: 'proxy',
     ROTATABLE: 'rotatable',
     SECURE_SSL: 'secureSsl',
     SUPPORTS_APPLICATION_CACHE: 'applicationCacheEnabled',
     SUPPORTS_CSS_SELECTORS: 'cssSelectorsEnabled',
     SUPPORTS_JAVASCRIPT: 'javascriptEnabled',
     SUPPORTS_LOCATION_CONTEXT: 'locationContextEnabled',
     TAKES_SCREENSHOT: 'takesScreenshot',
     UNEXPECTED_ALERT_BEHAVIOR: 'unexpectedAlertBehavior',
     VERSION: 'version' },
  EventEmitter: [Function: EventEmitter],
  FileDetector: [Function: FileDetector],
  Key:
   { NULL: '',
     CANCEL: '',
     HELP: '',
     BACK_SPACE: '',
     TAB: '',
     CLEAR: '',
     RETURN: '',
     ENTER: '',
     SHIFT: '',
     CONTROL: '',
     ALT: '',
     PAUSE: '',
     ESCAPE: '',
     SPACE: '',
     PAGE_UP: '',
     PAGE_DOWN: '',
     END: '',
     HOME: '',
     ARROW_LEFT: '',
     LEFT: '',
     ARROW_UP: '',
     UP: '',
     ARROW_RIGHT: '',
     RIGHT: '',
     ARROW_DOWN: '',
     DOWN: '',
     INSERT: '',
     DELETE: '',
     SEMICOLON: '',
     EQUALS: '',
     NUMPAD0: '',
     NUMPAD1: '',
     NUMPAD2: '',
     NUMPAD3: '',
     NUMPAD4: '',
     NUMPAD5: '',
     NUMPAD6: '',
     NUMPAD7: '',
     NUMPAD8: '',
     NUMPAD9: '',
     MULTIPLY: '',
     ADD: '',
     SEPARATOR: '',
     SUBTRACT: '',
     DECIMAL: '',
     DIVIDE: '',
     F1: '',
     F2: '',
     F3: '',
     F4: '',
     F5: '',
     F6: '',
     F7: '',
     F8: '',
     F9: '',
     F10: '',
     F11: '',
     F12: '',
     COMMAND: '',
     META: '',
     chord: [Function] },
  Session: [Function: Session],
  WebDriver: [Function: WebDriver],
  WebElement: [Function: WebElement],
  WebElementPromise: [Function: WebElementPromise],
  error:
   { ErrorCode:
      { SUCCESS: 0,
        NO_SUCH_ELEMENT: 7,
        NO_SUCH_FRAME: 8,
        UNKNOWN_COMMAND: 9,
        UNSUPPORTED_OPERATION: 9,
        STALE_ELEMENT_REFERENCE: 10,
        ELEMENT_NOT_VISIBLE: 11,
        INVALID_ELEMENT_STATE: 12,
        UNKNOWN_ERROR: 13,
        ELEMENT_NOT_SELECTABLE: 15,
        JAVASCRIPT_ERROR: 17,
        XPATH_LOOKUP_ERROR: 19,
        TIMEOUT: 21,
        NO_SUCH_WINDOW: 23,
        INVALID_COOKIE_DOMAIN: 24,
        UNABLE_TO_SET_COOKIE: 25,
        UNEXPECTED_ALERT_OPEN: 26,
        NO_SUCH_ALERT: 27,
        SCRIPT_TIMEOUT: 28,
        INVALID_ELEMENT_COORDINATES: 29,
        IME_NOT_AVAILABLE: 30,
        IME_ENGINE_ACTIVATION_FAILED: 31,
        INVALID_SELECTOR_ERROR: 32,
        SESSION_NOT_CREATED: 33,
        MOVE_TARGET_OUT_OF_BOUNDS: 34,
        SQL_DATABASE_ERROR: 35,
        INVALID_XPATH_SELECTOR: 51,
        INVALID_XPATH_SELECTOR_RETURN_TYPE: 52,
        METHOD_NOT_ALLOWED: 405 },
     WebDriverError: [Function: WebDriverError],
     ElementNotSelectableError: [Function: ElementNotSelectableError],
     ElementNotVisibleError: [Function: ElementNotVisibleError],
     InvalidArgumentError: [Function: InvalidArgumentError],
     InvalidCookieDomainError: [Function: InvalidCookieDomainError],
     InvalidElementCoordinatesError: [Function: InvalidElementCoordinatesError],
     InvalidElementStateError: [Function: InvalidElementStateError],
     InvalidSelectorError: [Function: InvalidSelectorError],
     InvalidSessionIdError: [Function: InvalidSessionIdError],
     JavascriptError: [Function: JavascriptError],
     MoveTargetOutOfBoundsError: [Function: MoveTargetOutOfBoundsError],
     NoSuchAlertError: [Function: NoSuchAlertError],
     NoSuchElementError: [Function: NoSuchElementError],
     NoSuchFrameError: [Function: NoSuchFrameError],
     NoSuchSessionError: [Function: NoSuchSessionError],
     NoSuchWindowError: [Function: NoSuchWindowError],
     ScriptTimeoutError: [Function: ScriptTimeoutError],
     SessionNotCreatedError: [Function: SessionNotCreatedError],
     StaleElementReferenceError: [Function: StaleElementReferenceError],
     TimeoutError: [Function: TimeoutError],
     UnableToSetCookieError: [Function: UnableToSetCookieError],
     UnableToCaptureScreenError: [Function: UnableToCaptureScreenError],
     UnexpectedAlertOpenError: [Function: UnexpectedAlertOpenError],
     UnknownCommandError: [Function: UnknownCommandError],
     UnknownMethodError: [Function: UnknownMethodError],
     UnsupportedOperationError: [Function: UnsupportedOperationError],
     checkResponse: [Function: checkResponse],
     checkLegacyResponse: [Function: checkLegacyResponse],
     encodeError: [Function: encodeError],
     throwDecodedError: [Function: throwDecodedError] },
  logging:
   { Entry: [Function: Entry],
     Level:
      { [Function: Level]
        OFF: [Object],
        SEVERE: [Object],
        WARNING: [Object],
        INFO: [Object],
        DEBUG: [Object],
        FINE: [Object],
        FINER: [Object],
        FINEST: [Object],
        ALL: [Object] },
     LogManager: [Function: LogManager],
     Logger: [Function: Logger],
     Preferences: [Function: Preferences],
     Type:
      { BROWSER: 'browser',
        CLIENT: 'client',
        DRIVER: 'driver',
        PERFORMANCE: 'performance',
        SERVER: 'server' },
     addConsoleHandler: [Function: addConsoleHandler],
     getLevel: [Function: getLevel],
     getLogger: [Function: getLogger],
     installConsoleHandler: [Function: installConsoleHandler],
     removeConsoleHandler: [Function: removeConsoleHandler] },
  promise:
   { CancellationError: [Function: CancellationError],
     ControlFlow: { [Function: ControlFlow] EventType: [Object] },
     Deferred: [Function: Deferred],
     MultipleUnhandledRejectionError: [Function: MultipleUnhandledRejectionError],
     Thenable: [Function: Thenable],
     Promise: [Function: ManagedPromise],
     all: [Function: all],
     asap: [Function: asap],
     captureStackTrace: [Function: captureStackTrace],
     checkedNodeCall: [Function: checkedNodeCall],
     consume: [Function: consume],
     controlFlow: [Function: controlFlow],
     createFlow: [Function: createFlow],
     defer: [Function: defer],
     delayed: [Function: delayed],
     filter: [Function: filter],
     fulfilled: [Function: fulfilled],
     fullyResolved: [Function: fullyResolved],
     isGenerator: [Function: isGenerator],
     isPromise: [Function: isPromise],
     map: [Function: map],
     rejected: [Function: rejected],
     setDefaultFlow: [Function: setDefaultFlow],
     thenFinally: [Function: thenFinally],
     when: [Function: when],
     LONG_STACK_TRACES: [Getter/Setter] },
  until:
   { Condition: [Function: Condition],
     WebElementCondition: [Function: WebElementCondition],
     ableToSwitchToFrame: [Function: ableToSwitchToFrame],
     alertIsPresent: [Function: alertIsPresent],
     titleIs: [Function: titleIs],
     titleContains: [Function: titleContains],
     titleMatches: [Function: titleMatches],
     elementLocated: [Function: elementLocated],
     elementsLocated: [Function: elementsLocated],
     stalenessOf: [Function: stalenessOf],
     elementIsVisible: [Function: elementIsVisible],
     elementIsNotVisible: [Function: elementIsNotVisible],
     elementIsEnabled: [Function: elementIsEnabled],
     elementIsDisabled: [Function: elementIsDisabled],
     elementIsSelected: [Function: elementIsSelected],
     elementIsNotSelected: [Function: elementIsNotSelected],
     elementTextIs: [Function: elementTextIs],
     elementTextContains: [Function: elementTextContains],
     elementTextMatches: [Function: elementTextMatches] } }

@HomeboxJim
Copy link

@Andre-H Can you explain how to downgrade selenium webdriver to a different version?

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

5 participants