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

Fail to launch from Spotlight #1388

Open
TheKevJames opened this issue Jun 21, 2018 · 35 comments
Open

Fail to launch from Spotlight #1388

TheKevJames opened this issue Jun 21, 2018 · 35 comments

Comments

@TheKevJames
Copy link

Mac OSX Sierra 10.12.6 (16G1314)

Running the alacritty binary works for me, running the .app bundle from a terminal works, but running the .app bundle from Spotlight does not.

I built alacritty with: git clone https://github.com/jwilm/alacritty.git && cd alacritty && make app && cp -r target/release/osx/Alacritty.app /Applications/

  • running /Applications/Alacritty.app/Contents/MacOS/alacritty from another terminal session works
  • running open /Applications/Alacritty.app from another terminal session works
  • running Alacritty.app by opening spotlight, searching for alacritty, and hitting enter fails silently
  • running open /Applications/Alacritty.app from another terminal session, pinning the opened version to the taskbar, closing the original instance, and then launching by clicking the taskbar pin fails silently

Is there any way to provide additional debug info? The best I've got is the following, which is the syslog output from attempting to launch alacritty through spotlight.

The IOFB failure line is probably a red herring, since it seems to be occurring regularly on my system regardless of alacritty.

default	19:09:51.701711 -0700	kernel	[alacritty pid:4121 mux-aware] starting, non-mux-aware app count 0, switch-state 0 IG FBs 1 EG FBs 0:0 power-state 6 3D idle HDA idle
default	19:09:51.709483 -0700	kernel	[alacritty pid:4121 non-mux-aware] starting, non-mux-aware app count 1, switch-state 0 IG FBs 1 EG FBs 0:0 power-state 6 3D idle HDA idle
default	19:09:51.709505 -0700	kernel	 PEG (usr IGD extdisp 0 capture 0 non-mux-aware app 1 ac 0)
default	19:09:51.709527 -0700	kernel	-------> Switching from IGD to PEG
default	19:09:51.725709 -0700	kernel	:::::::> PEG start powerup [0m 7.653s downtime]
default	19:09:52.128407 -0700	kernel	*******> PEG powerup took: 0.403s
default	19:09:52.223467 -0700	kernel	kPEEnableScreen 1
default	19:09:52.242026 -0700	kernel	+ IOAudioDevice[<private>]::protectedSetPowerState(1, <private>)
default	19:09:52.242034 -0700	kernel	+ IOAudioDevice[<private>]::initiatePowerStateChange(<private>) - current = 0 - pending = 1
default	19:09:52.243878 -0700	kernel	+- IOAudioDevice[<private>]::flushAudioControls()
default	19:09:52.243897 -0700	kernel	+ IOAudioDevice[<private>]::protectedCompletePowerStateChange() - current = 0 - pending = 2
default	19:09:52.243902 -0700	kernel	- IOAudioDevice[<private>]::protectedCompletePowerStateChange() - current = 2 - pending = 2 returns 0x0
default	19:09:52.243907 -0700	kernel	+ IOAudioDevice[<private>]::protectedCompletePowerStateChange() - current = 2 - pending = 2
default	19:09:52.243910 -0700	kernel	- IOAudioDevice[<private>]::protectedCompletePowerStateChange() - current = 2 - pending = 2 returns 0x0
default	19:09:52.243912 -0700	kernel	- IOAudioDevice[<private>]::initiatePowerStateChange(<private>) - current = 2 - pending = 2 returns 0x0
default	19:09:52.243914 -0700	kernel	- IOAudioDevice[<private>]::protectedSetPowerState(1, <private>) returns 0x0
error	19:09:52.263661 -0700	WindowServer	[ERROR] - Unable to find display pipe for IOFB service: 18439
default	19:09:52.316740 -0700	loginwindow	    token = 1000323
default	19:09:52.316909 -0700	loginwindow	    token = 1000324
default	19:09:52.320319 -0700	sharingd	Display added (id 69733378)
default	19:09:52.327274 -0700	kernel	=======> Switch completed, PEG active
default	19:09:52.420811 -0700	PowerChime	PowerChime: 1736.966409: handleDisplayHardwareChanged ENTERED
default	19:09:52.487951 -0700	kernel	FB0 Conection status change: Connected --> Disconnected
default	19:09:52.643145 -0700	kernel	[alacritty pid 4121 mux-aware] exiting, non-mux-aware app count 1, runtime: 0:00:00.942
default	19:09:52.643351 -0700	kernel	[alacritty pid 4121 non-mux-aware] exiting, non-mux-aware app count 0, runtime: 0:00:00.934
@simmel
Copy link

simmel commented Jun 21, 2018

Which Alacritty.app is Spotlight finding when you search for it? When I search I find it in these paths:

  • Applications
  • release
  • assets

All of them except the one from assets work for me (and that's as intended as it isn't a complete app yet, just the skeleton).

Which one do you find?

@TheKevJames
Copy link
Author

@simmel I just confirmed: it is finding the /Applications/Alacritty.app one. As far as I see, neither release nor assets show up in my Spotlight results.

@simmel
Copy link

simmel commented Jun 24, 2018 via email

@TheKevJames
Copy link
Author

@simmel as far as I can tell, that is behaving exactly the same. Good find on the make install, though, it didn't even occur to me to read the Makefile for alternative installation methods.

@simmel
Copy link

simmel commented Jun 28, 2018

Have you tried to find it in Finder, hold shift, right-click on Alacritty.app and click Open?

This circumvents the thing that requires applications to be signed.

@TheKevJames
Copy link
Author

Looks like its control-click rather than shift-click but thanks for making me aware of that option, TIL!

No such luck, no behavior change.

@simmel
Copy link

simmel commented Jun 28, 2018 via email

@ijl
Copy link
Contributor

ijl commented Jun 28, 2018

@TheKevJames have you tried with LTO disabled? I had an issue (I haven't looked into further) where an LTO-enabled, rust 1.27 build of scrollback would not launch from the dock on macOS.

@TheKevJames
Copy link
Author

@ijl thanks for the suggestion. Unfortunately, that doesn't seem to be the issue.

Does anyone know if there's some way to capture more debug information? I feel like we're throwing random darts at this point.

@chrisduerr
Copy link
Member

@TheKevJames Hey, after debugging a different issue I've noticed that Alacritty will crash when it can't log its output, to fix that issue this PR has been opened.

Would you mind giving it a shot to test if this fixes your problem?

@chrisduerr
Copy link
Member

Closing this since #1459 should have fixed this. If it is not the case, please let me know and I will re-open.

@TheKevJames
Copy link
Author

@chrisduerr seems I am getting the exact same behavior. I ran:

rm -rf /Applications/Alacritty.app
git clone git@github.com:jwilm/alacritty.git  # https://github.com/jwilm/alacritty/commit/24a74d44882f89d16d197f2f2854208112938acb
cd alactritty
make clean install
# copy Alacritty.app into /Applications

The results are as described above (eg. only opening from another terminal seems to work).

I do have one additional log message now which I did not see before!

» /Applications/Alacritty.app/Contents/MacOS/alacritty
[Unhandled CSI] action='l', args=[1005], intermediates=[63]

Note that the above only occurs when running the binary directly, but not when running open /Applications/Alacritty.app. Note that both of those cases open a working Alacritty terminal.

@chrisduerr
Copy link
Member

I thought this issue might be caused by no stdout/stderr being available when running the app. Thanks for getting back on this issue, I'm going to re-open this for now.

@chrisduerr chrisduerr reopened this Jul 31, 2018
@jmoses-ds
Copy link

At least for me, running the actual binary path gets me:

$ /Applications/Alacritty.app/Contents/MacOS/alacritty
Alacritty encountered an unrecoverable error:

	Couldn't find a font with name 'monospace' and style 'slant=Normal, weight=Normal'
	Please check the font config in your alacritty.yml.

Changing the font.normal.family configure value in the default config to something actually present, lets it launch as a normal app.

@chrisduerr
Copy link
Member

@jmoses-ds Please see the notice in the README.md about this. That's one of the reasons why we provide the alacritty_macos.yml.

@jmoses-ds
Copy link

Sigh. I'll even pretend I don't clearly remember reading that now that you've mentioned it.

@TheKevJames
Copy link
Author

Just to be clear: my original issue (which still persists) was using the vanilla alacritty_macos.yml from the repo.

@gagbo
Copy link

gagbo commented May 6, 2019

I'm also having this issue, I don't know how I can help debugging this

@simmel
Copy link

simmel commented May 6, 2019

I'm also having this issue, I don't know how I can help debugging this

Can you please:

  1. launch Spotlight, search for alacritty or what you search for
  2. then screenshot it the Spotlight dialog
  3. in the Spotlight search dialog whenAlacritty is selected please hold down cmd and press enter/return and then cmd+left click with the mouse on top of the folder that the Alacritty is in and screenshot that too.

Thank you for trying to solve the issue @gagbo!

@gagbo
Copy link

gagbo commented May 6, 2019

I'm using Alfred, but I suppose it's just to check that the correct executable is chosen.

Alfred choosing /Applications

I'm accessing the first each time (the one in /Applications, copied with make app && cp -r target/release/osx/Alacritty.app /Applications/ as in the first post of the issue

Cmd + Enter goes to the /Applications folder, but I'm not sure what the Cmd+left click is supposed to do, because nothing happens.

Edit : in case the goal was to see the contents of the /Applications/Alacritty.app folder :
Alacritty.app folder

@gagbo
Copy link

gagbo commented May 6, 2019

Just to be complete :
f3cc7c4 (HEAD -> master, origin/master, origin/HEAD) Fix empty clipboard freezing Alacritty on X11
rustc 1.34.0 (91856ed52 2019-04-10)

@simmel
Copy link

simmel commented May 6, 2019

Screenshot 2019-05-06 at 14 44 05

cmd+click on the title just to get the path where Alacritty is but you already see that in Alfred.

Well, I don't know anything else. But just to verify:

  • Running open /Applications/Alacritty.app in Terminal.app works?
  • Does using "Install an app from an unidentified developer" on https://support.apple.com/en-us/HT202491 work to open Alacritty?
  • Does double clicking Alacritty in Finder work?

@gagbo
Copy link

gagbo commented May 6, 2019

  • open /Applications/Alacritty.app works (and is much better than my /Applications/Alacritty.app/Contents/MacOS/alacritty; ^Z; bg; disown %1 that I used before
  • The "app install" thing did not appear when I tried to use it, but I think the app is authorized (I Ctrl-clicked opened the app in /Applications and nothing appeared, my security settings are as follows)

Capture d’écran 2019-05-06 à 15 57 40

- Doublie clicking in finder doesn't work. Still very silently :(

@simmel
Copy link

simmel commented May 6, 2019 via email

@gagbo
Copy link

gagbo commented May 6, 2019

I tried, same behaviour. I used syslog to check what happened, and I think I'll to find a more intrusive logging method, as all I have is :

$ syslog -w # then launch Alacritty from Dock or Alfred
$$Date $$hostname com.apple.xpc.launchd[1] (io.alacritty.7644[26318]) <Warning>: Service exited with abnormal code: 1

EDIT : I also discovered that after hiding the window (using Cmd+H), clicking on the dock to make it appear again (or right clicking -> display all windows) doesn't work. In the case of right clicking, I get the overview with a "no available window" message). I have to open a Terminal (or iTerm2) again and open /Applications/Alacritty.app again to make the window come back

@mauricioklein
Copy link

I'm facing the exact same behavior.

MacOS Catalina 10.15.7.

  • Launching from iTerm: works
  • open /Applications/Alacritty.app: works
  • Launching from Spotlight: fails

My error is this one:

Failed to copy signing info for 93178, responsible for file:///Applications/Alacritty.app/Contents/MacOS/alacritty: #-67062: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)"

@chrisduerr
Copy link
Member

Have you launched it through Finder first using right click -> open?

@mauricioklein
Copy link

Thanks for your reply @chrisduerr

Yes, via Finder Ctrl+click + Open also crashes

@mauricioklein
Copy link

Based on a suggestion in #3880, after signing the app, the error is different:

[executable<alacritty(504)>:95827] Death sentinel fired!

Pattern is still the same

@mauricioklein
Copy link

Update from my case:

I just removed my alacritty.yml from the system and the app launches correctly from Spotlight. So, the problem is something with my setup.

I'll share here once I discover the root cause, since it might help others 👍

@mauricioklein
Copy link

mauricioklein commented Jun 30, 2021

So, I spotted the problem:

shell:
  program: /usr/local/bin/fish
  args:
    - --command="/usr/local/bin/tmux"                        # This works!
    - --command="/usr/local/bin/tmux new-session -A -s main" # This doesn't work!

My objective here is to make Alacritty always start Tmux connected to a session called main (and create it, if it doesn't exist).

For some reason, new-session doesn't work in Spotlight and makes Alacritty crash immediately.
Running from the terminal (e.g. open -a Alacritty) works, however.

Logs from Alacritty doesn't provide anything useful about this crash, so flying blind here 😕

@mauricioklein
Copy link

Ideas are welcome here ☝️🙂

Since the command works fine running from another shell, I suppose it might be related to how Alacritty start the shell internally

@clouedoc
Copy link

clouedoc commented Apr 19, 2022

Hello there,

I have the same problem, which started to appear when I added tmux to my alacritty.yml

Here is the relevant snippet:

shell:
  program: /bin/bash
  args:
    - -l
    - -c
    - "tmux"

This issue is not bugging me too much, but it's indeed weird 👀 !

EDIT 3 month later: this is really terrible. I've stopped using tmux because of that

@UFO-101
Copy link

UFO-101 commented Jul 15, 2022

Hello there,

I have the same problem, which started to appear when I added tmux to my alacritty.yml

Here is the relevant snippet:

shell:
  program: /bin/bash
  args:
    - -l
    - -c
    - "tmux"

This issue is not bugging me too much, but it's indeed weird 👀 !

EDIT 3 month later: this is really terrible. I've stopped using tmux because of that

Solution is here: #5419 (comment)

@clouedoc
Copy link

clouedoc commented Jul 15, 2022 via email

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

No branches or pull requests

9 participants