Skip to content
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

Issue with Emacs 26 #473

Closed
noxdafox opened this issue Jun 24, 2018 · 8 comments
Closed

Issue with Emacs 26 #473

noxdafox opened this issue Jun 24, 2018 · 8 comments

Comments

@noxdafox
Copy link
Contributor

Greetings,

I was trying out Emacs 26 from Debian shanpshots and I get a very lengthy error as soon as I activate ycmd-mode.

Error sending BufferVisit request: (wrong-type-argument request-response #s(request-response 200 nil nil nil success http://127.0.0.1:34535/event_notification t (:type POST :params nil :data {"event_name":"BufferVisit","file_data":{"/home/noxdafox/test.py":{"contents":"print(\"Hello World\")\n","filetypes":["python"]}},"filepath":"/home/noxdafox/test.py","line_num":1,"column_num":1} :parser #[0 \301�\302 )\207 [json-array-type list json-read] 1] :headers ((Content-Type . application/json) (X-Ycm-Hmac . d8GPR0Imv8t6+8co/8+r/dla43cYFgEdTVT7dM0BqY8=)) :complete #[128 \302\300\303\301�""\207 [(closure ((d . #s(deferred identity deferred:default-errorback deferred:default-cancel #s(deferred #[257 \301�!\203�\0\211G\302Y\203�\0\211\303H�>\204�\0\304\305\306�D"\210\211\307H\310\311�"\210\211\207 [cl-struct-request-response-tags vectorp 14 0 signal wrong-type-argument request-response 3 ycmd--log-content HTTP RESPONSE CONTENT] 5 

(fn RESPONSE)] deferred:default-errorback deferred:default-cancel #s(deferred deferred:default-callback #[257 \301\302\300�#\210\303\304!\210\305\207 [BufferVisit message Error sending %s request: %s ycmd--report-status errored nil] 5 

(fn ERR)] deferred:default-cancel #s(deferred #[257 \300\203@\0r\300q\210\302�!\203;\0\211\303\304�\236A\236A\305\304�\236A\236A\306�\236A�\307\230\203-\0\310�!\2024\0\306\311��#\210\312\266\203\262�\202>\0\313\211�)\207\302�!\203o\0\211\303\304�\236A\236A\305\304�\236A\236A\306�\236A�\307\230\203e\0\310�!\202l\0\306\311��#\210\312\266\203\207\313\211�\207 [test.py ycmd--buffer-visit-flag ycmd--exception-p TYPE exception extra_conf_file message UnknownExtraConf ycmd--handle-extra-conf-exception %s: %s nil t] 9 

(fn RESPONSE)] deferred:default-errorback deferred:default-cancel #s(deferred #[0 r\300q\210\302 \211	\232?\205�\0\211�\303 \262�)\207 [test.py ycmd--last-modified-tick buffer-chars-modified-tick ycmd-notify-file-ready-to-parse] 3] deferred:default-errorback deferred:default-cancel nil nil nil) nil nil) nil nil) nil nil) nil nil)) (args :type POST :params nil :data {"event_name":"BufferVisit","file_data":{"/home/noxdafox/test.py":{"contents":"print(\"Hello World\")\n","filetypes":["python"]}},"filepath":"/home/noxdafox/test.py","line_num":1,"column_num":1} :parser #[0 \301�\302 )\207 [json-array-type list json-read] 1] :headers ((Content-Type . application/json) (X-Ycm-Hmac . d8GPR0Imv8t6+8co/8+r/dla43cYFgEdTVT7dM0BqY8=)) :complete #3) (url . http://127.0.0.1:34535/event_notification) t) (d &rest args) (deferred:callback-post d (plist-get args :response))) (#s(deferred identity deferred:default-errorback deferred:default-cancel #s(deferred #[257 \301�!\203�\0\211G\302Y\203�\0\211\303H�>\204�\0\304\305\306�D"\210\211\307H\310\311�"\210\211\207 [cl-struct-request-response-tags vectorp 14 0 signal wrong-type-argument request-response 3 ycmd--log-content HTTP RESPONSE CONTENT] 5 

(fn RESPONSE)] deferred:default-errorback deferred:default-cancel #s(deferred deferred:default-callback #[257 \301\302\300�#\210\303\304!\210\305\207 [BufferVisit message Error sending %s request: %s ycmd--report-status errored nil] 5 

(fn ERR)] deferred:default-cancel #s(deferred #[257 \300\203@\0r\300q\210\302�!\203;\0\211\303\304�\236A\236A\305\304�\236A\236A\306�\236A�\307\230\203-\0\310�!\2024\0\306\311��#\210\312\266\203\262�\202>\0\313\211�)\207\302�!\203o\0\211\303\304�\236A\236A\305\304�\236A\236A\306�\236A�\307\230\203e\0\310�!\202l\0\306\311��#\210\312\266\203\207\313\211�\207 [test.py ycmd--buffer-visit-flag ycmd--exception-p TYPE exception extra_conf_file message UnknownExtraConf ycmd--handle-extra-conf-exception %s: %s nil t] 9 

(fn RESPONSE)] deferred:default-errorback deferred:default-cancel #s(deferred #[0 r\300q\210\302 \211	\232?\205�\0\211�\303 \262�)\207 [test.py ycmd--last-modified-tick buffer-chars-modified-tick ycmd-notify-file-ready-to-parse] 3] deferred:default-errorback deferred:default-cancel nil nil nil) nil nil) nil nil) nil nil) nil nil)) apply append] 6 

(fn &rest ARGS2)] :error #[128 \302\300\303\301�""\207 [request-default-error-callback (http://127.0.0.1:34535/event_notification) apply append] 6 

(fn &rest ARGS2)] :url http://127.0.0.1:34535/event_notification :response #1) #<killed buffer> HTTP/1.1 200 OK
Content-Length: 2
Content-Type: application/json
Date: Sun, 24 Jun 2018 16:38:26 GMT
Server: waitress
X-Ycm-Hmac: vZn9GAJpO3a/a+onF+H4Y77nOAB6md9eN8uen/4PUx4=
 nil curl (/tmp/emacs-requestiej2HS)))

This repeats on every request against the YCMD server. The server logs do not show any error.

ycmd and emacs-ycmd are both up-to-date.

My init.el.

(require 'ycmd)
(add-hook 'after-init-hook #'global-ycmd-mode)
(set-variable 'ycmd-python-binary-path "/usr/bin/python3")
(set-variable 'ycmd-server-command
              '("python3" "/home/noxdafox/development/ycmd/ycmd"))
(set-variable 'ycmd-global-config
              "/home/noxdafox/.emacs.d/ycmd_global_config.py")

(require 'company-ycmd)
(company-ycmd-setup)

(require 'company)
(global-company-mode t)
(set 'company-idle-delay 0.1)
(require 'company-childframe)
(company-childframe-mode 1)
@noxdafox
Copy link
Contributor Author

Reverting to Emacs 25 "fixes" the issue.

@abingham
Copy link
Owner

Hmmm. It definitely works with Emacs 26 for me, but let me poke at it a bit and see what the problem might be. What versions of request and request-deferred are you using?

@noxdafox
Copy link
Contributor Author

noxdafox commented Jun 27, 2018

request: 20170131.1747
request-deferred: 20160419.1605

@abingham
Copy link
Owner

abingham commented Jul 2, 2018

Those are the versions I'm using, and everything seems to work for me on 26. I'm grasping at straws here, but could you clean out all of your .elc files before running 26?

@abingham
Copy link
Owner

FWIW, I just went through a 25->26 transition on one of my machines. I was initially seeing the same problem as you, but after clearing out my elpa directory everything (well, ycmd at least) seems to work.

@noxdafox
Copy link
Contributor Author

I suspect it's something similar, I will try tonight and let you know.

@noxdafox
Copy link
Contributor Author

Indeed it was the case. Removing all .elc files fixed the issue.

Do you know if there's a way I can do it via elpa or Emacs? Some command to clear the binary of the packages?

@abingham
Copy link
Owner

abingham commented Jul 13, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants