r-lib / gmailr

Access the Gmail RESTful API from R.
https://gmailr.r-lib.org
Other
229 stars 56 forks source link

Error: 'cli_warn' is not an exported object from 'namespace:cli' #157

Closed jonmichael-caldwell closed 3 years ago

jonmichael-caldwell commented 3 years ago

Hello,

I have been successfully using gmailr in a shiny app hosted on shinyapps.io without issue for the past month or so but today it has starting throwing the following error and crashing out anytime I call gm_send_message(). Nothing has changed in my configuration, passwords, etc so I'm a bit confused as to how to approach this problem. The error occurs both locally and on the deployed server. I originally set this up following the Setup instructions in the readme with the cached .secret folder and the credentials.json uploaded along with the app files as per the "Using gmailr in deployed applications instructions". All of this was working swimmingly until just now.

debug output: gm_send_message(email) debugging in: gm_send_message(email) debug: { mail <- as.character(mail) stopifnot(nullable(is_string)(thread_id), is_string(user_id)) type <- match.arg(type) gmailr_POST(c("messages", "send"), user_id, class = "gmail_message", query = list(uploadType = type), body = jsonlite::toJSON(auto_unbox = TRUE, null = "null", c(threadId = thread_id, list(raw = base64url_encode(mail)))), add_headers(Content-Type= "application/json")) } Browse[2]> c **Auto-refreshing stale OAuth token. Error: 'cli_warn' is not an exported object from 'namespace:cli'**


Session Info:

jonmichael-caldwell commented 3 years ago

Was able to resolve this issue after updating cli to the latest github version, interestingly error persisted with the latest CRAN version. Error was thrown initially after OAuth stale token refresh failed. Fixed this by manually refreshing the cached .secret folder with the interactive OAuth session.

jingydz commented 1 year ago

Bug

autoplot(out_pca,data=dat,colour='label',size=0.1,label=TRUE,label.size=3) Error: 'cli_abort' is not an exported object from 'namespace:cli'

Check

installed.packages()["cli", "Version"] [1] "2.5.0" library(cli)

Update

install.packages("cli") Installing package into ‘/T01Data/zhangjj/R/x86_64-pc-linux-gnu-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cloud.r-project.org/src/contrib/cli_3.6.1.tar.gz' Content type 'application/x-gzip' length 567293 bytes (553 KB)

downloaded 553 KB ... progress.c:352:3: warning: implicit declaration of function ‘nanosleep’; did you mean ‘sleep’? [-Wimplicit-function-declaration] nanosleep(&ts, NULL); ^~~~~ sleep make: *** [progress.o] Error 1 ERROR: compilation failed for package ‘cli’

  • removing ‘/T01Data/zhangjj/R/x86_64-pc-linux-gnu-library/4.0/cli’

The downloaded source packages are in ‘/tmp/RtmpmQXUfD/downloaded_packages’ Warning message: In install.packages("cli") : installation of package ‘cli’ had non-zero exit status

Question

How to update to the newest version?

jennybc commented 1 year ago

@jingydz I recommend you take this up in the cli repo, where perhaps someone will recognize this compilation error.