Comments (9)
It seems make-instance
or make-process
failed, which caused copilot--connection
to become nil
.
Can you open a new issue?
Also, please attach relative stuff in *Message*
, *copilot stderr*
and *copilot event*
?
from copilot.el.
It is an upstream problem. See https://github.com/github/copilot.vim#getting-started
I will update as soon as copilot.vim supports NodeJS v18+.
from copilot.el.
Workaround: install node.js v17 via nvm, and set the copilot-node-executable
variable to that executable.
from copilot.el.
I tested with node.js 18, and it works fine. So I remove the node version restriction from the code (though the upstream still indicates it as unsupported).
I confirmed that node.js 18 will still cause the plugin unusable on python, go, js files.
from copilot.el.
I have the same problem with Node 18.1:
I got that after copilot-login
:
Node 18+ is not supported but found 18.1
cl-no-applicable-method: No applicable method: jsonrpc--next-request-id, nil
from copilot.el.
@maurelio1234 Node 18 is unsupported, please see the workaround below.
Workaround: install node.js v17 via nvm, and set the
copilot-node-executable
variable to that executable.
from copilot.el.
Thanks,
It fixed the first line, but I still get the second one:
cl-no-applicable-method: No applicable method: jsonrpc--request-continuations, nil
from copilot.el.
@maurelio1234 Can you use M-x toggle-debug-on-error
and provide the stack trace?
from copilot.el.
Yes, I was trying to debug it... but I am still a bit lost on the calls.
signal(cl-no-applicable-method (jsonrpc--next-request-id nil))
cl-no-applicable-method(#s(cl--generic :name jsonrpc--next-request-id :dispatches ((0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #<bytecode 0x7c0fe02c20e345f>)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #<bytecode -0x1cba9713a96764e4>) :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x2b7bed08469105e>)))) :method-table (#s(cl--generic-method :specializers (jsonrpc-connection) :qualifiers nil :uses-cnm nil :function #f(compiled-function (this) "Retrieve the slot `-next-request-id' from an object of class\n`jsonrpc-connection'." #<bytecode -0xdffd8319754bae5>))) :options nil) nil)
apply(cl-no-applicable-method #s(cl--generic :name jsonrpc--next-request-id :dispatches ((0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #<bytecode 0x7c0fe02c20e345f>)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #<bytecode -0x1cba9713a96764e4>) :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x2b7bed08469105e>)))) :method-table (#s(cl--generic-method :specializers (jsonrpc-connection) :qualifiers nil :uses-cnm nil :function #f(compiled-function (this) "Retrieve the slot `-next-request-id' from an object of class\n`jsonrpc-connection'." #<bytecode -0xdffd8319754bae5>))) :options nil) nil)
#f(compiled-function (&rest args) #<bytecode 0x34ead4d00f21edf>)(nil)
apply(#f(compiled-function (&rest args) #<bytecode 0x34ead4d00f21edf>) nil nil)
jsonrpc--next-request-id(nil)
jsonrpc--async-request-1(nil signInInitiate 'nil :success-fn #f(compiled-function (result) #<bytecode -0x158b5a5a62aebec4>) :error-fn #f(compiled-function (jsonrpc-lambda-elem0) #<bytecode -0x12137907ed4b628b>) :timeout-fn #f(compiled-function () #<bytecode -0x1ff562e9dcbb93b8>))
apply(jsonrpc--async-request-1 nil signInInitiate 'nil :success-fn #f(compiled-function (result) #<bytecode -0x158b5a5a62aebec4>) :error-fn #f(compiled-function (jsonrpc-lambda-elem0) #<bytecode -0x12137907ed4b628b>) :timeout-fn #f(compiled-function () #<bytecode -0x1ff562e9dcbb93b8>) nil)
jsonrpc-request(nil signInInitiate 'nil)
(let ((input0 (jsonrpc-request copilot--connection 'signInInitiate ''nil))) (let* ((status (plist-get input0 :status)) (user (plist-get input0 :user)) (user-code (plist-get input0 :userCode)) (verification-uri (plist-get input0 :verificationUri))) (if (s-equals-p status "AlreadySignedIn") (progn (message "Already signed in as %s." user) (throw '--cl-block-copilot-login-- nil))) (if (display-graphic-p) (progn (gui-set-selection 'CLIPBOARD user-code) (read-from-minibuffer (format "Your one-time code %s is copied. Press ENTER to op..." user-code)) (browse-url verification-uri) (read-from-minibuffer "Press ENTER if you finish authorizing.")) (read-from-minibuffer (format "First copy your one-time code: %s. Press ENTER to ..." user-code)) (read-from-minibuffer (format "Please open %s in your browser. Press ENTER if you..." verification-uri))) (message "Verifying...") (condition-case err (jsonrpc-request copilot--connection 'signInConfirm (list :userCode user-code)) (jsonrpc-error (message "Authentication failure: %s" (alist-get 'jsonrpc-error-message (cdr (cdr err)))))) (let ((input0 (jsonrpc-request copilot--connection 'checkStatus ''nil))) (let* ((status (plist-get input0 :status)) (user (plist-get input0 :user))) (if (s-equals-p status "NoTelemetryConsent") (progn (if (yes-or-no-p "I agree to these telemetry terms as part of the Gi...") (jsonrpc-request copilot--connection ... ...) (throw ... nil)))) (message "Authenticated as GitHub user %s." user)))))
(catch '--cl-block-copilot-login-- (let ((input0 (jsonrpc-request copilot--connection 'signInInitiate ''nil))) (let* ((status (plist-get input0 :status)) (user (plist-get input0 :user)) (user-code (plist-get input0 :userCode)) (verification-uri (plist-get input0 :verificationUri))) (if (s-equals-p status "AlreadySignedIn") (progn (message "Already signed in as %s." user) (throw '--cl-block-copilot-login-- nil))) (if (display-graphic-p) (progn (gui-set-selection 'CLIPBOARD user-code) (read-from-minibuffer (format "Your one-time code %s is copied. Press ENTER to op..." user-code)) (browse-url verification-uri) (read-from-minibuffer "Press ENTER if you finish authorizing.")) (read-from-minibuffer (format "First copy your one-time code: %s. Press ENTER to ..." user-code)) (read-from-minibuffer (format "Please open %s in your browser. Press ENTER if you..." verification-uri))) (message "Verifying...") (condition-case err (jsonrpc-request copilot--connection 'signInConfirm (list :userCode user-code)) (jsonrpc-error (message "Authentication failure: %s" (alist-get 'jsonrpc-error-message (cdr ...))))) (let ((input0 (jsonrpc-request copilot--connection 'checkStatus '...))) (let* ((status (plist-get input0 :status)) (user (plist-get input0 :user))) (if (s-equals-p status "NoTelemetryConsent") (progn (if ... ... ...))) (message "Authenticated as GitHub user %s." user))))))
(closure (t) nil "Login to Copilot." (interactive) (catch '--cl-block-copilot-login-- (let ((input0 (jsonrpc-request copilot--connection 'signInInitiate ''nil))) (let* ((status (plist-get input0 :status)) (user (plist-get input0 :user)) (user-code (plist-get input0 :userCode)) (verification-uri (plist-get input0 :verificationUri))) (if (s-equals-p status "AlreadySignedIn") (progn (message "Already signed in as %s." user) (throw '--cl-block-copilot-login-- nil))) (if (display-graphic-p) (progn (gui-set-selection 'CLIPBOARD user-code) (read-from-minibuffer (format "Your one-time code %s is copied. Press ENTER to op..." user-code)) (browse-url verification-uri) (read-from-minibuffer "Press ENTER if you finish authorizing.")) (read-from-minibuffer (format "First copy your one-time code: %s. Press ENTER to ..." user-code)) (read-from-minibuffer (format "Please open %s in your browser. Press ENTER if you..." verification-uri))) (message "Verifying...") (condition-case err (jsonrpc-request copilot--connection 'signInConfirm (list :userCode user-code)) (jsonrpc-error (message "Authentication failure: %s" (alist-get ... ...)))) (let ((input0 (jsonrpc-request copilot--connection ... ...))) (let* ((status ...) (user ...)) (if (s-equals-p status "NoTelemetryConsent") (progn ...)) (message "Authenticated as GitHub user %s." user)))))))()
apply((closure (t) nil "Login to Copilot." (interactive) (catch '--cl-block-copilot-login-- (let ((input0 (jsonrpc-request copilot--connection 'signInInitiate '...))) (let* ((status (plist-get input0 :status)) (user (plist-get input0 :user)) (user-code (plist-get input0 :userCode)) (verification-uri (plist-get input0 :verificationUri))) (if (s-equals-p status "AlreadySignedIn") (progn (message "Already signed in as %s." user) (throw ... nil))) (if (display-graphic-p) (progn (gui-set-selection ... user-code) (read-from-minibuffer ...) (browse-url verification-uri) (read-from-minibuffer "Press ENTER if you finish authorizing.")) (read-from-minibuffer (format "First copy your one-time code: %s. Press ENTER to ..." user-code)) (read-from-minibuffer (format "Please open %s in your browser. Press ENTER if you..." verification-uri))) (message "Verifying...") (condition-case err (jsonrpc-request copilot--connection 'signInConfirm (list :userCode user-code)) (jsonrpc-error (message "Authentication failure: %s" ...))) (let ((input0 ...)) (let* (... ...) (if ... ...) (message "Authenticated as GitHub user %s." user))))))) nil)
* copilot-login()
funcall-interactively(copilot-login)
call-interactively(copilot-login record nil)
command-execute(copilot-login record)
counsel-M-x-action("copilot-login")
ivy-call()
ivy-read("M-x " [org-capture-goto-last-stored magit-section-show-headings log-edit-remember-comment timer-next-integral-multiple-of-time archive-proper-file-start tramp-completion-handle-file-name-all-completions archive--file-desc-mode straight-vc-clone backquote-listify verification-uri ert-test-passed-duration--cmacro c-electric-lt-gt pcomplete-stub japanese-hiragana-two-byte cc-vars &error link-name magit-xref-insert-button 0 f-ancestor-of\? files--splice-dirname-file deft-hash-summaries message-expand-name-databases transient:magit-diff-refresh:--irreversible-delete autoload-find-file copilot-login flycheck-coffee-coffeelint-executable magit-list-modified-modules kmacro-pop-ring1 mu4e-cited-7-face browse-url-gnome-moz-arguments flycheck-pug-executable dircolors-face-ps xref--push-markers 0 event-convert-list 0 edconf-custom-hooks int-file-name kmacro-p use-package-handler/:interpreter magit-filename flycheck-previous-error server--on-display-p zoo Futura xref-group tsc-node-named-p tramp-handle-make-auto-save-file-name puny-encode-digit ...] :predicate #f(compiled-function (sym) #<bytecode -0x802b1d6cde289c9>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input "" :caller counsel-M-x)
counsel-M-x("")
me/counsel-M-x()
funcall-interactively(me/counsel-M-x)
call-interactively(me/counsel-M-x nil nil)
command-execute(me/counsel-M-x)
from copilot.el.
Related Issues (20)
- Out-of-order characters with typescript-mode when electric-indent-mode is activated and an active suggestion is shown HOT 6
- Sometimes, copilot.el's overlay is not considered an active overlay (and thus, the copilot-completion-map is not active) HOT 13
- copilot-indentation-alist requires the indent value to be a symbol HOT 4
- Change the org icon? HOT 11
- Auto balance s expressions HOT 2
- Copilot fails at login HOT 1
- jsonrpc process connection error HOT 2
- Latest commit (f8283e4) causes runtime exception: (wrong-type-argument package-desc nil) HOT 3
- PR #259 breaks startup HOT 4
- copilot--on-doc-close attempts to start the copilot agent, failing on tramp HOT 2
- Documentation seems to be missing `f` dependency in installation instructions HOT 1
- Error when used in combination with dashboard showing bookmarks HOT 6
- How to hide *copilot events* buffer when copilot-log-max is 0 HOT 2
- Warning (copilot): copilot--infer-indentation-offset found no mode-specific indentation offset. HOT 4
- Can I use a token for authentication? HOT 3
- Documentation surrounding how the language is detected seems incomplete in light of recent commit
- copilot-mode hangs and then prevents buffer from being foregrounded HOT 2
- Copilot MaxListenersExceededWarning, stops working
- How to prevent copilot from trying to write comments
- error duing `copilot--on-doc-change` in vertico completions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from copilot.el.