GitHub Copilot 'Code Completion' is not working in my RStudio

my GitHub Copilot 'Code Completion' used to work in my RStudio and now not and do not understand why. Recently I tried to use the chattr app but it should not be a problem! Anyway, everything seems Okay but the Completion is not happening.

## Copilot

- Version: 1.236.0
- Build: prod
- Editor: RStudio/2024.12.0+467

## Environment

- http_proxy: n/a
- https_proxy: n/a
- no_proxy: n/a
- SSL_CERT_FILE: n/a
- SSL_CERT_DIR: n/a
- OPENSSL_CONF: n/a

## Feature Flags

- Send Restricted Telemetry: disabled
- Chat: enabled
- Content exclusion: unavailable

## Node setup

- Number of root certificates: 147
- Operating system: Darwin
- Operating system version: 24.3.0
- Operating system architecture: x64
- NODE_OPTIONS: n/a
- NODE_EXTRA_CA_CERTS: n/a
- NODE_TLS_REJECT_UNAUTHORIZED: n/a
- tls default min version: TLSv1.2
- tls default max version: TLSv1.3

## Network Configuration

- Proxy host: n/a
- Proxy port: n/a
- Kerberos SPN: n/a
- Reject unauthorized: enabled
- Fetcher: HelixFetcher

## Reachability

- github.com: HTTP 200
- api.github.com: HTTP 200
- proxy.individual.githubcopilot.com: HTTP 200
- api.individual.githubcopilot.com: HTTP 200
- default.exp-tas.com: HTTP 200

Same problem here - tried a few different machines windos + linux - all broken.

This just started happening to me. Copilot worked fine for about two weeks, and now does not. It stopped working at the same time on MacOS and Windows.

  • RStudio Version 2024.12.1+563 (2024.12.1+563) (MacOS)
  • RStudio 2024.12.1 Build 563 (Windows)

I can ask queries in chattr and they work fine, but no completions are ever returned in the source editor.

I dumped a diagnostics log, and see:

Log file: /Users/nik/.local/share/rstudio/log/rsession-nik.log
--------------------------------------------------

2025-03-14T19:48:42.123876Z [rsession-nik] ERROR json-parse error 1 (An error occurred while parsing json. Offset: 0); OCCURRED AT virtual Error rstudio::core::json::Value::parse(const char *) src/cpp/shared_core/json/Json.cpp:669; LOGGED FROM: void rstudio::session::modules::copilot::(anonymous namespace)::onBackgroundProcessing(bool) src/cpp/session/modules/SessionCopilot.cpp:1318
2025-03-14T19:48:42.123876Z [rsession-nik] ERROR json-parse error 1 (An error occurred while parsing json. Offset: 0); OCCURRED AT virtual Error rstudio::core::json::Value::parse(const char *) src/cpp/shared_core/json/Json.cpp:669; LOGGED FROM: void rstudio::session::modules::copilot::(anonymous namespace)::onBackgroundProcessing(bool) src/cpp/session/modules/SessionCopilot.cpp:1318
2025-03-14T19:48:42.127639Z [rsession-nik] ERROR [onStdout]: Internal error: response contains no Content-Length header.; LOGGED FROM: void rstudio::session::modules::copilot::(anonymous namespace)::agent::onStdout(ProcessOperations &, const std::string &) src/cpp/session/modules/SessionCopilot.cpp:875
2025-03-14T19:48:42.127639Z [rsession-nik] ERROR [onStdout]: Internal error: response contains no Content-Length header.; LOGGED FROM: void rstudio::session::modules::copilot::(anonymous namespace)::agent::onStdout(ProcessOperations &, const std::string &) src/cpp/session/modules/SessionCopilot.cpp:875

which seems to indicate that Copilot is returning unexpected Json - I don't know how to diagnose what Json is being returned vs. what is expected.

oooohhhhhh, i'm on the free version of Copilot, and may have hit my 2,000 code completions for the month.
Will see if the issue persists after April 1st.