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

Couldn't normalize path in addResourcePath #320

Closed
RafaelPilan opened this issue Aug 31, 2018 · 10 comments · Fixed by #384
Closed

Couldn't normalize path in addResourcePath #320

RafaelPilan opened this issue Aug 31, 2018 · 10 comments · Fixed by #384

Comments

@RafaelPilan
Copy link

RafaelPilan commented Aug 31, 2018

Good afternoon,

I'm having trouble creating a package's binary and running on another computer. When testing on the same computer where the torque was generated, the error does not occur:
``
Listening on http://127.0.0.1:3408
Warning: Error in value[[3L]]: Couldn't normalize path in addResourcePath, with arguments: `prefix` = 'htmlwidgets-1.2'; `directoryPath` = '/home/user/R/x86_64-pc-linux-gnu-library/3.4/htmlwidgets/www'

It is holding the existing user name in the absolute path of the computer where the binary is being created.

I checked the whole code and there are no variables that have received the absolute path.

@ramnathv
Copy link
Owner

@Mennanak can you provide a simple reproducible example to reproduce this issue? addResourcePath is a function in shiny.

@fou-foo
Copy link

fou-foo commented Mar 13, 2019

I have the same problem with my app (https://github.com/fou-foo/Tesina/tree/master/Estancia%20observatorio%20econometrico/Pronostico/Pronostico_Resumen/AppObservatorioPronostico) developed in linux, not working in windows or another linux machine

@leonx075
Copy link

leonx075 commented Nov 5, 2019

I'm having the same issue when deploying my app to shinyapps.io

Warning: Error in value[[3L]]: Couldn't normalize path in addResourcePath, with arguments: prefix = 'htmlwidgets-1.3'; directoryPath = "a local directory"

@Johnsmith1988-cloud
Copy link

@Mennanak ,@leonx075 have you got any answer or how did you solve this issue?

@leonx075
Copy link

I think this happened to me because I was using packrat or something like that, which can be messy. The way I solved it was to copy only the scripts that were essential for my app and copying them in a brand new folder, then I made a new RShiny app in the folder where I copied my scripts. My app was running normally after that.

@frederic-santos
Copy link

frederic-santos commented May 18, 2021

I have exactly the same issue as @Mennanak and @fou-foo. My shiny app works on Linux (all cases) or on Windows when the package is installed from source, but I get the following error when it is installed from a windows binary:

An error has occurred!
Couldn't normalize path in `addResourcePath`, with arguments: `prefix` = 'htmlwidgets-1.5.3'; `directoryPath` = 'D:/temp/RtmpSWCreP/RLIBS_82d414137410/htmlwidgets/www'

Is there finally a way to fix it?

@MattCowgill
Copy link

MattCowgill commented Jun 9, 2021

I've just encountered that problem. I have htmlwidgets version 1.5.3.900, Shiny version 1.6.0. Does anyone know how to fix it? @frederic-santos did you figure out something? I have tried installing htmlwidgets from GitHub so I have the version that includes the commit referenced above, but still encounter the error.

@MattCowgill
Copy link

OK, when I disable disk caching (which I've been using by setting shinyOptions(cache = cachem::cache_disk(PATH)) I no longer encounter this error.

@frederic-santos
Copy link

frederic-santos commented Jun 9, 2021

OK, when I disable disk caching (which I've been using by setting shinyOptions(cache = cachem::cache_disk(PATH)) I no longer encounter this error.

Hi,
Where (in which file) do you set that? Actually, the problem is particularly annoying when the zip binaries are built by, and downloaded from, CRAN. This basically makes several packages totally unusable. Is there any way to set this option so that it will be taken into account by CRAN itself?

Edit: oh, maybe I misunderstood your reply. Did you mean that without a local customization you added, everything works now? (If so, you basically can forget my answer. :))

@moshejasper
Copy link

I have this problem currently with my app (embedded in my new R package found at https://cran.r-project.org/web/packages/kindisperse/index.html and https://github.com/moshejasper/kindisperse

When I install this package from github (as I did during testing), all files work fine (as they do with the old CRAN version I released several months back)...

HOWEVER, when I install the package (v0.10.1) from CRAN now (install.packages("kindisperse")) then run my embedded app , i.e. kindisperse::run_kindisperse(), I get the error described above, i.e. Couldn't normalize path in addResourcePath, with arguments: prefix= 'htmlwidgets-1.5.3';directoryPath = 'D:/temp/RtmpWINIYP/RLIBS_1bab82cd438f6/htmlwidgets/www'

I'm running htmlwidgets version 1.5.3.9000, shiny version 1.6.0

I assume the problem must somehow be with the CRAN build, as if I first install CRAN then instead install the most recent github version the problem persists, but if I install a substantially older github version then the most recent github version again, the problem is removed.

It's a recent issue (possibly connected to the htmlwidgets package) as my previous CRAN version I put up 3 months ago (0.9.2) runs the app fine, whereas this version doesn't.

I have checked all my native code both generally and the changes made between the two versions, and can't find anything that would trigger this issue.

The relevant function is on my github at "github.com/moshejasper/kindisperse/tree/main/R", at the very bottom of the file 'app.R' -

it is implemented run_kindisperse <- function() { shinyApp(ui = ui, server = server) }

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

Successfully merging a pull request may close this issue.

8 participants