copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.78k stars 126 forks source link

"Unhandled status from server: 466 Please upgrade your Copilot extension to continue using this service." #14

Closed Liam-Scott-Russell closed 2 years ago

Liam-Scott-Russell commented 2 years ago

Hi there, first off: big thanks for making this package!

I just installed the package into my doom emacs, and am getting the following error in the logs when I call copilot-complete:

(I was able to log in and authenticate just fine, and I do have access to copilot in vs code).

[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "LogMessage") (params (level . 1) (message . "[INFO] [default] [2022-04-14T08:27:18.340Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex") (metadataStr . "[INFO] [default] [2022-04-14T08:27:18.340Z]") (extra . ["[fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex"])))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "LogMessage") (params (level . 1) (message . "[INFO] [default] [2022-04-14T08:27:18.555Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 213 ms") (metadataStr . "[INFO] [default] [2022-04-14T08:27:18.555Z]") (extra . ["request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 213 ms"])))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "Warning") (message . "")))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "LogMessage") (params (level . 3) (message . "[ERROR] [fetch] [2022-04-14T08:27:18.560Z] Unhandled status from server:,466,Please upgrade your Copilot extension to continue using this service.
") (metadataStr . "[ERROR] [fetch] [2022-04-14T08:27:18.560Z]") (extra . ["Unhandled status from server:" "466" "Please upgrade your Copilot extension to continue using this service.
"])))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "RemoveProgress") (message . "")))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "LogMessage") (params (level . 1) (message . "[INFO] [ghostText] [2022-04-14T08:27:18.560Z] Breaking, no choices") (metadataStr . "[INFO] [ghostText] [2022-04-14T08:27:18.560Z]") (extra . ["Breaking, no choices"])))
[INFO] Completion: ((error) (completions . []))

My config is basically copy/pasted from the readme.

; complete by copilot first, then company-mode
(defun my-tab ()
  (interactive)
  (or (copilot-accept-completion)
      (company-indent-or-complete-common nil)))

(use-package! copilot
    :after org
    :config
    (setq copilot-enable-predicates '(evil-insert-state-p))
    (add-hook 'prog-mode-hook 'copilot-mode)

    ; Make it work with company-mode
    (with-eval-after-load 'company
        ; disable inline previews
        (delq 'company-preview-if-just-one-frontend company-frontends)
        ; enable tab completion
        (define-key company-mode-map (kbd "<tab>") 'my-tab)
        (define-key company-mode-map (kbd "TAB") 'my-tab)
        (define-key company-active-map (kbd "<tab>") 'my-tab)
        (define-key company-active-map (kbd "TAB") 'my-tab)))

I'm kind of a novice, so please let me know if you need more info to help diagnose this.

Cheers!

zerolfx commented 2 years ago

Here is a similar issue: https://github.com/github/feedback/discussions/14931

The problem is from Copilot's server-side and got fixed now.

zerolfx commented 2 years ago

You happened to use the plugin at such an unlucky time 🤣.

Liam-Scott-Russell commented 2 years ago

Thanks so much, just checked and the issue is indeed resolved!