Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VosonDash fails when redirected to the browser #28

Open
ramattos7 opened this issue Jan 23, 2021 · 4 comments
Open

VosonDash fails when redirected to the browser #28

ramattos7 opened this issue Jan 23, 2021 · 4 comments

Comments

@ramattos7
Copy link

When I try to run VOSONDash in Rstudio, it is redirected to the browser and the dashboard buttons are unusable. In Rstudio, the following error message appears:

Warning: Error in if: argument is of length zero
74: isolate
73: observeEventHandler [server/apiKeysServer.R#25]
2: shiny::runApp
1: runVOSONDash
Session ended or browser closed. Exiting.

@bryn-g
Copy link
Member

bryn-g commented Jan 23, 2021

Hi there,

Thanks for reaching out with this error. What I think has happened is that for some reason the base R function file.exists is returning a zero length list when checking for the existence VOSON Dash API keys files in your user home directory upon startup. This is unusual and I'm wondering if perhaps you are using Linux or OSX with access restrictions?

You can manually check the problem by typing the following into the RStudio console:

# check your OS environment registered home directory
Sys.getenv("HOME")

# check the result of the file.exists check is TRUE or FALSE
file.exists(paste0(Sys.getenv("HOME"), "/vosondash_keys.rds", sep = ""))

These will indicate if the problem is indeed with file.exists.

There is also a VOSONDash startup parameter that will skip the checking of key files and get you running but you will not be able to save any API keys or tokens. You can start the app as follows:

runVOSONDash(isLocal = FALSE)

Thanks again and let me know how you go.

@ramattos7
Copy link
Author

Hi there,
Thanks for the answer.
I'm using Windows. I did what you said and got:

check your OS environment registered home directory

Sys.getenv ("HOME")
[1] "C: \ Users \ ramat \ Documents"

check the result of the file.exists check is TRUE or FALSE

file.exists (paste0 (Sys.getenv ("HOME"), "/vosondash_keys.rds", sep = ""))
[1] TRUE

However, I was able to use the dashboard from the command

runVOSONDash(isLocal = FALSE)

Thanks again

@NaturallyAsh
Copy link

Wanted to say that I was running into the same issue. The problem for me was that I was trying to launch the Dash using VOSONDash::runVOSONDash(). My issue was solve after first loading the VOSONDash library, then running runVOSONDash(). Hopefully my solution might be useful to someone facing a similar issue.

@bryn-g
Copy link
Member

bryn-g commented Aug 21, 2022

Thank you for letting me know about your solution! I will have a look more into the scope and loading of keys when direct package function call for the next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants