caldwell / build-emacs

Build scripts for www.emacsformacosx.com
http://www.emacsformacosx.com/about
GNU General Public License v3.0
364 stars 61 forks source link

Broken Launcher, "Emacs failed to launch!" #118

Closed prahaladramji closed 2 years ago

prahaladramji commented 2 years ago

macOS 12.3.1 (arm64) Emacs 28.1-2 (installed using brew install --cask emacs) doom-emacs configuration framework.

Emacs works fine, when launched in a terminal either with emacs -nw or emacs both work well. But launching using the Application launcher (the new rust launcher) fails with the below error.

Emacs failed to launch!
expected value at line 1 column 1

FYI v28.1-1 package worked, but the recent commit/change from 2 days ago broke this.

image

mnsanghvi commented 2 years ago

I am seeing the same issue. 28.1-1 had the issue where the dialog would show after exiting from Emacs. Now it happens when you run the launcher from the Dock.

% sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.7
BuildVersion:   19H524

Homebrew install information

% brew info --cask emacs
emacs: 28.1-2
https://emacsformacosx.com/
/Users/msanghvi/brew/Caskroom/emacs/28.1-2 (5 files, 275.0KB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/emacs.rb
==> Name
Emacs
==> Description
Text editor
==> Artifacts
Emacs.app (App)
/Users/msanghvi/Applications/Emacs.app/Contents/MacOS/Emacs -> emacs (Binary)
/Users/msanghvi/Applications/Emacs.app/Contents/MacOS/bin/ebrowse (Binary)
/Users/msanghvi/Applications/Emacs.app/Contents/MacOS/bin/emacsclient (Binary)
/Users/msanghvi/Applications/Emacs.app/Contents/MacOS/bin/etags (Binary)
/Users/msanghvi/Applications/Emacs.app/Contents/Resources/man/man1/ebrowse.1.gz (Manpage)
/Users/msanghvi/Applications/Emacs.app/Contents/Resources/man/man1/emacs.1.gz (Manpage)
/Users/msanghvi/Applications/Emacs.app/Contents/Resources/man/man1/emacsclient.1.gz (Manpage)
/Users/msanghvi/Applications/Emacs.app/Contents/Resources/man/man1/etags.1.gz (Manpage)
==> Analytics
install: 4,259 (30 days), 11,567 (90 days), 40,607 (365 days)

Here is the screen I get

image
caldwell commented 2 years ago

By any chance does your .bashrc/.profile/.zshrc/etc print to stdout? I suspect it does and I didn't account for that since mine happens to be silent.

I'm creating a fix now.

prahaladramji commented 2 years ago

In my case, during a successful load, zshrc does not print to stdout, but since i load tmux and also a few tools during startup (pyenv, nvm, ohmyzsh updates) do tend to print to stdout or stderr during startup.

I should potentially seperate the start sequence based on a login shell vs interactive shell.

Thanks for the fix.

mnsanghvi commented 2 years ago

I do not have anything echoing or printf'ing in ~/.bashrc, ~/.profile or ~/.bash_profile.

mnsanghvi commented 2 years ago

New build works as expected. Thank you.