alfred-jetbrains icon indicating copy to clipboard operation
alfred-jetbrains copied to clipboard

Not finding new IntelliJ projects

Open pimm-kevin-heb opened this issue 1 year ago • 22 comments

FAQ

  • [X] Yes, my issue is not listed in troubleshooting guide.
  • [X] Yes, my issue is not listed in other issues.

Describe the bug

I recently switched from the old workflow to this new one. This is because I also switched from and older IntelliJ (2019 - installed via dmg), to a new one (2022.3 - installed via ToolBox). After this change, I only see the older IntelliJ projects created with 2019 when I do an Alfred action trigger: idea {query}.

To Reproduce

  1. Create a new IntelliJ project.
  2. Launch alfred, search for project
  3. No project listed

Expected behavior

No response

Alfred Version

4.8 [1312]

Workflow Version

v1.9.8

Node Version

v16.13.0

NPM Version

8.1.2

Jetbrains Product & Version

IntelliJ IDEA Ultimate 2022.3

Installation type

JetBrains ToolBox

OS

macOS 13.3

pimm-kevin-heb avatar May 12 '23 22:05 pimm-kevin-heb

I am seeing the same issue with Rider.

JayHayAdminaccount avatar May 13 '23 15:05 JayHayAdminaccount

try to close all your product instance and open the application (not via this workflow), then close again.

Sometimes after an update, the bin is not yet up to date with latest version

bchatard avatar May 15 '23 07:05 bchatard

Thanks. I've closed all instances (also rebooted just to be sure), then opened IDEA and the new project multiple ways including from command line, but the workflow still doesn't see the new project.

pimm-kevin-heb avatar May 15 '23 17:05 pimm-kevin-heb

can you display the content of the following command: cat $(which idea)

bchatard avatar May 17 '23 08:05 bchatard

❯ cat $(which idea)
#!/bin/bash
#Generated by JetBrains Toolbox 1.28.1.15219 at 2023-05-14T00:33:25.418254

declare -a ideargs=()
declare -- wait=""

for o in "$@"; do
  if [[ "$o" = "--wait" || "$o" = "-w" ]]; then
    wait="-W"
    o="--wait"
  fi
  if [[ "$o" =~ " " ]]; then
    ideargs+=("\"$o\"")
  else
    ideargs+=("$o")
  fi
done

open -na "/Users/p289498/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/223.8836.41/IntelliJ IDEA.app/Contents/MacOS/idea" $wait --args "${ideargs[@]}"%

pimm-kevin-heb avatar May 17 '23 15:05 pimm-kevin-heb

did you remove the old version?

I just test this case with PyCharm, and it's works fine

bchatard avatar May 22 '23 08:05 bchatard

Yes, I removed the old version. I also had IntelliJ light edit installed, but I removed that just now and still is not working.

pimm-kevin-heb avatar May 22 '23 15:05 pimm-kevin-heb

Let me know if there are some steps I can take to help diagnose.. env variables to enable, logs to capture, etc.

pimm-kevin-heb avatar May 22 '23 17:05 pimm-kevin-heb

I have had this problem for quite a while now and had stopped using this plugin. I just happened to come check to see if an update had fixed it and saw this issue. I mostly use Android Studio and that is where I am seeing this issue. It worked great until one day it just stopped seeing new projects. I figured I had broken something when I started having Beta and Canary installs for Android Studio.

colin-ifit avatar May 22 '23 19:05 colin-ifit

try removing old preferences (should be located in ~/Library/Application\ Support/JetBrains/)

bchatard avatar May 23 '23 06:05 bchatard

I removed some orphaned versions from this folder including a newer version which I installed via toolbox, just to test out, but then went back to the older version. Once I removed this newer version from the Application Support/JetBrains directory, I started getting this from the alfred plugin:

image

fyi.. I renamed the idea shortcut to ij

pimm-kevin-heb avatar May 24 '23 20:05 pimm-kevin-heb

did you open new project? then close IDE?

bchatard avatar May 25 '23 08:05 bchatard

Yes. I also restarted the computer to install an update this morning and I'm still getting the error. Btw, the 2023.1 version which appears in the error above is the version I uninstalled. I am currently using 2022.3.

pimm-kevin-heb avatar May 25 '23 14:05 pimm-kevin-heb

Hi again :). I'm not sure what changed, but it just started working again. I now see all my new projects I've created since switching idea versions.

pimm-kevin-heb avatar May 25 '23 18:05 pimm-kevin-heb

I still have the issue. I tried uninstalling the JetBrains Toolbox version and installing the stand-alone version from https://developer.android.com/studio

I think there is probably just something borked on my system. I use a Stream Deck and it also has a hard time finding my Android Studio Install when I try and have it switch profiles when AS is active.

colin-ifit avatar Jun 02 '23 13:06 colin-ifit

Had similar problem, fixed it like this but I'm not sure if what i did really fixed the issue or was it just a coincidence. I reverted the changes I did so I can take a screenshot of the error but it still work. I'm guessing the config is cached or I did something to refresh the internal state of the config etc. Love the plugin btw, use it all the time 1000x a day 😎

image image

hoto avatar Aug 09 '23 08:08 hoto

@hoto Thank you! It works for me.

yu1ro avatar Aug 17 '23 00:08 yu1ro

@hoto thanks for this useful feedback, I will add this path in next release

bchatard avatar Aug 21 '23 08:08 bchatard

This is kinda weird but I encountered similar issue with IntelliJ and discovered that you had to simply change "Intel Idea Edition" in the workflow setting from Community to Ultimate.

This is an error that I got before changing the setting:

Please check if preferences 'IdeaIC' exists in [~/Library/Application Support/Google, ~/Library/Application Support/JetBrains, ~/Library/Preferences]

There is a link in the readme on how to change the product edition but it's not clear when or why you should change the setting: https://github.com/bchatard/alfred-jetbrains/blob/main/doc/customisation/edition.md

adiachenko avatar Dec 25 '23 21:12 adiachenko

The change is required to handle the appropriate Edition of IntelliJ, since both share the same keyword / bin name

bchatard avatar Jan 04 '24 09:01 bchatard

I recently got a new Macbook and things work as expected. I have to assume my issue was based on some weird configuration on my end that broke things.

colin-ifit avatar Feb 06 '24 15:02 colin-ifit

Bildschirmfoto 2024-03-15 um 10 45 00

on my side the tool always wants to open the .ijwb file which i am not using and which results in broken setup - how to fix this? @bchatard

loeffel-io avatar Mar 15 '24 09:03 loeffel-io