Comments (14)
That was fast, thanks. The error is now gone for me, too. When invoking "Authenticate to Spotify", it tries to open http://localhost:15298/ in my browser but there does not seem to be a server running on that port. No output in the logs either. Is the TGZ helpful for troubleshooting this?
from alfred-spotify-mini-player.
Seems I was able to solve it by replacing the arrays in line 224 and line 238 of workflows.php with array(...)
.
I successfully entered Client ID and Secret but am now seeing this in the debug log when invoking Authenticate to Spotify
in Alfred:
[INFO: alfred.workflow.input.scriptfilter] <?xml version="1.0" encoding="UTF-8"?>
<items><item arg="a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}" valid="yes"><arg>a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}</arg><title>Authenticate to Spotify</title><subtitle>This will start the authentication process</subtitle><subtitle mod="alt">Not Available</subtitle><subtitle mod="cmd">Not Available</subtitle><subtitle mod="shift">Not Available</subtitle><subtitle mod="fn">Not Available</subtitle><subtitle mod="ctrl">Not Available</subtitle><icon>./images/settings.png</icon><text></text></item></items>
<?xml version="1.0" encoding="UTF-8"?>
<items><item arg="a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}" valid="yes"><arg>a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}</arg><title>Authenticate to Spotify</title><subtitle>This will start the authentication process</subtitle><subtitle mod="alt">Not Available</subtitle><subtitle mod="cmd">Not Available</subtitle><subtitle mod="shift">Not Available</subtitle><subtitle mod="fn">Not Available</subtitle><subtitle mod="ctrl">Not Available</subtitle><icon>./images/settings.png</icon><text></text></item><item arg="a:22:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:14:"update_library";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;i:1;i:19;i:1;i:20;s:0:"";i:21;s:0:"";}" valid="yes"><arg>a:22:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:14:"update_library";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;i:1;i:19;i:1;i:20;s:0:"";i:21;s:0:"";}</arg><title>Create library</title><subtitle>when done you'll receive a notification. you can check progress by invoking the workflow again</subtitle><icon>./images/update.png</icon><text></text></item></items>
[ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 64.)'. Row (null), Col (null): '(null)' in XML:
<?xml version="1.0" encoding="UTF-8"?>
<items><item arg="a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}" valid="yes"><arg>a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}</arg><title>Authenticate to Spotify</title><subtitle>This will start the authentication process</subtitle><subtitle mod="alt">Not Available</subtitle><subtitle mod="cmd">Not Available</subtitle><subtitle mod="shift">Not Available</subtitle><subtitle mod="fn">Not Available</subtitle><subtitle mod="ctrl">Not Available</subtitle><icon>./images/settings.png</icon><text></text></item></items>
<?xml version="1.0" encoding="UTF-8"?>
<items><item arg="a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}" valid="yes"><arg>a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}</arg><title>Authenticate to Spotify</title><subtitle>This will start the authentication process</subtitle><subtitle mod="alt">Not Available</subtitle><subtitle mod="cmd">Not Available</subtitle><subtitle mod="shift">Not Available</subtitle><subtitle mod="fn">Not Available</subtitle><subtitle mod="ctrl">Not Available</subtitle><icon>./images/settings.png</icon><text></text></item><item arg="a:22:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:14:"update_library";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;i:1;i:19;i:1;i:20;s:0:"";i:21;s:0:"";}" valid="yes"><arg>a:22:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:14:"update_library";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;i:1;i:19;i:1;i:20;s:0:"";i:21;s:0:"";}</arg><title>Create library</title><subtitle>when done you'll receive a notification. you can check progress by invoking the workflow again</subtitle><icon>./images/update.png</icon><text></text></item></items>
from alfred-spotify-mini-player.
Seems I was able to solve it by replacing the arrays in line 224 and line 238 of workflows.php with array(...).
Looks like you're a developer...do you know why you have to do this?
Are you using a specific PHP version?
I have:
php --version
PHP 5.5.14 (cli) (built: Sep 9 2014 19:09:25)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
[INFO: alfred.workflow.input.scriptfilter] <?xml version="1.0" encoding="UTF-8"?>
<items><item arg="a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}" valid="yes"><arg>a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}</arg><title>Authenticate to Spotify</title><subtitle>This will start the authentication process</subtitle><subtitle mod="alt">Not Available</subtitle><subtitle mod="cmd">Not Available</subtitle><subtitle mod="shift">Not Available</subtitle><subtitle mod="fn">Not Available</subtitle><subtitle mod="ctrl">Not Available</subtitle><icon>./images/settings.png</icon><text></text></item></items>
<?xml version="1.0" encoding="UTF-8"?>
<items><item arg="a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}" valid="yes"><arg>a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:11:"Oauth_Login";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}</arg><title>Authenticate to Spotify</title><subtitle>This will start the authentication process</subtitle><subtitle mod="alt">Not Available</subtitle><subtitle mod="cmd">Not Available</subtitle><subtitle mod="shift">Not Available</subtitle><subtitle mod="fn">Not Available</subtitle><subtitle mod="ctrl">Not Available</subtitle><icon>./images/settings.png</icon><text></text></item><item arg="a:22:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:14:"update_library";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;i:1;i:19;i:1;i:20;s:0:"";i:21;s:0:"";}" valid="yes"><arg>a:22:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:14:"update_library";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;i:1;i:19;i:1;i:20;s:0:"";i:21;s:0:"";}</arg><title>Create library</title><subtitle>when done you'll receive a notification. you can check progress by invoking the workflow again</subtitle><icon>./images/update.png</icon><text></text></item></items>
Looks like <?xml version="1.0" encoding="UTF-8"?>
appears twice, that must be the problem for Alfred to parse it..
But again, I have no idea how you could get these kinds of errors..
Let me know if you have anything specific in your environment related to PHP
Thanks
from alfred-spotify-mini-player.
Many thanks for the reply. Yep, I'm still on PHP 5.3.26 and according to the documentation that's indeed why the array failed:
As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].
Good catch! I'll update to a 5.5-ish version and see if that fixes the issues. Probably worth adding this as a system requirement to the documentation.
from alfred-spotify-mini-player.
Good catch! I'll update to a 5.5-ish version and see if that fixes the issues. Probably worth adding this as a system requirement to the documentation.
I think it is easier for me to update the workflow. Can you try this version? https://cloudup.com/cAm6UMGO-ME
Let me know if you have other issues.
from alfred-spotify-mini-player.
The version you uploaded works fine, thanks. The XML parsing problem remains, however. I just installed PHP 5.5 to make sure but the XML error in the debug output looks exactly the same. Any ideas how to troubleshoot this?
from alfred-spotify-mini-player.
turns out I also have same debug output:
[ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 64.)'. Row (null), Col (null): 'XML declaration allowed only at the start of the document' in XML:
<?xml version="1.0" encoding="UTF-8"?>
<items><item arg="" valid="no"><arg></arg><title>Your Application Client ID is missing</title><subtitle>Get it from your Spotify Application and copy/paste it here</subtitle><icon>./images/settings.png</icon><text></text></item><item arg="a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:68:"Open▹https://developer.spotify.com/my-applications/#!/applications";i:7;s:0:"";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}" valid="yes"><arg>a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:68:"Open▹https://developer.spotify.com/my-applications/#!/applications";i:7;s:0:"";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}</arg><title>Open Spotify Application page to get required information</title><subtitle>This will open the Application page with your default browser</subtitle><icon>./images/spotify.png</icon><text></text></item></items>
<?xml version="1.0" encoding="UTF-8"?>
<items><item arg="" valid="no"><arg></arg><title>Your Application Client ID is missing</title><subtitle>Get it from your Spotify Application and copy/paste it here</subtitle><icon>./images/settings.png</icon><text></text></item><item arg="a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:68:"Open▹https://developer.spotify.com/my-applications/#!/applications";i:7;s:0:"";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}" valid="yes"><arg>a:16:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:68:"Open▹https://developer.spotify.com/my-applications/#!/applications";i:7;s:0:"";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}</arg><title>Open Spotify Application page to get required information</title><subtitle>This will open the Application page with your default browser</subtitle><icon>./images/spotify.png</icon><text></text></item><item arg="a:22:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:14:"update_library";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;i:1;i:19;i:1;i:20;s:0:"";i:21;s:0:"";}" valid="yes"><arg>a:22:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:14:"update_library";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;i:1;i:19;i:1;i:20;s:0:"";i:21;s:0:"";}</arg><title>Create library</title><subtitle>when done you'll receive a notification. you can check progress by invoking the workflow again</subtitle><icon>./images/update.png</icon><text></text></item></items>
However it does not prevent the Alfred window to open. Let me investigate this..
from alfred-spotify-mini-player.
I fixed the problem, can you try this version https://cloudup.com/cLMfprJKuUS
If it still does not work, can you follow steps here in order to send me TGZ file.
from alfred-spotify-mini-player.
hmm..I start the server like this:-
else if ($other_action == "Oauth_Login") {
$cache_log = $w->cache() . '/spotify_mini_player_web_server.log';
exec("php -S localhost:15298 > \"$cache_log\" 2>&1 &");
sleep(2);
exec("open http://localhost:15298");
return;
}
So maybe there is a problem with PHP < 5.4 ?
Yes the TGZ file would help as output of command is saved in spotify_mini_player_web_server.log
from alfred-spotify-mini-player.
Yes, seems to be related to my PHP version. I replaced the execution with exec("/usr/local/bin/php -S localhost:15298 > \"$cache_log\" 2>&1 &");
(where Homebrew put my PHP 5.5 installation) and now the server started up just fine. 5.3 just doesn't have it:
As of PHP 5.4.0, the CLI SAPI provides a built-in web server.
from alfred-spotify-mini-player.
Ok good, so I must set PHP 5.5 as a required dependency I guess...
So you must be now creating the library?
Note that the version you're using is not Packal friendly, so you'll have a warning once per 24 hour when it will try to auto update. Just make sure to download from Packal when next version is released (likely a 6.0.1 soon)
from alfred-spotify-mini-player.
Note that the version you're using is not Packal friendly, so you'll have a warning once per 24 hour when it will try to auto update. Just make sure to download from Packal when next version is released (likely a 6.0.1 soon)
FYI, 6.0.1 is now available, re-download it from the website and install it in order not to have Packal warning when checking for updates
from alfred-spotify-mini-player.
Thanks again for your help. I ended up removing 5.3 completely because even with the 6.0.1 version of your workflow and a working Spotify token I would get an error from the database that table artists
didn't exist, so whatever PHP5.3's SQLite version is, it's likely incompatible as well.
However, with PHP5.5 everything's working smoothly now. I owe you a 🍺 :)
from alfred-spotify-mini-player.
Thanks again for your help. I ended up removing 5.3 completely because even with the 6.0.1 version of your workflow and a working Spotify token I would get an error from the database that table artists didn't exist, so whatever PHP5.3's SQLite version is, it's likely incompatible as well
No it is not PHP version related, that was an issue with 6.0 which has been fixed in 6.0.1, but I forgot to tell you to delete two DB files before re-creating the library..That's what you got this error. See details here
Anyway, I'm glad it is working now!
However, with PHP5.5 everything's working smoothly now. I owe you a 🍺 :)
Yeah! I received your donation, thanks a lot. I'll buy a beer no later than tonight! Really appreciated ! 😄
from alfred-spotify-mini-player.
Related Issues (20)
- Cannot modify library while in progress HOT 2
- The workflow cannot be authenticated when using Sonoma Beta HOT 7
- Stuck at authentication HOT 2
- Dialog box keeps popping up HOT 3
- Random album from specific playlist HOT 1
- A Seek Feature HOT 4
- Feature request: Notificator icon matches Now Playing song/album cover, so does the Now Playing episode HOT 1
- playlists not updating / alfred playlist not setting HOT 1
- Can't play a song any more using `play` external trigger HOT 1
- spotify always open in front of me when used hotkey HOT 2
- make it that my playlist is the first option and not "featured playlist" HOT 2
- Automatic refresh of library failing when path contains space
- Search lyrics online if not found
- Refresh Library Hanging Forever HOT 9
- Browse Category is broken
- JSON error when calling "Current Track"
- authentication not working after upgrading to 13.2 HOT 3
- Broken: external trigger: Add current playing song to a playlist by providing URI
- Refresh Library Hangs on Album Playlist (Processing Playlist)
- "The application spot mini player cannot be opened" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfred-spotify-mini-player.