-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stderr is not a pipe (Mac OS) #59
Comments
I cannot reproduce this, can you pls use |
It seems like an error happens when trying to report the original error :/, which is "Cannot start phantom.js, or cannot connect to it". So please check where phantom.js is installed, and that you can use it. You can use |
I did not use webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe. Created on 2020-08-14 by the reprex package (v0.3.0)
|
I also have this issue: webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe. Created on 2020-09-01 by the reprex package (v0.3.0) Session infodevtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os macOS Mojave 10.14.6
#> system x86_64, darwin17.0
#> ui X11
#> language (EN)
#> collate en_AU.UTF-8
#> ctype en_AU.UTF-8
#> tz Australia/Sydney
#> date 2020-09-01
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.0)
#> backports 1.1.8 2020-06-17 [1] CRAN (R 4.0.0)
#> base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.0.0)
#> callr 3.4.3 2020-03-28 [1] CRAN (R 4.0.0)
#> cli 2.0.2 2020-02-28 [1] CRAN (R 4.0.0)
#> crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.0)
#> curl 4.3 2019-12-02 [1] CRAN (R 4.0.0)
#> debugme 1.1.0 2017-10-22 [1] CRAN (R 4.0.2)
#> desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.0)
#> devtools 2.3.0 2020-04-10 [1] CRAN (R 4.0.0)
#> digest 0.6.25 2020-02-23 [1] CRAN (R 4.0.0)
#> ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.0)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.0)
#> fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.0)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2)
#> glue 1.4.1 2020-05-13 [1] CRAN (R 4.0.0)
#> highr 0.8 2019-03-20 [1] CRAN (R 4.0.0)
#> htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.0)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2)
#> jsonlite 1.7.0 2020-06-25 [1] CRAN (R 4.0.1)
#> knitr 1.29 2020-06-23 [1] CRAN (R 4.0.2)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.0)
#> memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.0)
#> pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.2)
#> pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.0)
#> png 0.1-7 2013-12-03 [1] CRAN (R 4.0.0)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.0)
#> processx 3.4.3 2020-07-05 [1] CRAN (R 4.0.2)
#> ps 1.3.3 2020-05-08 [1] CRAN (R 4.0.0)
#> R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.0)
#> remotes 2.1.1 2020-02-15 [1] CRAN (R 4.0.0)
#> rlang 0.4.7 2020-07-09 [1] CRAN (R 4.0.1)
#> rmarkdown 2.3 2020-06-18 [1] CRAN (R 4.0.0)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 4.0.0)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.0)
#> showimage 1.0.0 2018-01-24 [1] CRAN (R 4.0.2)
#> stringi 1.4.6 2020-02-17 [1] CRAN (R 4.0.0)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.0)
#> testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.0)
#> usethis 1.6.1 2020-04-29 [1] CRAN (R 4.0.0)
#> webdriver 1.0.5 2018-04-11 [1] CRAN (R 4.0.2)
#> withr 2.2.0 2020-04-20 [1] CRAN (R 4.0.0)
#> xfun 0.16 2020-07-24 [1] CRAN (R 4.0.2)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.0)
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library |
But it's weird, because it does work sometimes. Here's a sample of 20: webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25288.
#>
#> $port
#> [1] 8431
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25290.
#>
#> $port
#> [1] 7912
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25291.
#>
#> $port
#> [1] 6088
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25292.
#>
#> $port
#> [1] 6142
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25293.
#>
#> $port
#> [1] 3271
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25294.
#>
#> $port
#> [1] 4026
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25295.
#>
#> $port
#> [1] 5722
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe.
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25297.
#>
#> $port
#> [1] 3331
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25298.
#>
#> $port
#> [1] 5912
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25299.
#>
#> $port
#> [1] 5187
webdriver::run_phantomjs()
#> $process
#> PROCESS 'phantomjs', running, pid 25300.
#>
#> $port
#> [1] 5319
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe.
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe.
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe.
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe.
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe.
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe.
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe.
webdriver::run_phantomjs()
#> Error in process_get_error_connection(self, private): stderr is not a pipe. Created on 2020-09-02 by the reprex package (v0.3.0) Session infodevtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os macOS Mojave 10.14.6
#> system x86_64, darwin17.0
#> ui X11
#> language (EN)
#> collate en_AU.UTF-8
#> ctype en_AU.UTF-8
#> tz Australia/Sydney
#> date 2020-09-02
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.0)
#> backports 1.1.8 2020-06-17 [1] CRAN (R 4.0.0)
#> base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.0.0)
#> callr 3.4.3 2020-03-28 [1] CRAN (R 4.0.0)
#> cli 2.0.2 2020-02-28 [1] CRAN (R 4.0.0)
#> crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.0)
#> curl 4.3 2019-12-02 [1] CRAN (R 4.0.0)
#> debugme 1.1.0 2017-10-22 [1] CRAN (R 4.0.2)
#> desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.0)
#> devtools 2.3.0 2020-04-10 [1] CRAN (R 4.0.0)
#> digest 0.6.25 2020-02-23 [1] CRAN (R 4.0.0)
#> ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.0)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.0)
#> fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.0)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2)
#> glue 1.4.1 2020-05-13 [1] CRAN (R 4.0.0)
#> highr 0.8 2019-03-20 [1] CRAN (R 4.0.0)
#> htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.0)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2)
#> jsonlite 1.7.0 2020-06-25 [1] CRAN (R 4.0.1)
#> knitr 1.29 2020-06-23 [1] CRAN (R 4.0.2)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.0)
#> memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.0)
#> pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.2)
#> pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.0)
#> png 0.1-7 2013-12-03 [1] CRAN (R 4.0.0)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.0)
#> processx 3.4.3 2020-07-05 [1] CRAN (R 4.0.2)
#> ps 1.3.3 2020-05-08 [1] CRAN (R 4.0.0)
#> R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.0)
#> remotes 2.1.1 2020-02-15 [1] CRAN (R 4.0.0)
#> rlang 0.4.7 2020-07-09 [1] CRAN (R 4.0.1)
#> rmarkdown 2.3 2020-06-18 [1] CRAN (R 4.0.0)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 4.0.0)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.0)
#> showimage 1.0.0 2018-01-24 [1] CRAN (R 4.0.2)
#> stringi 1.4.6 2020-02-17 [1] CRAN (R 4.0.0)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.0)
#> testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.0)
#> usethis 1.6.1 2020-04-29 [1] CRAN (R 4.0.0)
#> webdriver 1.0.5 2018-04-11 [1] CRAN (R 4.0.2)
#> withr 2.2.0 2020-04-20 [1] CRAN (R 4.0.0)
#> xfun 0.16 2020-07-24 [1] CRAN (R 4.0.2)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.0)
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library I thought the ports might be relevant, but I still got the error after rewriting the function with a fixed port that previously worked. |
@wlandau @shirdekel Can you try installing #60? (E.g. with |
Here is what Error in webdriver::run_phantomjs() :
Cannot start phantom.js, or cannot connect to it. stdout + stderr:
> [INFO - 2020-09-05T18:26:46.690Z] GhostDriver - Main - running on port 5480 |
I get this:
|
@shirdekel Does @wlandau So it seems that phantom is running, actually. Do you have a local firewall that prevents connections? |
Yes, I do have a local firewall. It does apparently allow incoming connections from phantom, but I do not know about outgoing ones. My work's installation of Mac OS does not allow me to change these settings. |
@wlandau R must be able to connect to phantom, on the port that is randomly selected. If it cannot connect, then there is no way to run webdriver, I am afraid. You can try to run phantom from the terminal:
and then connect to http://127.0.0.1:8910 from a browser, or from R: ❯ httr::GET("http://127.0.0.1:8910/")
Response [http://127.0.0.1:8910/]
Date: 2020-09-08 13:22
Status: 404
Content-Type: text/plain
Size: 467 B If port 8910 works, then you can try with a port returned by |
I got a 503 from > httr::GET("http://127.0.0.1:8910/")
Response [http://40.26.201.184/]
Date: 2020-09-08 14:10
Status: 503
Content-Type: text/html; charset=utf-8
Size: 2.06 kB
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Website issue</title>
<style type="text/css">
* { margin:0; padding:0; }
body { background:#dbe0e6; text-align:center; }
#main_container { margin:20px auto; width:500px; }
#header { height:75px; border-bottom:1px solid #dbe0e6; }
#content_container { float:left; margin-top:-5px; background:#ffffff; }
#image { width:168px; padding:2px 2px 2px 2px; text-align:center; backgroun...
#content { padding-top:15px; width:328px; float:right; text-align:left; }
... What do you think about a slightly more verbose error message that mentions |
So is http://40.26.201.184 your proxy server? Maybe you can turn that off somehow? At least 127.0.0.1 should not go to a proxy. Yeah, the error should be improved. |
It could be, I am not sure. But just knowing this is a firewall or proxy issue helps a ton and lets me find workarounds. Seems to me like an improved error message is sufficient to close the issue. |
Yes to both. I followed your instructions for @wlandau and got the following:
But I subsequently got the following error in terminal:
|
@shirdekel Try to install a newer/different phantomjs version. You can also install it with |
@gaborcsardi I did, and still am getting this error sometimes. It might be dependent on something in my R process because I have periods of time in which there is no error, and then suddenly I only get this error. After restarting R it works fine. I guess I'll keep monitoring it and update if I can identify a cause on my end. |
I have the same error and nothing worked so far, to solve it. :( |
https://github.com/InseeFr/disaggR/runs/1439024221 |
I got it solved. It had to do with the .Renviron file which set http-Proxys which were not suitable with phantomjs. |
@gaborcsardi So would it help to have It seems like there could be two problems:
I guess it's not clear to me which problem people are running into here. |
Having to choose a port is unfortunate, the OS should provide an available one, but apparently phantom does not support that. Nevertheless a port number clash should be quite rare. I would guess that the proxy and the firewall issues are more common. We can probably try to detect them. |
If I understand correctly, this error happens when there's a problem starting phantomjs, which is probably due to problems opening the port:
This error would also indicate a problem starting, but we don't seem to actually see anyone reporting this error:
This error would indicate that phantomjs started, but there was a problem connecting to it, likely due to a firewall or proxy:
Is that right? If that's the correct, then maybe we should change the second message to:
|
I get a strange error when I try to run PhantomJS through
webdriver
on Mac OS. The same code seems to run without error on Linux. Related: rstudio/shinytest#259.The text was updated successfully, but these errors were encountered: