application unexpectedly exit due to my css style

49 views
Skip to first unread message

姚文

unread,
Sep 13, 2014, 11:25:44 PM9/13/14
to shinyap...@googlegroups.com
Hi all, I deployed my Shiny App (https://ricencode.shinyapps.io/RICENCODE/) a few days ago and it worked not bad. But when I added a CSS file to custom the interface of my APP and redeployed my APP, it won't work. It said that my application unexpectedly exit and I should check the javascript error console. I checked that and found that some css files were not correctly loaded. How can I fix this? Any suggestion is appreciated. Thanks!

姚文

unread,
Sep 14, 2014, 10:35:20 AM9/14/14
to shinyap...@googlegroups.com
FYI, this APP worked without any problem in Rstudio on my local machine.

在 2014年9月14日星期日UTC+8上午11时25分44秒,姚文写道:

Yihui Xie

unread,
Sep 14, 2014, 3:35:16 PM9/14/14
to 姚文, shinyap...@googlegroups.com
The JavaScript console (in Google Chrome) says:

Error in type.convert(data[[i]], as.is = as.is[i], dec = dec,
numerals = numerals, : invalid multibyte string at '<a6><c1>1a'

which looks like an encoding problem:
http://shiny.rstudio.com/articles/unicode.html If your ui.R/server.R
are encoded in UTF-8, can you deploy the same app with a different
name but with the CSS file removed?

BTW, please include your R session info:

library(shiny)
library(shinyapps)
sessionInfo()

If you have not updated your R packages, please do so. Thanks!

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name

姚文

unread,
Sep 14, 2014, 9:12:16 PM9/14/14
to shinyap...@googlegroups.com, ywh...@gmail.com
Here is my sessioninfo:
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 
[2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936   
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936
[4] LC_NUMERIC=C                                                   
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936    

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

other attached packages:
[1] shiny_0.10.1     shinyapps_0.3.57

loaded via a namespace (and not attached):
 [1] bitops_1.0-6    caTools_1.17    digest_0.6.4    htmltools_0.2.4 httpuv_1.3.0    Rcpp_0.11.2    
 [7] RCurl_1.95-4.3  RJSONIO_1.3-0   tools_3.1.1     xtable_1.7-3   

And I am deploying the same app with a different name but with the CSS file removed now. I will notify you when it is done. I think my ui.R/server.R are encoded in UTF-8. 

在 2014年9月15日星期一UTC+8上午3时35分16秒,Yihui Xie写道:

Wen Yao

unread,
Sep 15, 2014, 5:44:11 AM9/15/14
to Yihui Xie, shinyap...@googlegroups.com
Hi Yihui,

It turned out to ba an encoding problem. The APP deployed with the CSS file removed thrown out the same error. And I check every file and found one file that was read into R wasn't encoded in UTF-8. I fixed that file and fixed the problem. Now the APP is running without error.

But, I got another question. If I want to collect data from users, where can I found the data submitted by the user since I can't see any of the files within the Shiny APP in the Dashboard at https://www.shinyapps.io?

Regards,
Wen


-----邮件原件-----
发件人: Yihui Xie [mailto:xiey...@gmail.com]
发送时间: 2014年9月15日 3:35
收件人: 姚文
抄送: shinyap...@googlegroups.com
主题: Re: [shinyapps-users] Re: application unexpectedly exit due to my css style

Tareef Kawaf

unread,
Sep 15, 2014, 5:56:00 AM9/15/14
to Wen Yao, Yihui Xie, shinyap...@googlegroups.com
It depends on where you are storing the data Wen.  Our recommendation would be for you to write it to a location that you have read access to from the outside since writes to disk are not guaranteed to be persisted.

Options to consider:
- Write the data from the user to a database you have access to.  This could be a database in the cloud (Amazon's RDS, MongoLabs, Cloudant, Google Cloud SQL, or any number of cloud hosted databases), or it could be your own database where you open a connection to the outside world for the purposes of getting this data in there.
- Write the data to a file or data store you have access to.  You could "FTP" the data somewhere, or potentially store it in an S3 bucket that only you have access to.

Hope this helps
-Tareef


--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/003001cfd0c9%2457ea4ad0%2407bee070%24%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Wen Yao

unread,
Sep 15, 2014, 7:26:40 AM9/15/14
to Yihui Xie, shinyap...@googlegroups.com

 

 

发件人: Wen Yao [mailto:ywh...@gmail.com]
发送时间: 2014年9月15日 19:24
收件人: 'Tareef Kawaf'
主题: 答复: 答复: [shinyapps-users] Re: application unexpectedly exit due to my css style

 

Hi Tareef,

 

In fact, my Shiny APP was deposited in the Github. I am not sure if I can write the data submitted by the users to text files in my Github repo. If I can’t, is there any free cloud hosted service I can use to store my data? Thanks!

 

Regards,

Wen

 

 

 

发件人: Tareef Kawaf [mailto:tar...@rstudio.com]
发送时间: 2014年9月15日 17:55
收件人: Wen Yao
抄送: Yihui Xie; shinyap...@googlegroups.com
主题: Re: 答复: [shinyapps-users] Re: application unexpectedly exit due to my css style

Tareef Kawaf

unread,
Sep 15, 2014, 8:11:09 AM9/15/14
to Wen Yao, Yihui Xie, shinyap...@googlegroups.com
I am not sure how easy it is to do, but you might be best suited to write it to your dropbox account.   Would that work for you?


Wen Yao

unread,
Sep 15, 2014, 9:09:50 AM9/15/14
to Tareef Kawaf, Yihui Xie, shinyap...@googlegroups.com

Yes. I had a dropbox account. But I am not sure what I should do to make this happen. Do you have any reference information to recommend to me? Anyway, I will google this.

 

Thanks!

Wen

 

 

发件人: Tareef Kawaf [mailto:tar...@rstudio.com]

发送时间: 2014年9月15日 20:11

Tareef Kawaf

unread,
Sep 15, 2014, 9:12:46 AM9/15/14
to Wen Yao, Yihui Xie, shinyap...@googlegroups.com
It looks like this might be an okay starting place: http://christophergandrud.blogspot.co.uk/2013/04/dropbox-r-data.html

Wen Yao

unread,
Sep 15, 2014, 9:35:50 AM9/15/14
to Tareef Kawaf, Yihui Xie, shinyap...@googlegroups.com

Thanks, Tareef. I will dig into it.

 

Wen

 

发件人: Tareef Kawaf [mailto:tar...@rstudio.com]

发送时间: 2014年9月15日 21:12

收件人: Wen Yao
抄送: Yihui Xie; shinyap...@googlegroups.com

主题: Re: 答复: 答复: [shinyapps-users] Re: application unexpectedly exit due to my css style

Reply all
Reply to author
Forward
0 new messages