vscode-R
vscode-R copied to clipboard
warning messages do not indicate which file or line causing issue
Is your feature request related to a problem? Please describe. I'm getting warning messages popping up in the bottom right corner of vscode like this:
The "file" argument must be of type string. Received undefined
in a large R project that I've loaded. What's a little frustrating is that there is no indication of the source file or code line that's causing the problem
Describe the solution you'd like
Either have the warning message include the source location, or if that's not possible then don't pop up a window with the warning message that I have to click close on, and instead just log it somewhere
Additional context

I'm on OSX 12.2.1, VSC 1.65.0 and v2.4.0 of the extension - otherwise very much enjoying the extension - keep up the great work!
Would you like go "Toggle Developer Tools" and see if there is an error in the console?
Does this message appear when you just open the folder and do nothing, or you could trigger this error message somehow?

I don't trigger it - it just appears
Looks like you are using packrat in the project and vscode-R does not seem to work well with it yet. I'll try using it and take a closer look.
much appreciated - and yes, packrat in heavy use ... I tried setting r.rpath.mac and restarting VS Code, but still the same errors in dev tools and popups ...


I also get the above popup repeatedly - I click yes and then get

but I still get the same popup after each re-start
not sure if that's related ...
one of the wrinkles in the project i'm working on, is that that outer shell is ruby (weird I know) - and then the R code sits in sub-directories, so I wonder if that's screwing with packrat, e.g. when it says it can't load packrat/init.R it's trying to do it from the root working directory rather than the R root which is in /lib/<R-sub-project-name>/versions/
I am getting this same error with renv, I suppose it is very similar to packrat.
It would be great to be able to use renv/packrat with vscode-R. I have jsonlite and languageserver installed both within the renv library and the system library.
Please let me know if anybody figures something out!
@joelnitta Would you like to try the latest development build and see if the problem still persists?
@renkun-ken Thanks! Actually, another wrinkle is that I am running this in conda... not sure if that is having an effect.
I am trying "option 3" mentioned in #946.
Anyways, it still isn't working for me with the dev build... (the conflicted calls below come from using {conflicted} in my .Rprofile. Apparently that package is working correctly!)
R Language Server (2316699) started
[conflicted] Will prefer contentid::resolve over any other package
[conflicted] Will prefer dplyr::filter over any other package
Error in socketConnection(host = host, port = port, open = "r+b") :
cannot open the connection
Calls: <Anonymous> -> <Anonymous> -> initialize -> socketConnection
In addition: Warning message:
In socketConnection(host = host, port = port, open = "r+b") :
localhost:38029 cannot be opened
Execution halted
R Language Server (2316699) exited with exit code 1
R Language Server (2321619) started
[conflicted] Will prefer contentid::resolve over any other package
[conflicted] Will prefer dplyr::filter over any other package
Error in socketConnection(host = host, port = port, open = "r+b") :
cannot open the connection
Calls: <Anonymous> -> <Anonymous> -> initialize -> socketConnection
In addition: Warning message:
In socketConnection(host = host, port = port, open = "r+b") :
localhost:40569 cannot be opened
Execution halted
R Language Server (2321619) exited with exit code 1
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.