Solvedcider cannot restart repl after killed it

Use the template below when reporting bugs. Please, make sure that
you're running the latest stable CIDER and that the problem you're reporting
hasn't been reported (and potentially fixed) already.

Remove all of the placeholder text in your final report!

Expected behavior

I start a repl, works fine. then i kill it with: kill-this-buffer. then i try to start a new repl and it doesn't work.

Actual behavior

see above, but instead of opening a repl it sends the message: selecting deleted buffer to the mini-buffer

Steps to reproduce the problem

  1. start repl with: cider-jack-in-cljs
  2. kill repl with kill-this-buffer
  3. try to start repl with: cider-jack-in-cljs. Repl doesn't start and error message: selecting deleted buffer echoes in mini-buffer.

This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.

Environment & Version information

CIDER version information

;; CIDER 0.18.1snapshot (package: 20180903.2111), nREPL 0.2.13
;; Clojure 1.9.0, Java 1.8.0_172

Lein/Boot version

╰─➤  lein --version
Leiningen 2.8.1 on Java 1.8.0_172 OpenJDK 64-Bit Server VM

Emacs version

GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05

Operating system

╰─➤  uname -a
Linux archlinux 4.17.12-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 3 07:16:41 UTC 2018 x86_64 GNU/Linux
15 Answers

✔️Accepted Answer

I had the same issue. I don't know Emacs Lisp very well, but this change in the file elpa/cider-0.18.0/cider-connection.el fixed the problem:

(defun cider--gather-session-params (session)
  "Gather all params for a SESSION."
  (let (params)
    (dolist (repl (cdr session))
      (when (buffer-name repl)
        (setq params (cider--gather-connect-params params repl))))
    (when-let* ((server (cider--session-server session)))
      (setq params (cider--gather-connect-params params server)))

I've added the (when (buffer-name repl) ...) Basically the problem was that cider--gather-connect-params was called on a killed buffer, after you have closed a cider / nrepl connection. buffer-name returns nil, if it is a killed buffer.

Other Answers:

I have encountered this issue as well, the work around is to run both clj-quit and sesman-quit to get jack-in working again.

I have that problem with latest cider and using clojure-cli + figwheel

Related Issues:

cider cannot restart repl after killed it
I had the same issue I don't know Emacs Lisp very well Use the template below when reporting bugs Pl...
metabase Question mark in SQL query (postgres JSON operator) interpreted as prepared statement param
@agilliland ? is the Postgres JSONB operator to check whether an object contains a given key ...
metabase Connect to MongoDB error: Connection to ... successful, but could not connect to DB.
I was having the same issue and this solved it: I'm running a docker image of metabase and a separat...
metabase Unable to connect to MongoDB Atlas Cluster
Receiving the exact same error message: com.mongodb.MongoTimeoutException: Timed out after 3000 ms w...
metabase Add a template tag to use already defined queries
It would be great if we could pass variables to nested questions: At its simplest ...
babashka clojure.core.match
Just chiming in to say I'm also interested in using clojure.core.match with babashka! ...
clj kondo Convention for necessarily required but not explicitly used namespaces
Another option is: When there is no :as foo or :refer [foo] the tooling MUST assume that this namesp...
metabase Connections can not be acquired from the underlying database!
had this issue yesterday when upgrading from 0.30.* to 0.32.8 and fixed it by adding trustServerCert...
metabase Hide x-rays on homepage (alternatively: make it possible to select which database is shown)
I would like to be able to hide/disable x-rays for a different reason - they may result in expensive...
status react 'RCTBridgeModule.h' file not found
I had this issue and solved it by doing: rm -r node_modules/ rm -r ios/Pods npm install cd ios && po...
prelude error: Package ‘undo-tree-’ is unavailable
This looks like a consequence of this emacs bug:
spacemacs Describe variable fails due to missing definition of "helm-bookmark-map" on develop
If there are any users of master branch who suffer this error: calling SPC f b or adding (require 'h...
spacemacs File error: Cannot open load file, No such file or directory, bind-map
For me it is solved after using: Description Freshly installed spacemacs does not work because of in...
projectile projectile-mode makes editior extremally laggy and slow
Hmm I guess I underestimated this - I'll try to take a look at it soon I'm using projectile for a wh...
spacemacs Org source block babel expansion stopped working
@srgkoshelev On develop it seems the version of org-mode has templating separated and org-tempo modu...
spacemacs How to use mouse wheel in terminal ?
Thanks much! I got it working in OS X with iTerm2 with this I use spacemacs in terminal And when I u...
spacemacs How to add MELPA package (beginner)?
If it's just a simple package there's no need to create a layer to install it See this part of the d...
spacemacs Fail to install evil-unimpaired
@chengyi could you please try removing ~/.emacs.d/.cache and starting emacs again? ...
spacemacs company-tern got pulled from melpa
When using lsp for JavaScript the company-tern package is not required I was just trying out emacs 2...
spacemacs Error (use-package): helm/:config: Helm-mode enabled (Ido is incompatible with Helm-mode, disabling it)
Will be fixed when #11646 is merged In the meantime you can add (ido-mode -1) to your user-config an...
spacemacs Error when opening ansi-term in zsh
I had the same issue Description When I open ansi-term ...
emacs which key Error running timer ‘which-key--update’: (void-function display-buffer-in-major-side-window)
If that works you can try this as a workaround I don't have time to look into this right now unfortu...
spacemacs On startup, this warning message appears: (Spacemacs) Warning: tern binary not found!
the easy way is install tern using npm npm i tern -g Description On startup ...
spacemacs exec-path-from-shell :init: Expected printf output from shell, but got: ""
FWIW I'm getting this with the most recent version of fish. When i start specemacs i get error: Afte...
doom emacs A Bug on fresh installation
This appears to be tied to the same issue that is causing #1566 Long story short: I'm not sure what ...
spacemacs Can't install any additional packages. Getting "package is unavailable. Is the package name misspelled?"
Deleting .emacs.d/elpa and restarting spacemacs works. I had spacemacs working perfectly fine maybe ...
spacemacs File error: Cannot open load file, No such file or directory, up-core
@everedifice @davidkern Okay so the workaround is to force Spacemacs to use melpa-stable rather than...
doom emacs Error (wrong-number-of-arguments (3 . 4) 2) on latest Emacs 28
Ah I see the issue it's fixed in nix-mode: NixOS/nix-mode@e8e5211 This is half correct This problem ...
doom emacs void-symbol: native-comp-deferred-compilation-deny-list errors on install/upgrade
Odd Is comp included with Emacs 27 these days or something? While I figure this out here is a quick ...
spacemacs move-text-down does not maintain proper selection when using visual line mode
@jcalve w/ the latest soon to be on MELPA evil this works: Description If you select multiple lines ...
spacemacs Layer request vue language
OK this is a package not a layer it happens that @codefalling also provides instructions for Spacema...
projectile file-missing "Setting current directory" "No such file or directory"
As a workaround set projectile-git-submodule-command to nil. Expected behavior projectile-find-file ...
use package Install auctex
@npostavs This doesn't actually work with :defer as auctex.el isn't automatically loaded To test try...
spacemacs Unable to redo after package update (user-error: Customize ‘evil-undo-system’) made undo-tree optional: Make undo-tree an optional dependency em...
doom emacs [BUG] doom update fails with timeouts, hangs and/or errors
Folks have reported several issues with doom upgrade I am aware of these and am working on a solutio...
spacemacs Linting problems with javascript layer
In addition to all of the above (credit goes to those folks)... for Spacemacs users .. in dotspacema...
spacemacs Unable to use some themes (e.g. darktooth and gruvbox)
As a non-ideal temporary workaround you can make the themes work by manually loading autothemer.el a...
doom emacs Install Error
@SeAL80s The correct flow is clone doom-emacs cd ~/.emacs.d && git checkout develop mkdir ~/.doom.d ...
magit Error in latest version. Popups are unusable! cl-etypecase failed: [eieio-class-tag--transient-column ...]
As a short term work around deleting elpa/transient-VERISON/transient.elc and restarting emacs makes...
spacemacs can't install it
Hey for anyone that is still playing around with this I added (require 'package) (add-to-list 'packa...
spacemacs Helm M-x, Recent Files not fuzzy matching
If you are using emacs-27 Description Fuzzy mode not enabled for Helm M-x Helm Recent Files ...
spacemacs error: (wrong-type-argument package-desc nil)
Just for completeness there was a stray BSD tar creeping around in my PATH fixed it via specifying t...
doom emacs max-lisp-eval-depth on doom upgrade
I've tracked down the issue and am working on a fix In the mean time adding this to ~/.doom.d/init.e...
spacemacs Multiple copies of spacemacs locking the .cache/recentf
Still suffering this problem on Mac when I'm running a single instance of emacs It occurs every time...
spacemacs org mode export broken emacs 25.1.1 void org-link-types
I just had this problem too I had installed a new version of org-mode from elpa ...
spacemacs Spacemacs hangs frequently.
You can try to debug this following this answer: I also e...
spacemacs Themes not loading
I found some other issues on this as well but the gist is autothemer is loading after the themes ...
magit Performance issues on OSX
I can confirm that doing what was suggested makes for a significant improvement ...
spacemacs How to Avoid dotspacemacs/emacs-custom-settings?
Sorry for the late push I mentioned this in a closed thread but thought it would be better to open a...
spacemacs Auto-completion for Python does not working
Apparently company-anaconda is not set as a company-backends for some weird reason Remember to undo ...