[FIXED] "Error: $ operator is invalid for atomic vectors" when run rsconnect::setAccountInfo()

I'm having problems to deploy my application on shinyapps.io. The problem is associated with rsconnect::setAccountInfo() function.

Console output:

> rsconnect::setAccountInfo(name='xxxx', token='xxxx', secret='xxx') Error: $ operator is invalid for atomic vectors

Setup:

  • RStudio 1.1.463
  • Debian GNU/Linux buster/sid
  • R version 3.5.1 instaled through apt-get

Notes:

  • I successfully deployed my application using another computer (RStudio + Windows)
  • I tried to uninstall and reinstall R on my computer (Debian) - problem persists
  • I add more verbose to my log options(rsconnect.http.verbose = TRUE)
*   Trying 54.174.186.24...
* TCP_NODELAY set
* Connected to api.shinyapps.io (54.174.186.24) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /tmp/Rtmps2FZrw/cacerts7c515d597499.pem
  CApath: /etc/ssl/certs
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=api.rstudio.cloud
*  start date: Feb 16 00:00:00 2018 GMT
*  expire date: Mar 16 12:00:00 2019 GMT
*  subjectAltName: host "api.shinyapps.io" matched cert's "api.shinyapps.io"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x9e5a040)
> GET /v1/users/current/ HTTP/2
Host: api.shinyapps.io
User-Agent: rsconnect/0.8.11
Accept: */*
Date: Fri, 23 Nov 2018 09:19:28 GMT
X-Auth-Token: XXXX
X-Auth-Signature: ZDRkMjU0NjQ4ZjJmMWE5NzI2NzBhYWU4NTYxMjViZTA1N2E2OWFiNzljNzE2NmMyNWRhMzZlMjhhYzNlMzVjYQ==; version=1
X-Content-Checksum: d41d8cd98f00b204e9800998ecf8427e

* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200 
< date: Fri, 23 Nov 2018 09:19:28 GMT
< content-type: application/json; charset=UTF-8
< content-length: 495
< server: nginx/1.10.3 (Ubuntu)
< etag: "c66ee9c4d4771529b301a980e9e662c085a629cd"
< access-control-allow-origin: https://rstudio.cloud
< 
* Connection #0 to host api.shinyapps.io left intact
Error: $ operator is invalid for atomic vectors

App dependencies output:

> rsconnect::appDependencies()
          package  version source
1              BH 1.66.0-1   CRAN
2              DT      0.5   CRAN
3            MASS 7.3-51.1   CRAN
4          Matrix   1.2-15   CRAN
5              R6    2.2.2   CRAN
6    RColorBrewer    1.1-2   CRAN
7            Rcpp  0.12.18   CRAN
8      assertthat    0.2.0   CRAN
9       base64enc    0.1-3   CRAN
10          bindr    0.1.1   CRAN
11       bindrcpp    0.2.2   CRAN
12            cli    1.0.0   CRAN
13     colorspace    1.3-2   CRAN
14         crayon    1.3.4   CRAN
15      crosstalk    1.0.0   CRAN
16         digest   0.6.18   CRAN
17          dplyr    0.7.6   CRAN
18          fansi    0.3.0   CRAN
19        ggplot2    3.0.0   CRAN
20           glue    1.3.0   CRAN
21      gridExtra      2.3   CRAN
22         gtable    0.2.0   CRAN
23      htmltools    0.3.6   CRAN
24    htmlwidgets      1.3   CRAN
25         httpuv    1.4.5   CRAN
26       jsonlite      1.5   CRAN
27       labeling      0.3   CRAN
28          later    0.7.5   CRAN
29        lattice  0.20-38   CRAN
30       lazyeval    0.2.1   CRAN
31        leaflet    2.0.2   CRAN
32 leaflet.extras    1.0.0   CRAN
33       magrittr      1.5   CRAN
34       markdown      0.8   CRAN
35           mgcv   1.8-26   CRAN
36           mime      0.5   CRAN
37        munsell    0.5.0   CRAN
38           nlme  3.1-137   CRAN
39         pillar    1.3.0   CRAN
40      pkgconfig    2.0.2   CRAN
41          plogr    0.2.0   CRAN
42           plyr    1.8.4   CRAN
43            png    0.1-7   CRAN
44       promises    1.0.1   CRAN
45          purrr    0.2.5   CRAN
46         raster    2.8-4   CRAN
47       reshape2    1.4.3   CRAN
48          rlang    0.2.2   CRAN
49         scales    1.0.0   CRAN
50          shiny    1.1.0   CRAN
51    sourcetools    0.1.7   CRAN
52             sp    1.3-1   CRAN
53        stringi    1.2.4   CRAN
54        stringr    1.3.1   CRAN
55         tibble    1.4.2   CRAN
56     tidyselect    0.2.4   CRAN
57           utf8    1.1.4   CRAN
58        viridis    0.5.1   CRAN
59    viridisLite    0.3.0   CRAN
60          withr    2.1.2   CRAN
61         xtable    1.8-3   CRAN
62           yaml    2.2.0   CRAN```

Sounds like this issue:

There's a candidate fix mentioned there -- can you try it to see if it resolves your issue?

3 Likes

Hi Jonathan, you were right!
I successfully applied your patch and now I'm able to run setAccountInfo().

Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.