chrillek Posted October 29, 2022 Share Posted October 29, 2022 (edited) Several years ago, Will Farrell posted a workflow to search the caniuse.com database. It was written using PHP. I re-wrote that workflow in JavaScript, so it does not depend on a PHP installation. Code and the complete workflow are on GitHub Note: The workflow relies on a static JSON file provided by the caniuse.com author. This file does not contain all data from the website, though. Edited October 29, 2022 by chrillek suliveevil 1 Link to comment
Pyetro Posted December 1, 2023 Share Posted December 1, 2023 Hello @chrillek, looks like the workflow stopped working since a while, as also reported on the GitHub issue page. I got the following error: [15:53:56.767] Search Caniuse.com[Script Filter] Script with argv 'animation' finished [15:53:56.774] ERROR: Search Caniuse.com[Script Filter] Code 1: /Users/pyetro/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/88DD1F81-5185-473D-9D1E-4427A3E3E4BD: execution error: Error: SyntaxError: JSON Parse error: Unable to parse JSON string (-2700) Thanks in advance for your help! Link to comment
chrillek Posted December 1, 2023 Author Share Posted December 1, 2023 I can't reproduce this (Sonoma 14.1.1, Alfred 5.1.4). But then the folder you mentioned is empty here. I have the workflow in this folder /Users/ck/Library/Mobile Documents/com~apple~CloudDocs/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8750F239-B45D-49D4-94B6-9A1BD6B1DB68 (as I use iCloud sync). And in the folder, there are three files -rwx------@ 1 ck staff 193043 26 Nov 15:15 data.json -rwx------ 1 ck staff 10699 27 Okt 2022 icon.png -rwx------ 1 ck staff 9687 29 Okt 2022 info.plist So, the data.json is fairly recent. And the info.plist, which _is_ the workflow. I also ran the current version of data.json (see here: https://raw.githubusercontent.com/Fyrd/caniuse/main/fulldata-json/data-2.0.json) through a validator and that came out fine. The error itself is raised by Apple's framework when it tries to parse the JSON it downloaded from GitHub. I just tried doing that here and it worked without a glitch, too Perhaps you can provide more information, e.g. the content of the folder you mentioned above? It's difficult to fix an error that one can't reproduce. Link to comment
Pyetro Posted December 1, 2023 Share Posted December 1, 2023 Thank for your fast support @chrillek! You are absolutely right, that folder path was suspicious as it was located in some cache folder! I just deleted the workflow and reinstalled from the Alfred Workflow Gallery website and it's working again like a charm.. Sorry for the false alarm, but thanks for having pointed out immediately the possible issue. Thank you! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now