bchatard / alfred-jetbrains

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

Studio list of projects doesn't updates #241

Closed AlexeyKorshun closed 2 years ago

AlexeyKorshun commented 2 years ago

Studio list of projects doesn't updates in workflow. I removed 7 of 8 projects, but it still appears in workflow list. This projects doesn't shown in recent projects in AS too.

Q A
Workflow version 1.7.1
OSX Version 12.2
Alfred Version 4.6.2
JetBrains Product/Version Android Studio Bumblebee 2021.1.1 Build #AI-211.7628.21.2111.8092744
Installation type classic .dmg
Node version 17.4.0
NPM version 8.3.1
bchatard commented 2 years ago

Hi,

Project's list is cached. Did you try to flush cache?

AlexeyKorshun commented 2 years ago

how can I do this?

bchatard commented 2 years ago

https://github.com/bchatard/alfred-jetbrains#clean-projects-cache

AlexeyKorshun commented 2 years ago

I did it, but new projects didn't appears

bchatard commented 2 years ago

Did you completely close Studio app?

otherwise check the content of this file: ~/Library/Application\ Support/JetBrains/GoLand2021.3/options/recentProjects.xml (adapt path to Studio product).

and if possible provide it, so I can check what's happen

AlexeyKorshun commented 2 years ago

I found an error, script try to use old version path

Error: Can't find 'options' XML in /Users/alekseikorshun/Library/Application Support/Google/AndroidStudio4.2
    at getProjectPaths (file:///usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/paths.js:132:9)
    at getItems (file:///usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:44:19)
    at file:///usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:21:15
    at async Promise.all (index 0)

but current is ~/Library/Application Support/Google/AndroidStudio2021.1/options

AlexeyKorshun commented 2 years ago

invalidate projects and product cache didn't help

bchatard commented 2 years ago

I just install latest Studio app, create a dummy app, close Studio, try to open via worklfow

CleanShot 2022-01-31 at 09 59 57@2x
AlexeyKorshun commented 2 years ago

it was maybe a problem via updates. try to fix it by self

bchatard commented 2 years ago

can you try to delete this folder: /Users/alekseikorshun/Library/Application Support/Google/AndroidStudio4.2 (backup it just in case)

I thinks I see the problem here. The workflow found both path AndroidStudio4.2 & AndroidStudio2021.1, then when use the "first" one (natural sort), which is the old for this case

AlexeyKorshun commented 2 years ago

I deleted it already, because I have an error %)

bchatard commented 2 years ago

ok so let's check the bin because there is no reason to try this path cat $(which studio)

CleanShot 2022-01-31 at 10 41 53@2x
AlexeyKorshun commented 2 years ago

Screenshot 2022-01-31 at 15 44 04

bchatard commented 2 years ago

thanks, so don't understand why the workflow try a path that doesn't exists...

AlexeyKorshun commented 2 years ago

It is a cache problem for product I think

AlexeyKorshun commented 2 years ago

I dropped alfy cache by myself, and it started work. Update cache variables in argv doesn't have an effect on cache, because maxAge was set.