ParkerICI / premessa

R package for pre-processing of mass and flow cytometry data
GNU General Public License v3.0
42 stars 24 forks source link

Error in utils::browseURL(appUrl): 'browser' must be a non-empty character string #35

Closed monchin closed 4 years ago

monchin commented 4 years ago

Hello, I'm trying premessa, but it seems there is something wrong when I tried to open GUI following the steps in Readme.md. Here's my input and output:

> library(premessa)
> paneleditor_GUI()
Loading required package: shiny

Listening on http://127.0.0.1:7708
Error in utils::browseURL(appUrl) : 
  'browser' must be a non-empty character string

My OS: Ubuntu 18.04

R version:

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-conda_cos6-linux-gnu (64-bit)

And I am using anaconda virtual environment, conda version: conda 4.8.2

SamGG commented 4 years ago

Hi, You have to setup your underlying UNIX/conda system so that R knows how to handle URL. The external program called to handle URL is resolved by default with the getOption("browser")() call, which returns an empty sting in your case, meaning no program/mechanism defined. Look at the documentation of browseURL, which explains how define this mechanism. This problem has nothing to do with Premessa itself, but thanks for reporting it. When a command like browseURL("http://github.com") opens a Web browser to the github home page, your setup is OK ;-) Warning: I am not the developper nor the maintainer. Best.

monchin commented 4 years ago

Hi, You have to setup your underlying UNIX/conda system so that R knows how to handle URL. The external program called to handle URL is resolved by default with the getOption("browser")() call, which returns an empty sting in your case, meaning no program/mechanism defined. Look at the documentation of browseURL, which explains how define this mechanism. This problem has nothing to do with Premessa itself, but thanks for reporting it. When a command like browseURL("http://github.com") opens a Web browser to the github home page, your setup is OK ;-) Warning: I am not the developper nor the maintainer. Best.

Thank you! I have solved this problem by your advice!

SamGG commented 4 years ago

Fine! Could you post here a short summary of your solution? It will be useful for me and others.

monchin commented 4 years ago

Fine! Could you post here a short summary of your solution? It will be useful for me and others.

Glad to do that! First, I went into R, and input R.home() to find where my R is:

> R.home()
[1] "/home/mon/anaconda3/envs/R36/lib/R"

Then, I opened R_home/etc/Renviron, and found this line: R_BROWSER=${R_BROWSER-''}. I found my Chrome browser's location: /usr/bin/google-chrome-stable, so I copied this location to change the line as R_BROWSER=${R_BROWSER-'/usr/bin/google-chrome-stable'}, and save.

Now the problem is solved!

SamGG commented 4 years ago

Thanks.