What did you expect to happen?
doom upgrade (no args) to run
What actually happened?
doom upgrade errors out
Preparing to upgrade Doom Emacs and its packages...
x There was an unexpected error:
Type: error
Message:
error
Data:
"Failed to fetch from upstream"
Run the command again with the -d (or --debug) switch to enable debug
mode and (hopefully) generate a backtrace from this error:
doom -d upgrade
If you file a bug report, please include it!
Steps to reproduce:
bin/doom upgrade from the command-lineSystem information:
emacs version 26.3
features NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS LCMS2
build Apr 24, 2020
buildopts (--enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-mac/emacs-26.3-z-mac-7.9/share/info/emacs --prefix=/usr/local/Cellar/emacs-mac/emacs-26.3-z-mac-7.9 --with-mac --enable-mac-app=/usr/local/Cellar/emacs-mac/emacs-26.3-z-mac-7.9 --with-gnutls --with-modules)
windowsys mac
daemonp server-running
doom version 2.0.9
build HEAD -> develop, seanfarley/develop, origin/develop, origin/HEAD ee5d0a878 2020-05-26 16:28:59 -0400
dir ~/projects/dotfiles/doom/
system type darwin
config x86_64-apple-darwin18.7.0
shell /usr/local/bin/bash
uname Darwin 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
path (~/.local/bin ~/.cargo/bin ~/projects/go/bin ~/Library/Python/3.7/bin ~/.npm/bin /opt/X11/bin /usr/local/bin /usr/local/sbin /usr/local/cuda/bin /usr/local/share/dotnet /usr/local/opt/coreutils/libexec/gnubin /usr/local/opt/make/libexec/gnubin /usr/local/opt/texinfo/bin /usr/local/Cellar/qt/5.14.2/bin /Library/TeX/texbin /usr/bin /bin /usr/sbin /sbin /usr/local/Cellar/emacs-mac/emacs-26.3-z-mac-7.9/libexec/emacs/26.3/x86_64-apple-darwin18.7.0/)
config envfile envvar-file
elc-files 0
modules (:completion (company +auto +childframe) (ivy +childframe +icons +prescient) :ui doom doom-dashboard fill-column hl-todo indent-guides modeline nav-flash ophints (popup +all +defaults) pretty-code treemacs vc-gutter vi-tilde-fringe window-select workspaces zen :editor file-templates fold multiple-cursors (objed +manual) rotate-text snippets word-wrap :emacs (dired +icons) electric ibuffer undo vc :term vterm :checkers (syntax +childframe) spell grammar :tools ansible biblio debugger docker editorconfig eval gist (lookup +docsets +dictionary) lsp macos (magit +forge) make pdf prodigy upload :lang (cc +lsp) clojure common-lisp data emacs-lisp go hy (javascript +lsp) (latex +latexmk) lua markdown (org +brain +dragndrop +gnuplot +hugo +journal +jupyter +pandoc +pomodoro +present +roam) (python +cython +lsp) rest rst sh (swift +lsp) web :email mu4e :app irc :config (default +bindings +smartparens +snippets))
packages ((banner-comment) (bitwarden :recipe (:host github :repo seanfarley/emacs-bitwarden)) (col-highlight :recipe (:host github :repo emacsmirror/col-highlight)) (color-identifiers-mode) (counsel-jq) (discover-my-major) (dot-mode) (easy-hugo) (elisp-slime-nav) (embrace) (emr) (fancy-narrow) (focus) (goto-chg) (ialign) (lsp-focus :recipe (:host github :repo emacs-lsp/lsp-focus)) (lsp-origami) (lsp-treemacs) (magit-circleci) (mpdel) (ivy-mpdel) (mu4e-alert) (mu4e-patch :recipe (:host github :repo seanfarley/mu4e-patch)) (nerd-font :recipe (:host github :repo twlz0ne/nerd-fonts.el)) (nov) (org-ref) (package-lint) (page-break-lines) (pony-mode) (resize-window) (simple-httpd) (simple-mpc :recipe (:local-repo ~/projects/simple-mpc)) (sly-quicklisp) (sphinx-doc) (srefactor) (sx) (unfill) (webpaste) (whole-line-or-region) (which-key-posframe) (xonsh-mode :recipe (:host github :repo seanfarley/xonsh-mode)) (ztree))
unpin (n/a)
elpa (n/a)
Running with -p successfully runs. I tried to send that argument (manually) to M-x doom/upgrade from within emacs but got this error (in *Messages*):
Comint finished
error in process sentinel: progn: Symbol’s value as variable is void: doom-sync-window
error in process sentinel: Symbol’s value as variable is void: doom-sync-window
I'm having the same issue on macOS. I'm on commit
* 7ed96590e (HEAD -> develop, origin/develop) Fix #3232: wrong-type-argument arrayp error
Error
~/.emacs.d/bin(develop ✔) ./doom -d upgrade
- Debug mode on
> Preparing to upgrade Doom Emacs and its packages...
x There was an unexpected error:
Type: error
Message:
error
Data:
"Failed to fetch from upstream"
Run the command again with the -d (or --debug) switch to enable debug
mode and (hopefully) generate a backtrace from this error:
doom -d upgrade
If you file a bug report, please include it!
System Info
emacs version 26.3
features JPEG RSVG IMAGEMAGICK GLIB NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2
build Sep 02, 2019
buildopts (--disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus/26.3/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus/26.3 --with-xml2 --without-dbus --with-gnutls --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained)
windowsys ns
daemonp server-running
doom version 2.0.9
build HEAD -> develop, origin/develop 7ed96590e 2020-05-26 21:45:31 -0400
dir ~/.doom.d/
system type darwin
config x86_64-apple-darwin18.7.0
shell /bin/zsh
uname Darwin 18.7.0 Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASE_X86_64 x86_64
I had the same problem. Solved it by killing the Doom directory and reinstalling it following the installation guide. You can save everything in .local except for .local\straight.
Those are some strange errors, but it could be because some breaking changes were made to Doom's upgrader recently. Older versions of Doom naively reload Doom core (in the same session) after pulling changes, which is problematic if the code has changed drastically.
In newer versions of Doom, we restart doom upgrade altogether after pulling Doom, but folks upgrading from old versions are likely to see errors.
If all else fails, try upgrading manually (it'll at least save you the pain of reinstalling everything from scratch)
cd ~/.emacs.d
git pull
bin/doom sync -u
I'm not sure how I'd be running old versions of doom since I (almost) daily upgrade doom? I've just recently git pull --rebase and after a clean run of doom sync I'm still seeing this error.
Side request: can we get a version of M-x doom/upgrade (or doom/sync) that can take a parameter to only upgrade packages? Maybe C-u M-x doom/upgrade?
I tried git pull --rebase, then doom sync -u and am now still getting this error since last doom upgrade performed 8 hours ago:
> Synchronizing your config with Doom Emacs...
> Regenerating envvars file at "~/.emacs.d/.local/env"
- Ignoring HOME=/Users/yeongsheng
- Ignoring PWD=/Users/yeongsheng/.emacs.d
- Ignoring __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x64
- Ignoring SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.r2JxdiQ5eI/Listeners
- Ignoring TERM=screen-256color
✓ Successfully generated "~/.emacs.d/.local/env"
> Installing packages...
→ Building vue-mode...
→ Building vue-mode → Building mmm-mode...
x There was an unexpected error:
Type: doom-package-error
Message:
Error with packages
Data:
"vue-mode"
(error "mmm-class.el:0:0: error: scan-error: (Unbalanced parentheses 7955 12984)")
Run the command again with the -d (or --debug) switch to enable debug
mode and (hopefully) generate a backtrace from this error:
doom -d sync -u
If you file a bug report, please include it!
Running doom -d sync -u generates the same error stack.
@yeongsheng-tan Please open a new issue. Your error is different from OP's. Please remember to include your M-x doom/info, as I cannot reproduce it.
"Failed to fetch from upstream"
@seanfarley What happens if you run these shell commands:
cd ~/.emacs.d
git remote add _upgrade https://github.com/hlissner/doom-emacs
git fetch --tags _upgrade develop
git remote add _upgrade https://github.com/hlissner/doom-emacs git fetch --tags _upgrade develop
I get the following error when performed above commands:
> Preparing to upgrade Doom Emacs and its packages...
x There was an unexpected error:
Type: error
Message:
error
Data:
"Failed to fetch from upstream"
Run the command again with the -d (or --debug) switch to enable debug
mode and (hopefully) generate a backtrace from this error:
doom -d upgrade
If you file a bug report, please include it!
Closing this and re-opened as new issue at https://github.com/hlissner/doom-emacs/issues/3248
I did a rm -rf ~/.emacs.d and re-installed doom but I still get the same error.
I checked ~/.emacs.d/core/cli/upgrade.el and it seems
(or (zerop (car (setq result (doom-call-process "git" "fetch" "--tags" doom-repo-remote branch))))
Results in the execution of
~/.emacs.d/bin(develop ✗) git fetch --tags _upgrade remotes/origin/develop
fatal: couldn't find remote ref remotes/origin/develop
However running
~/.emacs.d/bin(develop ✗) git fetch --tags _upgrade develop
From github.com:hlissner/doom-emacs
* branch develop -> FETCH_HEAD
* [new branch] develop -> _upgrade/develop
Does seem to work.
I am on git version
~/.emacs.d/bin(develop ✗) git --version
git version 2.26.2
Dang. That seemed like it was going to work but it's the same error as @drayah (I'm on the same git version). I've also noticed that _upgrade is deleted after running (and failing) bin/doom upgrade.
What does git name-rev --name-only HEAD output from ~/.emacs.d?
$ cd ~/.emacs.d
$ git name-rev --name-only HEAD
remotes/origin/develop
$ cd ~/.emacs.d $ git name-rev --name-only HEAD remotes/origin/develop
Same result here
Give aec94f5 a try. I'm not sure if this is a difference between git 2.25 (what I have) and 2.26, or what the conditions are for git name-rev to output a fully qualified ref, but aec94f5 should deal with it. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!
🎉 🥳 🎆 (just in case it wasn't obvious: aec94f5 worked!)
I had symptoms of the same issue - Failed to fetch from upstream - that led me here.
In my case, I recently globally configured git to use ssh instead of http using
git config --global url.ssh://[email protected]/.insteadOf https://github.com and forgot I had done so.
Removing the two lines this added to ~/.gitconfig resolved the issue.
Most helpful comment
Give aec94f5 a try. I'm not sure if this is a difference between git 2.25 (what I have) and 2.26, or what the conditions are for
git name-revto output a fully qualified ref, but aec94f5 should deal with it. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!