Giter VIP home page Giter VIP logo

Comments (14)

jcheng5 avatar jcheng5 commented on August 10, 2024 1

@timcdlucas Yes, httr assumes port 1410 is free. If this happens again you can use sudo lsof -i :1410 (I think) to see what process is using it.

from httpuv.

yihui avatar yihui commented on August 10, 2024

Have you compared your library(httr); library(httpuv); sessionInfo() with that person?

from httpuv.

sckott avatar sckott commented on August 10, 2024

@yihui not yet, I'll ask

from httpuv.

sckott avatar sckott commented on August 10, 2024

Here's @timcdlucas session info

R version 3.1.1 (2014-07-10)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] httr_0.4

loaded via a namespace (and not attached):
[1] digest_0.6.4   httpuv_1.3.0   Rcpp_0.11.2    RCurl_1.95-4.3 stringr_0.6.2

I have the same pkg versions of httr and httpuv

from httpuv.

jcheng5 avatar jcheng5 commented on August 10, 2024

cc @hadley

from httpuv.

hadley avatar hadley commented on August 10, 2024

Maybe it's a security issue?

from httpuv.

sckott avatar sckott commented on August 10, 2024

I'll look into that

from httpuv.

yihui avatar yihui commented on August 10, 2024

@sckott The port 1410 might have already been used, or requires admin privilege in his system. @hadley shiny tries a series of random ports and you can probably do the same in httr: https://github.com/rstudio/shiny/blob/ab1494777d3b5d943a00502b21e6832467887524/R/server.R#L655-L683

from httpuv.

jcheng5 avatar jcheng5 commented on August 10, 2024

This might be relevant:
r-lib/httr#120

Scott, can you get your user to try both of these commands, separately?

shiny::runExample("01_hello")

shiny::runExample("01_hello", port=1410)

from httpuv.

sckott avatar sckott commented on August 10, 2024

@yihui Thanks. I'll ask him about 1410

@jcheng5 Thanks. I'll have him try that. He's in the UK, so response tomorrow probably...

from httpuv.

hadley avatar hadley commented on August 10, 2024

@yihui unfortunately I can't do that because I need a determinstic url for OAuth

from httpuv.

timcdlucas avatar timcdlucas commented on August 10, 2024

@yihui I ran R as sudo R and still had the same errors.

@jcheng5 Hi. Yes runExample("01_hello") works but shiny::runExample("01_hello", port=1410) doesn't. shiny::runExample("01_hello", port=1450) did work so I think it is just a port issue.

I restarted my computer and it seems to work now. Is this quite fragile then? i.e. if someone else happens to be using port 1410 they will get the same, fairly opaque error?

Thanks for the help everyeone!

from httpuv.

isomorphisms avatar isomorphisms commented on August 10, 2024

thanks @jcheng5

from httpuv.

andrewm4894 avatar andrewm4894 commented on August 10, 2024

Hey - i'm running into issues here with packages like googlesheets and rdfp that seem to use httrpuv for the oauth.

Here is some output from some some commands:

> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.1

And:

> shiny::runExample("01_hello")
Loading required package: shiny

Listening on http://127.0.0.1:6838
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://127.0.0.1:6838'

And:

> shiny::runExample("01_hello", port=1410)
Loading required package: shiny

Listening on http://127.0.0.1:1410
Error in startServer(host, port, handlerManager$createHttpuvApp()) : 
  Failed to create server

Does this just mean that the port is blocked - is there any way to know what port is going to be used before i make the call and kill that pid in advance (feels ugly).

Or do you see anything above that might suggest something else is going on?

Cheers - am kinda struggling with this one given a lot of what is going on is abstracted so far away from where i call it.

My real problem is that when i run:

> library(googlesheets)
> gs_auth()
Error in httpuv::startServer(use$host, use$port, list(call = listen)) : 
  Failed to create server
> 

Was trying to use the shiny example as a reproducible error.

from httpuv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.