Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Failed: EPIPE write EPIPE with ElementArrayFinder.map and SELENIUM_PROMISE_MANAGER:false #4507

@wvanderdeijl

Description

@wvanderdeijl

We have intermittent errors Error: EPIPE write EPIPE when using the map function of ElementArrayFinder when SELENIUM_PROMISE_MANAGER is set to false. I have the feeling this is caused by the multiple (async) map callbacks being run in parallel which freaks webdriver out. With SELENIUM_PROMISE_MANAGER set to false the Promise.all construction in ElementArrayFinder.map will run the commands concurrently.

Having SELENIUM_PROMISE_MANAGER to true ensures all map functions are executed one at a time as each command waits for the previous promise to resolve.

You can see a test case at wvanderdeijl/protractor-mcve@24aa9de

The exception we get is:

    Error: EPIPE write EPIPE
        at ClientRequest.<anonymous> (/Users/wilfred/git/protractor-mcve/node_modules/selenium-webdriver/http/index.js:238:15)
        at emitOne (events.js:115:13)
        at ClientRequest.emit (events.js:210:7)
        at Socket.socketErrorListener (_http_client.js:401:9)
        at emitOne (events.js:115:13)
        at Socket.emit (events.js:210:7)
        at onwriteError (_stream_writable.js:406:12)
        at onwrite (_stream_writable.js:428:5)
        at _destroy (internal/streams/destroy.js:39:7)
        at Socket._destroy (net.js:552:3)Error
        at ElementArrayFinder.applyAction_ (/Users/wilfred/git/protractor-mcve/node_modules/protractor/lib/element.ts:482:23)
        at ElementArrayFinder.(anonymous function).args [as getText] (/Users/wilfred/git/protractor-mcve/node_modules/protractor/lib/element.ts:96:21)
        at ElementFinder.(anonymous function).args [as getText] (/Users/wilfred/git/protractor-mcve/node_modules/protractor/lib/element.ts:873:14)
        at element.all.map.elem (/Users/wilfred/git/protractor-mcve/example_spec.js:4:73)
        at arr.map (/Users/wilfred/git/protractor-mcve/node_modules/protractor/lib/element.ts:657:25)
        at Array.map (<anonymous>)
        at asElementFinders_.then (/Users/wilfred/git/protractor-mcve/node_modules/protractor/lib/element.ts:656:22)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)

Not sure if the issue is OS or browser dependent. We use MacOS 10.13 (High Sierra), Chrome 61.0.3163.100 (both headless and normal), Node 8.4.0, Protractor 5.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions