Following error I am getting when I deploy app to shiny but it works fine locally.
Authentication options didn't match existing session token and not interactive session
** so unable to manually reauthenticate**
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->
Following is my code
GCS_AUTH_FILE="************"
Project_Key <- "88888888888888888888"
#App_Name <- "MySimpleCloudApp"
#BucketName <- "atulbucketmater"
#clientId <- "atulgoogleclientid"
CliendId_Key <- "**********************"
secret_Key <- "***********************"
options(googleAuthR.client_id = "******************")
gcs_auth(new_user=FALSE, no_auto= FALSE)
buckets <- ("**********")
#gcs_auth()
#gcs_get_global_bucket()
gcs_global_bucket("emp_images")
gcs_get_global_bucket()
bucket_info <- gcs_get_bucket("**********")
bucket_info
##############################################
library(RMySQL)
options(sqldf.driver = "SQLite")
options(mysql = list(
"host" = "***********",
"port" = ,
"user" = "****",
"password" = ""
))
databaseName <- "****"
table <- "trn"
####################################################
loadatt_images <- function() {
Connect to the database
db <- dbConnect(MySQL(), dbname = databaseName, host = options()$mysql$host,
port = options()$mysql$port, user = options()$mysql$user,
password = options()$mysql$password)
Construct the fetching query
table <-"att_images"
query <- sprintf("SELECT image FROM %s", table)
Submit the fetch query and disconnect
data <- dbGetQuery(db, query)
dbDisconnect(db)
data
}
saveatt_images <- function(data) {
db <- dbConnect(MySQL(), dbname = databaseName, host = options()$mysql$host,
port = options()$mysql$port, user = options()$mysql$user,
password = options()$mysql$password)
table <-"att_images"
query <- sprintf( "INSERT INTO %s (%s) VALUES ('%s')",
table,
paste(names(data), collapse = ", "),
paste(data, collapse = "', '")
)
# print(query)
# Submit the update query and disconnect
dbGetQuery(db, query)
dbDisconnect(db)
}
l
ui <-fluidPage(
useShinyalert(),
tags$style(HTML("
.tabs-above > .nav > li[class=active] > a {
background-color: #FFFF00;
color: #FFF;
}")),
tags$style(HTML("
.tabbable > .nav > li > a {background-color: aqua; color:black}
.tabbable > .nav > li > a[data-value='t1'] {background-color: red; color:white}
.tabbable > .nav > li > a[data-value='t2'] {background-color: blue; color:white}
.tabbable > .nav > li > a[data-value='t3'] {background-color: green; color:white}
.tabbable > .nav > li[class=active] > a {background-color: black; color:white}
")),
App title ----
tags$head(
tags$style(HTML("
@import url('//fonts.googleapis.com/css?family=Lobster|Cabin:400,700');
h1 {
font-family: 'Lobster', cursive;
font-weight: 500;
line-height: 1.1;
color: #48ca3b;
}
"))
),
titlePanel(" EMPORIO -RETAIL MITRA - DATA ANALYTIC AND ARTIFICIAL INTELIGENCE MOBILE APP"),
Sidebar layout with input and output definitions ----
Main panel for displaying outputs ----
conditionalPanel(
condition = "input.tabselected == 1"
),
mainPanel(width = 12,
tags$head(tags$style(type="text/css",
"#loadmessage {
position: fixed;
font-family: 'Areal' ;
top: 7%;
left: 65%;
ocacity: 0.50;
text-align: center;
font-weight: 500;
#font-weight: bold;
font-size: 100%;
color: #ad1d28;
z-index: 105;
animation: blinker 1s linear infinite;
}")),
#conditionalPanel(condition="$('html').hasClass('shiny-busy')",
tags$div("Developed by - Neel Analytics",id="loadmessage"),
tags$script(HTML("
(function blink() {
$('#loadmessage').fadeOut(1000).fadeIn(4000, blink);
})();
")),
# Output: Tabset w/ plot, summary, and table ----
textOutput("usernm1"),