Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Alfred 5 Early Access #141

Closed
gingerbeardman opened this issue Jun 30, 2022 · 8 comments
Closed

Error in Alfred 5 Early Access #141

gingerbeardman opened this issue Jun 30, 2022 · 8 comments

Comments

@gingerbeardman
Copy link

gingerbeardman commented Jun 30, 2022

I'm getting the following error in Rusty Pin pinboard workflow, in Alfred 5 Early Access.

Obviously the XML is wrong, but it somehow passes as OK in Alfred 4.

[09:49:08.193] WARNING: Rusty Pin[Script Filter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 65.)'. Row 7, Col 24: 'attributes construct error' in XML:
<?xml version="1.0" encoding="UTF-8"?>
<items>
    <item arg="tax" autocomplete="tax">
        <title>tax</title>
        <subtitle>NEW TAG</subtitle>
        <icon>tag.png</icon>
        <mod key="ctrl"<mod subtitle="Mark the bookmark as TOREAD."/>
        <mod key="alt"<mod subtitle="Post the bookmark as private."/>
    </item>
    <item arg="syntax" autocomplete="syntax">
        <title>syntax</title>
        <subtitle>4</subtitle>
        <icon>tag.png</icon>
        <mod key="alt"<mod subtitle="Post the bookmark as private."/>
        <mod key="ctrl"<mod subtitle="Mark the bookmark as TOREAD."/>
    </item>
</items>
@spamwax
Copy link
Owner

spamwax commented Jun 30, 2022

How did you get the XML output? The output of this workflow that's sent to Alfred is in JSON format!
I will get the early access next week after the holidays here and work on this.
Thanks for reporting.

@gingerbeardman
Copy link
Author

gingerbeardman commented Jun 30, 2022

@spamwax
Copy link
Owner

spamwax commented Jun 30, 2022

I have a guess as why you are getting XML.
The code checks for older version of Alfred to see if they support JSON vs XML
It's possible since you are on a new release of Alfred, the logic for version check breaks and then code believes it's been run on an older version of Alfred, hence spits out XML. However I have to test this theory to be completely sure.

@spamwax
Copy link
Owner

spamwax commented Jun 30, 2022

If you can please unzip the attached file and replace the 'alfred-pinboard-rs' file in workflow's directory with it.
Then in Alfred, run pconf and look for something like below in Alfred's debug window:

[2022-06-30T20:16:17Z DEBUG alfred_pinboard_rs::commands::config] Config { alfred_version: Version { major: 4, minor: 6, patch: 7 },

The version shown there should match with your current/active Alfred instance.

You can also use this simple workflow to show the current version of alfred that it stores in alfred_version env. variable

@gingerbeardman
Copy link
Author

gingerbeardman commented Jul 1, 2022

If you can please unzip the attached file

Any chance of a Universal build of this attached file?

Sadly I am on an Apple silicon ARM machine, and I have not installed the Rosetta 2 needed to run Intel binaries. The existing version of Rusty Pin features a Universal build supporting both x64 and arm64.

You can also use this simple workflow

5.0 EA5

Screen shot 2022-07-01 at 12 05 38

@nickokgo
Copy link

nickokgo commented Jul 3, 2022

Hey @spamwax did you getting it working yet? I'm having the same issue using Alfred 5

@spamwax
Copy link
Owner

spamwax commented Jul 4, 2022

As I guessed, the early access is reporting "non-valid" versions for Alfred hence breaking the logic of this workflow.
I will try to do a more complete test of the early access before releasing a new update as I am hesitant to release a new update for small number of users while Alfred 5.0 is not officially released.
However if testing proves to be longer than a day or two, I will update the workflow before Alfred 5.0 is accessible to everyone.

@spamwax spamwax closed this as completed in 13f18c3 Jul 4, 2022
@gingerbeardman
Copy link
Author

Thanks for the updated workflow!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants