rkoval / alfred-aws-console-services-workflow

A powerful workflow for quickly opening up AWS Console Services in your browser or searching for entities within them.
MIT License
312 stars 54 forks source link

Strange issue updating to 5.0.0 #50

Closed rozling closed 1 year ago

rozling commented 2 years ago

<Obligatory opener about this workflow being indispensable and brilliant!>

So, I was actually trying to troubleshoot another issue (runtime error: invalid memory address or nil pointer dereference when trying to search CloudFormation stacks), when I saw that my workflow version was 4.8.1.

I downloaded the 5.0.0 release package, but Alfred's Workflow Import dialog displays the version as 4.8.1:

Screenshot 2022-01-05 at 13 38 39

I then removed the workflow and deleted the cache and workflow folders at:

Then tried reinstalling. It still shows as 4.8.1. Debug view shows this on first query:

[13:47:37.576] STDERR: AWS Console Services[Script Filter] 🍺
13:47:36 workflow.go:327: ---- AWS Console Services/4.8.1 (AwGo/0.20.2) ----
13:47:36 main.go:31: running workflow with query: ``
13:47:36 workflow.go:26: using workflow cacheDir: /Users/myuser/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.ryankoval.awsconsoleservices
13:47:36 workflow.go:27: using workflow dataDir: /Users/myuser/Library/Application Support/Alfred/Workflow Data/com.ryankoval.awsconsoleservices
13:47:36 workflow.go:33: using query: &parsers.Query{RawQuery:"", Service:(*awsworkflow.AwsService)(nil), SubService:(*awsworkflow.AwsService)(nil), HasTrailingWhitespace:false, HasOpenAll:false, HasDefaultSearchAlias:false, regionOverride:(*awsconfig.Region)(nil), RegionQuery:(*string)(nil), ProfileOverride:(*awsconfig.Profile)(nil), ProfileQuery:(*string)(nil), RemainingQuery:""}
13:47:36 workflow.go:168: no search type parsed
13:47:36 update.go:354: fetching https://api.github.com/repos/rkoval/alfred-aws-console-services-workflow/releases ...
13:47:37 update.go:362: [200] https://api.github.com/repos/rkoval/alfred-aws-console-services-workflow/releases
13:47:37 github.go:95: ignored release v5.0.0: no workflow files
13:47:37 github.go:107: ignored release v5.0.0: empty slice
13:47:37 update.go:198: latest version: 4.8.1
13:47:37 feedback.go:468: Sent 4 result(s) to Alfred
13:47:37 workflow.go:404: ------------------ 580.516689ms ------------------

Edited: Notice how update.go / github.go show the latest version as 4.8.1? It seems to recognise that 5.0.0 is there, but doesn't seem to recognise it as a valid release. Still, I can't figure out why the downloaded 5.0.0 release would show up as 4.8.1.

I also checked with Packal Updater which showed the package as out of date, but their page lists the latest version as 4.0.0: http://www.packal.org/workflow/aws-console-services

rkoval commented 2 years ago

ahh interesting! v5.0.0 release was the first release to have the .alfredworkflow file be contained in a .zip file (necessary for macOS Gatekeeper). feels like this could be why going by this log line:

13:47:37 github.go:95: ignored release v5.0.0: no workflow files

i'll take a look at this sometime. my guess is that i'll have to modify the underlying awgo library (what this workflow relies heavily on), but i imagine it's possible to look to zipped files for this update checker

packal showing old version is just a miss on my part. i'll update that as well

rkoval commented 1 year ago

hey again @rozling. i think i was just able to fix the issue by just uploading a dummy file with the .alfredworkflow extension. i have confirmed that this is now prompting for auto-update on my other laptop. can you also confirm you saw the workflow notify for a new release?

rkoval commented 1 year ago

closing, as this seems to be fixed from #55