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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bunch & iTerm2 are not playing well together #66

Closed
jbeales opened this issue May 24, 2021 · 5 comments
Closed

Bunch & iTerm2 are not playing well together #66

jbeales opened this issue May 24, 2021 · 5 comments
Labels
irregularity An app-specific irregularity that may have more to do with the app than with Bunch
Projects

Comments

@jbeales
Copy link

jbeales commented May 24, 2021

Maybe I have screwed up a permission somewhere, or it may be the iTerm beta, but recently iTerm hasn't been doing what Bunch asks it to. Here's the log entry with debug on:

2021-05-24 12:39:42: 馃敶[4RoadService] {
    NSAppleScriptErrorAppName = "System Events";
    NSAppleScriptErrorBriefMessage = "Can\U2019t get process \"iTerm\".";
    NSAppleScriptErrorMessage = "System Events got an error: Can\U2019t get process \"iTerm\".";
    NSAppleScriptErrorNumber = "-1728";
    NSAppleScriptErrorRange = "NSRange: {0, 0}";
}

At the moment I get the "Application iTerm failed to launch" message with iTerm Build 3.4.7beta2. A few days ago with an earlier beta I was getting the same message, but an iTerm window did open, but with no terminal in it.

If iTerm is running nothing happens to it. If it is not running it opens a window with a shell in my home directory, but does not open the directory I want.

The part of the bunchfile that should open iTerm is:

%iTerm
-XX
- ~/Work/4RoadService/laravelize

This is running Bunch Beta 102

@ttscoff
Copy link
Owner

ttscoff commented May 28, 2021

I'll have to look further into this one. It seems to work fine if iTerm is NOT running when the Bunch opens, and you leave out the XX. New window is opened to the target directory. If it is running, or if the XX is included, it gets an error handling the file opening.

The %iTerm line on its own works fine either way, so it's something screwy with the Apple Event used to send file open commands to it. Will dig into it this weekend.

@ttscoff
Copy link
Owner

ttscoff commented Jun 18, 2021

(Here's too much explnation, you're welcome): So I had Bunch looking for the app name in running applications, and if it was found, changing the app name to match the localizedName property of the running application. In the case of iTerm, this was changing it to "iTerm2," as that was what iTerm was reporting as its localized name. However, it doesn't actually respond to that name for most purposes. As I'm not sure it accomplishes anything of real value, I'm just removing the function that made that change. In my testing with iTerm, this seems to fix the issue. Will need to do a little more testing to make sure it didn't break anything else before I release the update.

@jbeales
Copy link
Author

jbeales commented Jun 19, 2021

Nice ;) I installed the update earlier - I'll let you know if there are problems.

@ttscoff ttscoff added this to Done in Bunch Jun 19, 2021
@ttscoff ttscoff closed this as completed Jun 19, 2021
@ttscoff ttscoff added the irregularity An app-specific irregularity that may have more to do with the app than with Bunch label Jul 27, 2021
@jbeales
Copy link
Author

jbeales commented Dec 5, 2021

I'm going to resurrect this. I'm having the same trouble again, as described in your May 27 comment. While Bunch is waiting to open iTerm it seems to hang, so sometimes I'm waiting a long time for other apps to open.

@ttscoff
Copy link
Owner

ttscoff commented Dec 7, 2021

Have you attempted to use applescript to open a new iTerm window rather than using file lines? I haven't tested this for a long time as I've never needed iTerm opened to a specific directory, but it does seem to be an issue with iTerm handling file open apple events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
irregularity An app-specific irregularity that may have more to do with the app than with Bunch
Projects
Bunch
Done
Development

No branches or pull requests

2 participants