bchatard / alfred-jetbrains

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

[Alfred 5]Can't find application path for IntelliJIdea #322

Closed tguitars closed 1 year ago

tguitars commented 1 year ago

FAQ

Describe the bug

Error: Can't find application path for IntelliJIdea.
    at getApplicationPath (file:///usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/findProduct.js:165:9)
    at findProduct (file:///usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/findProduct.js:175:31)
    at file:///usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:16:17

- JetBrains - Open Project - v3 1.9.8 Alfred 5.1 darwin 21.6.0

To Reproduce

btw, command line launcher is changed.

To make the IDE accessible from the command line, please add '/Applications/IntelliJ IDEA.app/Contents/MacOS' to the $PATH variable and use 'idea' to run commands.  Please see the online help for more details.

Expected behavior

No error above, the project list would be shown up

Alfred Version

5.1.2134

Node Version

v20.0.0

NPM Version

9.6.4

Jetbrains Product & Version

intelliJIdeaUltimate & IntelliJ IDEA 2023.1.1

Installation type

Classic via .dmg

OS

macOS 12.3

juarinu commented 1 year ago

In my case (IntelliJ CE), I changed the product designation to intelliJIdeaCommunity in the script and make a link to the app (ln -s "/Applications/IntelliJ IDEA CE.app" "~/Applications/IntelliJ IDEA Community Edition.app") to solve this issue.

image

bchatard commented 1 year ago

@juarinu please raise another issue, since this one is for v1

bchatard commented 1 year ago

@tguitars please give a try on latest version, this issue is solved

tguitars commented 1 year ago

@bchatard

still seeing the error

[07:04:43.940] JetBrains - Open Project[Script Filter] Queuing argument '(null)'
[07:04:43.996] JetBrains - Open Project[Script Filter] Script with argv '(null)' finished
[07:04:43.997] JetBrains - Open Project[Script Filter] {
  "items": [
    {
      "uid": "Can't locate application for intelliJIdeaUltimate",
      "title": "Can't locate application for intelliJIdeaUltimate",
      "match": "Can't locate application for intelliJIdeaUltimate JetBrains Toolbox]",
      "subtitle": "Please check if application 'IntelliJ IDEA Ultimate' exists in [/Applications/IntelliJ IDEA.app/Contents/MacOS, /Applications, ~/Applications, ~/Applications/JetBrains Toolbox]",
      "arg": "Please check if application 'IntelliJ IDEA Ultimate' exists in [/Applications/IntelliJ IDEA.app/Contents/MacOS, /Applications, ~/Applications, ~/Applications/JetBrains Toolbox]",
      "autocomplete": "Can't locate application for intelliJIdeaUltimate",
      "text": {
        "copy": "Please check if application 'IntelliJ IDEA Ultimate' exists in [/Applications/IntelliJ IDEA.app/Contents/MacOS, /Applications, ~/Applications, ~/Applications/JetBrains Toolbox]",
        "largetype": "Can't locate application for intelliJIdeaUltimate"
      },
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      }
    },
    {
      "uid": "Debug: CLI version 0.0.9",
      "title": "Debug: CLI version 0.0.9",
      "match": "Debug: CLI version 0.0.9 0.0.9",
      "subtitle": "0.0.9",
      "arg": "0.0.9",
      "autocomplete": "Debug: CLI version 0.0.9",
      "text": {
        "copy": "0.0.9",
        "largetype": "Debug: CLI version 0.0.9"
      },
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"
      }
    },
    {
      "uid": "Debug: Log alfred_jetbrains_cli_2023-05-09.log",
      "title": "Debug: Log alfred_jetbrains_cli_2023-05-09.log",
      "match": "Debug: Log alfred_jetbrains_cli_2023-05-09.log alfred_jetbrains_cli_2023-05-09.log",
      "subtitle": "/var/folders/r9/ch_c4nps2bv2lwbhybj156w40000gr/T/alfred_jetbrains_cli_2023-05-09.log",
      "arg": "/var/folders/r9/ch_c4nps2bv2lwbhybj156w40000gr/T/alfred_jetbrains_cli_2023-05-09.log",
      "autocomplete": "Debug: Log alfred_jetbrains_cli_2023-05-09.log",
      "text": {
        "copy": "/var/folders/r9/ch_c4nps2bv2lwbhybj156w40000gr/T/alfred_jetbrains_cli_2023-05-09.log",
        "largetype": "Debug: Log alfred_jetbrains_cli_2023-05-09.log"
      },
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ProblemReport.icns"
      }
    },
    {
      "uid": "Debug: Took 6ms",
      "title": "Debug: Took 6ms",
      "match": "Debug: Took 6ms Started at: 2023-05-09T07:04:43.983280 || Ended at: 2023-05-09T07:04:43.989743",
      "subtitle": "Started at: 2023-05-09T07:04:43.983280 || Ended at: 2023-05-09T07:04:43.989743",
      "arg": "Started at: 2023-05-09T07:04:43.983280 || Ended at: 2023-05-09T07:04:43.989743",
      "autocomplete": "Debug: Took 6ms",
      "text": {
        "copy": "Started at: 2023-05-09T07:04:43.983280 || Ended at: 2023-05-09T07:04:43.989743",
        "largetype": "Debug: Took 6ms"
      },
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Clock.icns"
      }
    }
  ]
}
tguitars commented 1 year ago
~ ❯ ls /usr/local/bin/idea
/usr/local/bin/idea
~ ❯ ls "/Applications/IntelliJ IDEA.app/Contents/MacOS"
idea
bchatard commented 1 year ago

Please check the documentation about customization

tguitars commented 1 year ago

I have changed the product Edition to Ultimate. is there anything else I need to change?

bchatard commented 1 year ago

Is it working?

tguitars commented 1 year ago

No, the error like I posted above

bchatard commented 1 year ago

Please open another issue, this one is on v1. Check your configuration again

tguitars commented 1 year ago

actually, I re-installed workflow, the version is 2.0.1. anyway, here is new issue: https://github.com/bchatard/alfred-jetbrains/issues/324