Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Can't open autoplaylist tab on OSX #30

Closed
onespaceman opened this issue Jan 18, 2016 · 12 comments
Closed

Can't open autoplaylist tab on OSX #30

onespaceman opened this issue Jan 18, 2016 · 12 comments

Comments

@onespaceman
Copy link

On OSX, when I click the autoplaylist icon, nothing happens. Works fine on Windows and Linux.
Background sorting still works as normal.
Issue since at least 0.7.

@simon-weber
Copy link
Owner

Huh, I've not heard of that one before.

Does the background script log have anything in it? The readme has instructions on how to get to it.

@simon-weber
Copy link
Owner

One thing I noticed is that if you successfully click the page action, then break out the tab to a new window, clicking the page action again won't do anything.

I wonder if you got into a state like that? Is this a problem that's survived a restart?

@onespaceman
Copy link
Author

Ok, I deleted the extension, playlists, restarted, and reinstalled the extension to start on a clean slate.

Console output:

opening...
see user 01423689343908048365 Object {01423689343908048365: Object}
opened
set poll for 01423689343908048365 1453098006923000
got tracks 2702
done with refresh of 2702 tracks
periodic update for 01423689343908048365
get poll for 01423689343908048365 1453098006923000
index for 01423689343908048365 0
getTrackChanges 1453098006923000
Object {newTimestamp: null, upsertedTracks: Array[0], deletedIds: Array[0]}deletedIds: Array[0]newTimestamp: nullupsertedTracks: Array[0]__proto__: Object
done with diff upsert of 0
done with diff delete of 0
schemaVersion is not json
periodic update for 01423689343908048365
get poll for 01423689343908048365 1453098006923000
index for 01423689343908048365 0
getTrackChanges 1453098006923000
XHR finished loading: GET "https://play.google.com/music/services/streamingloadalltracks?format=jsarra…00%2C%22tier%22%3A1%2C%22requestCause%22%3A1%2C%22sessionId%22%3A%22%22%7D".
Object {newTimestamp: null, upsertedTracks: Array[0], deletedIds: Array[0]}
done with diff upsert of 0
done with diff delete of 0
schemaVersion is not json

Nothing new when I click the icon, except for the periodic updates.

@simon-weber
Copy link
Owner

Huh, weird. Thanks for running through those debugging steps. I'll push a debug build tomorrow to get us some more logging.

In the meantime, does manually navigating to the url work? I think the proper one for you is:

chrome-extension://blbompphddfibggfmmfcgjjoadebinem/html/playlists.html?userId=01423689343908048365

@onespaceman
Copy link
Author

Yeah. The URL works.
Also, a wierd behavior I found is that if Play Music is opened in a tab that is not the first, clicking the icon takes me to the first tab in the window.

@simon-weber
Copy link
Owner

Ah. The expected behavior when clicking the page action is to either open a new tab, or focus a previously-opened tab. It sounds like the tab query that powers this is returning weird results for you.

I'm just releasing a version now (0.9.1) with more logging around all of this. Hopefully that'll point us in the right direction.

@onespaceman
Copy link
Author

new log

tab query for chrome-extension://blbompphddfibggfmmfcgjjoadebinem/html/playlists.html?userId=01423689343908048365 yields [
    {
        "active": false,
        "audible": false,
        "height": 955,
        "highlighted": false,
        "id": 329,
        "incognito": false,
        "index": 0,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": false,
        "audible": false,
        "height": 955,
        "highlighted": false,
        "id": 331,
        "incognito": false,
        "index": 1,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": false,
        "audible": false,
        "height": 467,
        "highlighted": false,
        "id": 333,
        "incognito": false,
        "index": 2,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": false,
        "audible": false,
        "height": 955,
        "highlighted": false,
        "id": 335,
        "incognito": false,
        "index": 3,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": false,
        "audible": false,
        "height": 955,
        "highlighted": false,
        "id": 339,
        "incognito": false,
        "index": 4,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": false,
        "audible": false,
        "height": 955,
        "highlighted": false,
        "id": 391,
        "incognito": false,
        "index": 5,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": false,
        "audible": false,
        "height": 955,
        "highlighted": false,
        "id": 512,
        "incognito": false,
        "index": 6,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": false,
        "audible": false,
        "height": 955,
        "highlighted": false,
        "id": 540,
        "incognito": false,
        "index": 7,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": true,
        "audible": false,
        "height": 955,
        "highlighted": true,
        "id": 548,
        "incognito": false,
        "index": 8,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": true,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    },
    {
        "active": false,
        "audible": false,
        "height": 955,
        "highlighted": false,
        "id": 552,
        "incognito": false,
        "index": 9,
        "mutedInfo": {
            "muted": false
        },
        "openerTabId": 548,
        "pinned": false,
        "selected": false,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    }
]
selected Object {active: true, audible: false, height: 955, highlighted: true, id: 329…}

@simon-weber
Copy link
Owner

Huh. Chrome seems to think there's a bunch of tabs open, maybe in another window.

At the bottom of the console where you copied this, can you try running:

chrome.windows.getAll({populate: true}, ws => console.log(JSON.stringify(ws, null, '\t')));

and pasting back the output?

@onespaceman
Copy link
Author

Oh, sorry. I did have a bunch of tabs open. This is the output with just Play Music open.

trackcache.js:9 opening...
background.js:280 see user 01423689343908048365 Object
background.js:261 opened
background.js:43 set poll for 01423689343908048365 1453145976277000
background.js:85 got tracks 2688
background.js:91 done with refresh of 2688 tracks
chrometools.js:22 tab query for chrome-extension://blbompphddfibggfmmfcgjjoadebinem/html/playlists.html?userId=01423689343908048365 yields [
    {
        "active": true,
        "audible": false,
        "height": 955,
        "highlighted": true,
        "id": 4,
        "incognito": false,
        "index": 0,
        "mutedInfo": {
            "muted": false
        },
        "pinned": false,
        "selected": true,
        "status": "complete",
        "width": 1672,
        "windowId": 1
    }
]
selected Object {active: true, audible: false, height: 955, highlighted: true, id: 4…}

and the output for the command

[
    {
        "alwaysOnTop": false,
        "focused": false,
        "height": 1027,
        "id": 1,
        "incognito": false,
        "left": 1,
        "state": "maximized",
        "tabs": [
            {
                "active": true,
                "audible": false,
                "height": 955,
                "highlighted": true,
                "id": 4,
                "incognito": false,
                "index": 0,
                "mutedInfo": {
                    "muted": false
                },
                "pinned": false,
                "selected": true,
                "status": "complete",
                "width": 1672,
                "windowId": 1
            }
        ],
        "top": 23,
        "type": "normal",
        "width": 1672
    }
]

@simon-weber
Copy link
Owner

I did have a bunch of tabs open.

It looks like the query is returning all your tabs, instead of just those matching the query. A few ideas:

  • what version of chrome are you running? maybe it's a bug that got fixed at some point.
  • are you running any different extensions on this machine compared to your others?
  • does chrome.tabs.query({url: "chrome-extension://blbompphddfibggfmmfcgjjoadebinem/*"}, ts => console.log(ts)) also return one entry per open tab?

@onespaceman
Copy link
Author

I was on the dev channel. I move back to the stable and it works fine. That should have been the first thing I checked. Sorry about that.

I run stable on Windows and Linux, which is probably why it still worked on those machines.

@simon-weber
Copy link
Owner

No problem; glad we got it figured out.

Hopefully this is just a temporary regression on dev, and doesn't mean the api is going to be changing in the future 😁

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

No branches or pull requests

2 participants