rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.69k stars 1.09k forks source link

GitHub Copilot Sign In Not Working RStudio Desktop #13732

Open rsh52 opened 1 year ago

rsh52 commented 1 year ago

System Details

RStudio Edition : Desktop
RStudio Version : Version 2023.12.0-daily+114 (2023.12.0-daily+114)
OS Version      : macOS Ventura 13.5.1
R Version       :  4.3.1 (2023-06-16)

Problem Details

Attempting to log in via the Global and Project options UI brings up a brief (~2 second) sign in refresh dialogue but nothing happens.

image

I have Copilot working in VS Code, have checked that VPN isn't an issue, and have tried getting this to work in multiple projects of mine. I would have expected a login prompt, but the process seems to terminate early. Is there another method besides the UI?

Thank you for your help and time.

rsh52 commented 1 year ago

Minor update, I was able to get it working on my Windows machine. It seems I just can't get the agent dialogue to appear on Mac.

ronblum commented 1 year ago

@rsh52 Thank you for raising this! Do you mean that this dialog shows up and then disappears after 2 second?

copilot
rsh52 commented 1 year ago

@rsh52 Thank you for raising this! Do you mean that this dialog shows up and then disappears after 2 second? copilot

Hi @ronblum, unfortunately no it doesn't get to that dialogue box. I just see the drop down at the top of the IDE that says "Signing in..." with a buffer wheel which quickly disappears. I was able to get that dialogue on my personal PC, but I will see if there's an organizational setting my work enforces that's stopping me from getting to this on Mac.

ronblum commented 1 year ago

@kevinushey Do you think that turning on RSTUDIO_COPILOT_LOG_LEVEL=1 could provide useful info?

rsh52 commented 1 year ago

@ronblum I actually tried that after seeing one of the other issues here (#13718), the console immediately starts displaying:

[onStarted]: Copilot agent has started [PID = 5350]
[sendRequest]: Sending request 'initialize' with id ''.
[onBackgroundProcessing]: Invoking continuation with id ''.
[sendRequest]: Sending request 'setEditorInfo' with id ''.
[onBackgroundProcessing]: Invoking continuation with id ''.
[ensureAgentRunning]: Copilot is already running; nothing to do.

(ID removed) Which makes me think it's something to do the request to the agent being blocked.

CorradoLanera commented 1 year ago

On my RStudio Desktop Pro the login line does not appear, and the agent was not installed / running. I was never prompted to do anything, nor popup windows appeared anytime.

image

RStudio 2023.09.0+463.pro11 "Desert Sunflower" Release (6cc4ae5fce128156206f7e29378b7b165770ff63, 2023-09-24) for windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36

ronblum commented 1 year ago

@rsh52 Thank you for the added info! Will review this.

ronblum commented 1 year ago

@CorradoLanera This behavior is a little bit different, so I've opened up issue #13751 for it.

proctorma commented 1 year ago

Hi, I'm having identical symptoms on a Windows installation (no dialog box, and "Signing In" with buffer wheel for a fraction of a second at the top of the IDE).

RStudio Version:

RStudio 2023.09.0+463 "Desert Sunflower" Release (b51c81cc303d4b52b010767e5b30438beb904641, 2023-09-25) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.09.0+463 Chrome/114.0.5735.289 Electron/25.5.0 Safari/537.36

I noticed when setting RSTUDIO_COPILOT_LOG_LEVEL=2 I get the following console messages (ID removed):

[sendRequest]: Sending request 'signInInitiate' with id ''.

REQUEST
----------------
Content-Length: 99

{"jsonrpc":"2.0","method":"signInInitiate","params":{},"id":""}
----------------

RESPONSE
------------------
{"jsonrpc":"2.0","id":"","error":{"code":-32603,"message":"Request signInInitiate failed with message: unable to get local issuer certificate"}}
------------------

This is on a corporate network behind an SSL decrypting proxy. Could this be what is interfering with signing in?

kevinushey commented 1 year ago

This is on a corporate network behind an SSL decrypting proxy. Could this be what is interfering with signing in?

This sounds likely. There are some related community discussions for the official Copilot plugin, e.g. https://github.com/orgs/community/discussions/8866, that might be helpful.

richetyann commented 1 year ago

As far as I tested with latest daily, it seems that proxy is not well taken for signin... (I mean taht it works when I used an open network instead of my company proxy)

t-elisee commented 1 year ago

Hello, I have my copilot authentification spinning continuously and nothing happens behind. I use the Mac OS 14. Has someone encountered the same issue?

Capture d’écran 2023-10-22 à 10 22 35
ronblum commented 1 year ago

@t-elisee Are you by chance using a network proxy?

t-elisee commented 1 year ago

@t-elisee Are you by chance using a network proxy?

HI @ronblum I don't have a network proxy. Copilot works well in VS code and I would like to run it in Rstudio.

rsh52 commented 1 year ago

@t-elisee Are you by chance using a network proxy?

HI @ronblum I don't have a network proxy. Copilot works well in VS code and I would like to run it in Rstudio.

Agreed, experiencing the same issue. VS Code is able to run it no problem despite being on a work VPN.

ronblum commented 1 year ago

@t-elisee It looks like the state that your RStudio instance reaches is different from @rsh52's instance: You get to the "Authenticating" which hangs, while @rsh52 briefly gets the "Signing in" pop-up. Can you open a separate issue for this, since they might be unrelated?

jonvanausdeln commented 11 months ago

We are going to add and document the ability to set the Copilot proxy in desktop environments, see https://github.com/rstudio/rstudio/issues/13913

This may fix the issue and should be retested after the above issue is implemented.

Doint2021 commented 10 months ago

System Details

RStudio Edition : Desktop
RStudio Version : Version 2023.12.0-daily+114 (2023.12.0-daily+114)
OS Version      : macOS Ventura 13.5.1
R Version       :  4.3.1 (2023-06-16)

Problem Details

Attempting to log in via the Global and Project options UI brings up a brief (~2 second) sign in refresh dialogue but nothing happens.

image

I have Copilot working in VS Code, have checked that VPN isn't an issue, and have tried getting this to work in multiple projects of mine. I would have expected a login prompt, but the process seems to terminate early. Is there another method besides the UI?

Thank you for your help and time.

  • [x] I have read the guide for submitting good bug reports.
  • [x] I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • [ ] If I am reporting an RStudio crash, I have included a diagnostics report.
  • [x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue. Add the host of github.com, you can use the UsbEAm Hosts Editor software or change it manually.