alanhe421 / alfred-workflows

Save time, Improve life.🚀 ☕️ 💻
https://alfred.1991421.cn
MIT License
659 stars 63 forks source link

[Bug]: QR only returns invalid url notification #375

Closed vanwoods closed 1 year ago

vanwoods commented 1 year ago

Describe the bug

  1. Alfred returns 'invalid QR code' notification after making a screenshot. No matter which QR code. QR's have a valid url.
  2. Universal action also not working correct returns file name of file.

Debugger output:

[22:29:50.036] Logging Started...
[22:29:55.234] QR Reader[Keyword] Processing complete
[22:29:55.237] QR Reader[Keyword] Passing output '' to Run Script
[22:30:00.287] QR Reader[Run Script] Processing complete
[22:30:00.292] QR Reader[Run Script] Passing output '/Users/patrick/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cn.alanhe.qr-reader/screenshot.png
' to Transform
[22:30:00.293] QR Reader[Transform] Processing complete
[22:30:00.294] QR Reader[Transform] Passing output '/Users/patrick/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cn.alanhe.qr-reader/screenshot.png' to Run Script
[22:30:00.376] QR Reader[Run Script] Processing complete
[22:30:00.382] QR Reader[Run Script] Passing output '' to Replace
[22:30:00.384] QR Reader[Replace] Processing complete
[22:30:00.385] QR Reader[Replace] Passing output '' to Transform
[22:30:00.387] QR Reader[Transform] Processing complete
[22:30:00.389] QR Reader[Transform] Passing output '' to Conditional
[22:30:00.391] QR Reader[Conditional] Processing complete
[22:30:00.393] QR Reader[Conditional] Passing output '' to Post Notification

Any chance how to fix this?

Thanks in advance

Workflow Name

QR Reader

Alfred Version

5.1.1

MacOS Version

macOS 13 Ventura

Mac Chip

Apple Silicon (like M1, M2)

MacOS Locale

Others


Workflow Homepage is 👉 QR Reader

alanhe421 commented 1 year ago

image I'm posting a QR code here, could you try scanning it? Based on your description, I think you didn't scan a correct address QR code.

After scanning the QR code I sent, the correct address is https://github.com/alanhg/alfred-workflows/issues/375

vanwoods commented 1 year ago

Hi, thnx for the quick reply!

Your QR code works fine, however when shown reversed (see screenshot) it doesn't work. And returns invalid QR code.

Is it possible to make it work to QR code's that is shown reversed (or other color combinations)?

Scherm­afbeelding 2023-06-23 om 09 07 37
alanhe421 commented 1 year ago

@vanwoods

  1. I have updated the workflow.
  2. You need update workflow and have a try.
  3. some step is required.
    • open the workflow configuration and check this. image
    • install the new package. image

I believe that not everyone needs this feature, so it should be configurable. If necessary, the corresponding dependencies can be installed.

vanwoods commented 1 year ago

Awesome, works like a charm now.

Thanks for fixing this!

alanhe421 commented 1 year ago

@vanwoods

Here I'll share the principle. The workflow depends on ZBar, which does not support color-inverted images. So I have no choice but to reverse the colors of the image and then try to read it again.

so I have to brew install imagemagick