MikhailArkhipov / vscode-r

R Tools for VS Code
Other
82 stars 6 forks source link

Cannot start R Tools on #51

Open wlandau opened 3 years ago

wlandau commented 3 years ago

When I start VS Code and open an R script, R Tools does not start.

Screen Shot 2021-01-06 at 10 43 14 AM

The logs show this:

Screen Shot 2021-01-06 at 10 51 08 AM

Screen Shot 2021-01-06 at 10 51 44 AM

Stack:

I did have .NET 5.0.1 installed originally, but R Tools could not launch for the same reasons as above. When I downgraded to 3.1, I followed the directions here to remove 5.0.1.

MikhailArkhipov commented 3 years ago

Try https://github.com/MikhailArkhipov/vscode-r/releases/tag/0.0.16, it is built for .NET 5.0. I would like to make sure it runs on Mac before I publish. Thanks.

wlandau commented 3 years ago

Thanks, @MikhailArkhipov. r-0.0.16.vsix seems to install and run. I am getting the warning below, but R terminals seem to start and run anyway. I cannot find any other logs.

Screen Shot 2021-02-06 at 5 38 33 AM

MikhailArkhipov commented 3 years ago

Please check out update in https://github.com/MikhailArkhipov/vscode-r/issues/52. Thanks.

MikhailArkhipov commented 3 years ago

0.0.17 has been published

wlandau commented 3 years ago

Thanks. Tried installing 0.0.18 and got the message "Unable to start R process. Exception: Http request to '(local)' has failed. The machine may be offline or unreachable or the network has been disconnected. Error: Web request has timed out." Not sure how this affects the extension though. I am brand new to VSCode and do not know how to program it. Probably my mistake somehow.

MikhailArkhipov commented 3 years ago

Try

wlandau commented 3 years ago

cd to the /ls in terminal

$ pwd
/Users/CENSORED/.vscode/extensions/mikhail-arkhipov.r-0.0.18/ls

try dotnet Microsoft.R.Host.Broker.dll - what happens?

Seems to work at first:

$ dotnet Microsoft.R.Host.Broker.dll
: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
      User profile is available. Using '/Users/CENSORED/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
      User profile is available. Using '/Users/CENSORED/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
info: Microsoft.R.Host.Broker.Interpreters.InterpreterManager[0]
      0 interpreters configured:
info: Microsoft.R.Host.Broker.Interpreters.InterpreterManager[0]
      0 interpreters configured:
Hosting environment: Production
Content root path: /Users/CENSORED/.vscode/extensions/mikhail-arkhipov.r-0.0.18/ls
Now listening on: http://0.0.0.0:5444
Application started. Press Ctrl+C to shut down.

When I navigate a browser to http://0.0.0.0:5444, I see a blank browser session and the following in the terminal.

info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://0.0.0.0:5444/  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://0.0.0.0:5444/  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 127.1191ms 404 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 127.1191ms 404 

cd to the /ls/Host/Mac in terminal

$ pwd
/Users/CENSORED/.vscode/extensions/mikhail-arkhipov.r-0.0.18/ls/Host/Mac

Try running 'Microsoft.R.Host' (also check if it is marked as executable) - what happens?

$ ll -l Microsoft.R.Host
-rwxrw-r--  1 CENSORED  staff   1.4M Feb 15 13:26 Microsoft.R.Host
$ ./Microsoft.R.Host
[1]    26270 segmentation fault  ./Microsoft.R.Host