bchatard / alfred-jetbrains

Alfred5 workflow to easily open your projects with your favorite JetBrains product.
MIT License
618 stars 49 forks source link

Not finding new IntelliJ projects #325

Open pimm-kevin-heb opened 1 year ago

pimm-kevin-heb commented 1 year ago

FAQ

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

JayHayAdminaccount commented 1 year ago

I am seeing the same issue with Rider.

bchatard commented 1 year ago

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

pimm-kevin-heb commented 1 year ago

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.

bchatard commented 1 year ago

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

pimm-kevin-heb commented 1 year ago
❯ 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[@]}"%
bchatard commented 1 year ago

did you remove the old version?

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

pimm-kevin-heb commented 1 year ago

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 commented 1 year ago

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

colin-ifit commented 1 year ago

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.

bchatard commented 1 year ago

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

pimm-kevin-heb commented 1 year ago

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

bchatard commented 1 year ago

did you open new project? then close IDE?

pimm-kevin-heb commented 1 year ago

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 commented 1 year ago

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.

colin-ifit commented 1 year ago

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.

hoto commented 10 months ago

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

yu1ro commented 10 months ago

@hoto Thank you! It works for me.

bchatard commented 10 months ago

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

adiachenko commented 6 months ago

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

bchatard commented 6 months ago

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

colin-ifit commented 4 months ago

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.

loeffel-io commented 3 months ago
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