-
Notifications
You must be signed in to change notification settings - Fork 74
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
cannot find R with the latest version (2024.08.0-5) in windows (x64) #4280
Comments
Can you show us the content of the "Positron R Extension" output channel? That should be logging the effort to discover your R installations. |
sorry, i don't know how to find "Positron R Extension", I am just learn to use R. But, such a bug were not appeared untial the release of the version of 2024.08.0-5 |
This part of the wiki explains how to access logs: https://github.com/posit-dev/positron/wiki/Troubleshooting#python-and-r-logs |
I have the same Issue, Positron does not find the R intepreter on both of my work Windows machines. I'll try it at home later where I have admin-rights. I installed the latest User-installation Quick Feedback to the Wiki article you've posted: coming from R-Studio it is not clear what you mean with "Run the Output: Show Output Channels command to show a list of output channels. You can then select one to view its output by name, like "Positron R Extension"." Where exactly should I run this command? I do not have any console yet that could interpret the command and the Terminal pane does not evaluate the command. |
@jennybc found out how to do it. For the other R-Studio users: the command you need is CTRL + SHIFT + P then the so-called "command palette" shows up where you can enter the command "Show Output Channels" This is the output of the Positron R Extension:
As you can see in the Screenshot below Positron does not find my R-Installation But R-Studio finds R version 4.3.2 Let me know if you need any other outputs or infos about my machine. |
@blechturm or @ShiweiLin1991 Would you be willing to roll back to a previous version of Positron and post the comparable "good log" for comparison, i.e. where the R installation is discovered? I have been working in the R discovery area, so my hypothesis is that your R installations were previously being discovered ?through registry keys? and now that is not happening. I'm still not sure why (certainly not the intent), but it's a guess. I also can't reproduce this in either of my Windows VMs, so it's some difference in our setups. I notice that for @blechturm the location of the R installation suggests that you don't have admin privileges. |
When I start use Positron, such bug never appeared until the latest version released. |
With Positron 2024.08.0-5, upon a relaunch, which is occurring in a previously-opened folder, I see this in the Window output channel (and all R discovery / launch happens as usual):
I'm curious if those of you seeing no R launch / discovery could share what you see in this channel. Specifically do you see anything like this? This is where we quickly re-launch the version of R you were last running in this workspace:
Also curious if you see this (although I imagine you do):
The reason that I ask is that the Positron R Extension log makes it look like we aren't even attempting discovery, which is very odd. And, again, if anyone just needs to get unstuck, either of these should do the trick:
But I hope some of you stick with me so we can sort this out. I still can't reproduce it. Positron work and troubleshooting will be a bit slow for the next week or so, due to posit::conf. |
@jennybc Here are the logs for R Extension. My personal computer has no issues with the current release, so I'm including that log as well. I've also included the Window output you mentioned in your last comment. 2024.07.0-125 (work)2024.08.0-5 (work)2024.08.0-5 (personal)Window Output 2024.08.0-5 (work) |
Here is the output from the window when no R is discovered:
When R is discovered:
Will certainly try the fixes suggested Adding pictures for a better view: No R discovered |
Here's one (non-specific) thing to try: reset your Positron state, which is in In Windows Command Prompt, Given that I don't understand the problem yet, I also don't know if this will help. But it does give us a better baseline, i.e. we know we aren't trying to restore a previous state. Warning: This will blow away your user settings (which are in the |
I have done what you just suggested and now it can't detect R at all. Even with all workspaces closed. Here is the output from "Window":
|
We think we understand this now and have a fix working its way through the system. If you're suffering from this, I don't think there's anything you can do as a user to fix it. Fall back to the 2024.07.0-125 release to get unstuck. And once #4311 gets into release, all should be well 🤞 |
…rong version of `which` to be used, which caused R not to load on some configurations of Windows (#4311) <!-- Describe briefly what problem this pull request resolves, or what new feature it introduces. Include screenshots of any new or altered UI. Link to any GitHub issues but avoid "magic" keywords that will automatically close the issue. If there are any details about your approach that are unintuitive or you want to draw attention to, please describe them here. --> This PR addresses #4280. This issue was tracked down to the fact that the `positron-r` extension did not have an explicit `dependencies` entry for the `which` package, but it did have a `devDependencies` entry for `@types/which` (`"@types/which": "^3.0.0",`). As a result of this, the `positron-r/node_modules` folder contained `which` 2.0.2 (I believe) from: ``` mocha@^9.2.1: version "9.2.2" resolved "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz" integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" chokidar "3.5.3" debug "4.3.3" diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" glob "7.2.0" growl "1.10.5" he "1.2.0" js-yaml "4.1.0" log-symbols "4.1.0" minimatch "4.2.1" ms "2.1.3" nanoid "3.3.1" serialize-javascript "6.0.0" strip-json-comments "3.1.1" supports-color "8.1.1" which "2.0.2" workerpool "6.2.0" yargs "16.2.0" yargs-parser "20.2.4" yargs-unparser "2.0.0" ``` This version of `which` does not support the `nothrow` option for `async which`, which we rely on in this code fragment from `extensions/positron-r/src/provider.ts`: ``` const whichR = await which('R', { nothrow: true }) as string; ``` Because of this, on some configurations of Windows, an error was being thrown which caused R not to load. For background on this, see: npm/node-which#80. This was the exact same problem. ### QA Notes <!-- Add additional information for QA on how to validate the change, paying special attention to the level of risk, adjacent areas that could be affected by the change, and any important contextual information not present in the linked issues. -->
The 2024.08.0-31 release contains what we believe to be the fix. If anyone here can confirm, that would be great to know! |
The 2024.08.0-31 release fixes this issue for me. OS details: Windows Interpreter details: |
The 2024.08.0-31 release also fixed it for me. Windows 11 Home Interpreter details: |
I think we can close this now. |
Thanks, @jennybc. I was just able to confirm as well. |
Done, the lastest version has been solved such bug in windows (x64) |
System details:
Positron and OS details:
Interpreter details:
Describe the issue:
Steps to reproduce the issue:
Expected or desired behavior:
Were there any error messages in the UI, Output panel, or Developer Tools console?
The text was updated successfully, but these errors were encountered: