【发布时间】:2019-06-09 15:16:44
【问题描述】:
我已经在 Shiny 中创建了一个基本应用程序,它连接数据并将数据上传到共享的 googlesheet。该应用程序在本地运行良好,但是当我尝试在网络浏览器中运行它时,它不会上传任何数据。
这个问题看起来很简单。使用闪亮的apps.io我可以查看应用程序日志,它确定我需要提供应用程序权限(特别是shinyapps和tidyverse)才能将数据上传到谷歌表格授权的谷歌表格。这没问题,因为我在本地自己的机器上经历了相同的过程:
1) I'm running on a Mac, OSX Mojave v 10.14.2
2) I've enabled web sharing via the terminal with sudo apachectl start (I think that's all it took?)
3) I've scoured similar problems on here.
4) The app opens and uploads data when I "view in browser" from the RStudio IDE
5) I wanted to try Shiny Server, however apparently they haven't written anything for Macs yet that doesn't have to built from source, which is way beyond my level.
6) The google sheet is published to the web as well.
这是来自 shinyapps.io 日志提供的消息
Listening on http://127.0.0.1:37073
2019-01-15T14:33:32.976569+00:00 shinyapps[636194]: Adding .httr-oauth to .gitignore
2019-01-15T14:33:33.012405+00:00 shinyapps[636194]: Please point your browser to the following url:
2019-01-15T14:33:33.010168+00:00 shinyapps[636194]: Waiting for authentication in browser...
2019-01-15T14:33:33.010485+00:00 shinyapps[636194]: Press Esc/Ctrl + C to abort
2019-01-15T14:33:33.012759+00:00 shinyapps[636194]: "This is the provided URL"
I then go to the provided URL, that takes me to a accounts.google page that asks me to provide authentication to a specific google account, which I do.
然后我从 safari 收到此错误:
Safari can't open the page "the provided URL" because safari cannot connect to the server "localhost"
我基本上希望这个应用程序只能由允许的 google 帐户使用,该帐户是一个共享帐户,并且能够从最多 3 台不同的 windows 机器上传,感谢任何帮助!
【问题讨论】:
-
这个问题是在浏览器中托管还是在完全发布(或两者兼有)时出现?
-
@Chabo 只是在浏览器中托管时,它已完全发布在 shinyapps.io 中。
标签: r shiny localhost shinyapps