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

Exception when getting current track played from "Album" view in Spotify app #216

Closed
vdesabou opened this Issue Nov 16, 2017 · 0 comments

Comments

1 participant
@vdesabou
Owner

vdesabou commented Nov 16, 2017


[2017-11-16 15:21:09][STDERR: input.scriptfilter] 2017-11-16 14:21:09|Error(getAlbumName): (exception 1)
[2017-11-16 15:21:09][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
SpotifyWebAPI\SpotifyWebAPIException Object
(
    [message:protected] => invalid id
    [string:Exception:private] => 
    [code:protected] => 400
    [file:protected] => /Users/vdesabou/Documents/github/alfred-spotify-mini-player/spotify-mini-player/vendor/jwilsson/spotify-web-api-php/src/Request.php
    [line:protected] => 39
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /Users/vdesabou/Documents/github/alfred-spotify-mini-player/spotify-mini-player/vendor/jwilsson/spotify-web-api-php/src/Request.php
                    [line] => 240
                    [function] => parseBody
                    [class] => SpotifyWebAPI\Request
                    [type] => ->
                    [args] => Array
                        (
                            [0] => {
  "error" : {
    "status" : 400,
    "message" : "invalid id"
  }
}
                            [1] => 400
                        )

                )

            [1] => Array
                (
                    [file] => /Users/vdesabou/Documents/github/alfred-spotify-mini-player/spotify-mini-player/vendor/jwilsson/spotify-web-api-php/src/Request.php
                    [line] => 108
                    [function] => send
                    [class] => SpotifyWebAPI\Request
                    [type] => ->
                    [args] => Array
                        (
                            [0] => GET
                            [1] => https://api.spotify.com/v1/albums/spotify:user:vdesabou:collection:album:7dtLYwLOdYQa2S8Vjeuxci
                            [2] => Array
                                (
                                )

                            [3] => Array
                                (
                                    [Authorization] => Bearer BQDBHB1yq1FTJeKpZ8VfiTSe9pQ_dJyIUWwPQSQPspnHKCj8nMZyG0opMGMmP80SeMhEXb3riXuJNFkYxyuTPJ0Olfwqfedj8EWJ0dVf8fd9jtLLy6Xke1YJ67e8vkOGw9q-1wGV8FqQuaUQXCDWMk4hxx2yE2eY6eE2TS8ogFzA60bte-N_DXOO8cRRJOJjdCJABlivcCgucac1HzalLSesLMGm_ShvQUWbStkDPvs1Ufe6Ukbcp3wBraAr6X3M19Urjg
                                )

                        )

                )

            [2] => Array
                (
                    [file] => /Users/vdesabou/Documents/github/alfred-spotify-mini-player/spotify-mini-player/vendor/jwilsson/spotify-web-api-php/src/SpotifyWebAPI.php
                    [line] => 436
                    [function] => api
                    [class] => SpotifyWebAPI\Request
                    [type] => ->
                    [args] => Array
                        (
                            [0] => GET
                            [1] => /v1/albums/spotify:user:vdesabou:collection:album:7dtLYwLOdYQa2S8Vjeuxci
                            [2] => Array
                                (
                                )

                            [3] => Array
                                (
                                    [Authorization] => Bearer BQDBHB1yq1FTJeKpZ8VfiTSe9pQ_dJyIUWwPQSQPspnHKCj8nMZyG0opMGMmP80SeMhEXb3riXuJNFkYxyuTPJ0Olfwqfedj8EWJ0dVf8fd9jtLLy6Xke1YJ67e8vkOGw9q-1wGV8FqQuaUQXCDWMk4hxx2yE2eY6eE2TS8ogFzA60bte-N_DXOO8cRRJOJjdCJABlivcCgucac1HzalLSesLMGm_ShvQUWbStkDPvs1Ufe6Ukbcp3wBraAr6X3M19Urjg
                                )

                        )

                )

            [3] => Array
                (
                    [file] => /Users/vdesabou/Documents/github/alfred-spotify-mini-player/spotify-mini-player/src/functions.php
                    [line] => 59
                    [function] => getAlbum
                    [class] => SpotifyWebAPI\SpotifyWebAPI
                    [type] => ->
                    [args] => Array
                        (
                            [0] => spotify:user:vdesabou:collection:album:7dtLYwLOdYQa2S8Vjeuxci
                        )

                )

            [4] => Array
                (
                    [file] => /Users/vdesabou/Documents/github/alfred-spotify-mini-player/spotify-mini-player/src/firstDelimiter.php
                    [line] => 883
                    [function] => getAlbumName
                    [args] => Array
                        (
                            [0] => Workflows Object
                                (
                                    [cache:Workflows:private] => /Users/vdesabou/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.vdesabou.spotify.mini.player
                                    [data:Workflows:private] => /Users/vdesabou/Library/Application Support/Alfred 3/Workflow Data/com.vdesabou.spotify.mini.player
                                    [bundle:Workflows:private] => com.vdesabou.spotify.mini.player
                                    [path:Workflows:private] => 
                                    [home:Workflows:private] => /Users/vdesabou
                                    [results:Workflows:private] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [uid] => 
                                                    [arg] => a:16:{i:0;s:36:"spotify:track:17VegeBoHvMlIByrdu64KR";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:5:"pause";i:8;s:10:"Elton John";i:9;s:9:"Your Song";i:10;s:31:"Elton John (Remastered Version)";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}
                                                    [title] => Your Song ● Elton John ● Elton John (Remastered Version) ● ★★★★★ 4:04
                                                    [subtitle] => Array
                                                        (
                                                            [0] => ⌥ (play album) ⌘ (play artist) ctrl (lookup online) fn (add track to ...) ⇧ (add album to ...)
                                                            [alt] => Play album Elton John (Remastered Version) in Spotify
                                                            [cmd] => Play artist Elton John in Spotify
                                                            [fn] => Add track Your Song to ...
                                                            [shift] => Add album Elton John (Remastered Version) to ...
                                                            [ctrl] => Search artist Elton John online
                                                        )

                                                    [icon] => ./images/pause.png
                                                    [valid] => yes
                                                    [text] => Array
                                                        (
                                                            [copy] => #NowPlaying Your Song by Elton John https://open.spotify.com/track/17VegeBoHvMlIByrdu64KR
                                                            [largetype] => Your Song by Elton John
                                                        )

                                                    [autocomplete] => 
                                                )

                                        )

                                )

                            [1] => spotify:user:vdesabou:collection:album:7dtLYwLOdYQa2S8Vjeuxci
                        )

                )

            [5] => Array
                (
                    [file] => /Users/vdesabou/Documents/github/alfred-spotify-mini-player/spotify-mini-player/src/main.php
                    [line] => 301
                    [function] => firstDelimiterCurrentTrack
                    [args] => Array
                        (
                            [0] => Workflows Object
                                (
                                    [cache:Workflows:private] => /Users/vdesabou/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.vdesabou.spotify.mini.player
                                    [data:Workflows:private] => /Users/vdesabou/Library/Application Support/Alfred 3/Workflow Data/com.vdesabou.spotify.mini.player
                                    [bundle:Workflows:private] => com.vdesabou.spotify.mini.player
                                    [path:Workflows:private] => 
                                    [home:Workflows:private] => /Users/vdesabou
                                    [results:Workflows:private] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [uid] => 
                                                    [arg] => a:16:{i:0;s:36:"spotify:track:17VegeBoHvMlIByrdu64KR";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:5:"pause";i:8;s:10:"Elton John";i:9;s:9:"Your Song";i:10;s:31:"Elton John (Remastered Version)";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}
                                                    [title] => Your Song ● Elton John ● Elton John (Remastered Version) ● ★★★★★ 4:04
                                                    [subtitle] => Array
                                                        (
                                                            [0] => ⌥ (play album) ⌘ (play artist) ctrl (lookup online) fn (add track to ...) ⇧ (add album to ...)
                                                            [alt] => Play album Elton John (Remastered Version) in Spotify
                                                            [cmd] => Play artist Elton John in Spotify
                                                            [fn] => Add track Your Song to ...
                                                            [shift] => Add album Elton John (Remastered Version) to ...
                                                            [ctrl] => Search artist Elton John online
                                                        )

                                                    [icon] => ./images/pause.png
                                                    [valid] => yes
                                                    [text] => Array
                                                        (
                                                            [copy] => #NowPlaying Your Song by Elton John https://open.spotify.com/track/17VegeBoHvMlIByrdu64KR
                                                            [largetype] => Your Song by Elton John
                                                        )

                                                    [autocomplete] => 
                                                )

                                        )

                                )

                            [1] => Current Track▹
                            [2] => stdClass Object
                                (
                                    [all_playlists] => 1
                                    [is_alfred_playlist_active] => 1
                                    [radio_number_tracks] => 30
                                    [now_playing_notifications] => 1
                                    [max_results] => 50
                                    [alfred_playlist_uri] => spotify:user:vdesabou:playlist:5lGDbeZUuDQyGB2x7zdCTs
                                    [alfred_playlist_name] => Cocktail (FINAL)
                                    [country_code] => FR
                                    [last_check_update_time] => 1510564618
                                    [oauth_client_id] => e5101d4853064f329f9625e67d733aec
                                    [oauth_client_secret] => f762f0bbb53e4841bb62a7cf800a5ee9
                                    [oauth_redirect_uri] => http://localhost:15298/callback.php
                                    [oauth_access_token] => BQDBHB1yq1FTJeKpZ8VfiTSe9pQ_dJyIUWwPQSQPspnHKCj8nMZyG0opMGMmP80SeMhEXb3riXuJNFkYxyuTPJ0Olfwqfedj8EWJ0dVf8fd9jtLLy6Xke1YJ67e8vkOGw9q-1wGV8FqQuaUQXCDWMk4hxx2yE2eY6eE2TS8ogFzA60bte-N_DXOO8cRRJOJjdCJABlivcCgucac1HzalLSesLMGm_ShvQUWbStkDPvs1Ufe6Ukbcp3wBraAr6X3M19Urjg
                                    [oauth_expires] => 1510841738
                                    [oauth_refresh_token] => AQBzF6VUq1WQ2p8dXdXjFkh-rP9INRcH7_ikJsk1KybxZl5oCH5hB41VkY4Fk-FKiBz_VZVR0BHdDe2PSirEY0mnBSFLdGfaqaD26XaxD8ksMKQGo79dFGyAF5GUS880D5g
                                    [display_name] => Vincent de Saboulin
                                    [userid] => vdesabou
                                    [is_public_playlists] => 0
                                    [quick_mode] => 0
                                    [output_application] => CONNECT
                                    [mopidy_server] => 127.0.0.1
                                    [mopidy_port] => 6680
                                    [volume_percent] => 20
                                    [is_display_rating] => 1
                                    [is_autoplay_playlist] => 1
                                    [use_growl] => 0
                                    [use_facebook] => 0
                                    [theme_color] => green
                                    [search_order] => playlist▹artist▹track▹album
                                    [always_display_lyrics_in_browser] => 0
                                    [use_artworks] => 1
                                )

                            [3] => PDO Object
                                (
                                )

                            [4] => 
                        )

                )

        )

    [previous:Exception:private] => 
)

@vdesabou vdesabou added the bug label Nov 16, 2017

@vdesabou vdesabou self-assigned this Nov 16, 2017

vdesabou added a commit that referenced this issue Nov 16, 2017

@vdesabou vdesabou added this to the 7.7 milestone Nov 16, 2017

@vdesabou vdesabou closed this Jan 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment