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

Debugging

Simon Weber edited this page Aug 7, 2019 · 8 revisions

Since this extension is an unofficial client, things can sometimes break unexpectedly. This page can help you figure out what's going wrong.

Handling syncing failures or an overloaded account

When the extension syncs too many changes too quickly, it can cause problems on Google's end. This can cause a variety of symptoms, including:

  • new autoplaylists not appearing in Google Music
  • existing autoplaylists not being updated in Google Music
  • "couldn't open the playlist" messages on the Google Music web or mobile app
  • a "syncing has been temporarily disabled" message in the extension

Usually this is a temporary problem that solves itself when Google recovers. If you're seeing it frequently, though, here are some things that can reduce the load on Google:

  • from the extension settings page, increase your sync period and enable change batching
  • switch from random ordering - which causes lots of reordering requests - to a more stable ordering, then shuffle from inside Google Music instead
  • add a limit to large autoplaylists that change frequently

Finally, you can consider temporarily disabling periodic syncing (by setting your sync period to 0) and only syncing manually. If you're still seeing problems after a few days of this, reach out and I'll take a look.

Viewing your logs

The extension logs all sorts of useful information while running. To check the logs:

  • navigate to chrome://extensions
  • check "developer mode" at the top right
  • click the "inspect views: background page" link under the extension listing. This will open a new window.
  • in the new window, click the "console" tab

If there were errors or warnings, the top right-hand corner will have markings like ❎ and ⚠️ respectively. If you see these, you can use the funnel button in the top-left corner and click "Errors" or "Warnings" to filter them out from everything else.

If you'd like to save the logs to a file, right click anywhere in the console and click "save as".

Reloading the extension

If the extension gets into a weird state, it can sometimes help to manually reload it.

To do this:

  • navigate to chrome://extensions
  • uncheck "enabled" next to the Autoplaylists entry
  • check "enabled" again
  • refresh any existing Google Music tabs
Refreshing your auth token

When you accept the OAuth prompt during installation, Google gives Autoplaylists a token representing the granted permissions. Sometimes, the local copy of this token can become corrupt, which prevents Autoplaylists from interacting with your library or checking whether you bought a license.

Usually, clicking the extension icon is enough to fix this, since Autoplaylists will detect the problem and re-prompt for authorization. In some cases, though, it may need to be manually revoked first. To do this:

  • navigate to chrome://identity-internals
  • look for an entry for Autoplaylists
  • if it exists, click the "revoke" button beneath the "Scopes" row
  • then, open/refresh a Google Music tab, click the extension button, and accept the auth prompt
Manually making queries

There's a hidden interface that lets you execute a custom query against your library. This is useful if you're trying to find more information about a particular set of songs, or just curious about your library.

To use it:

  • open the extension through the page action
  • manually navigate to chrome-extension://blbompphddfibggfmmfcgjjoadebinem/html/debug.html
  • change the code as you wish and hit "run"
  • if desired, click "Column Visibility" to show/hide columns, or click a column header to sort by it

The querying language is similar to SQL and described fully here. Here are some example queries:

  • all tracks: no changes required; just hit run.
  • all tracks of artist Amorphis: change where() to where(Track.artist.eq('Amorphis'))
  • all tracks of artist Amorphis and album Skyforger: where(Lf.op.and(Track.artist.eq('Amorphis'), Track.album.eq('Skyforger')))

Note that more fields are available through this interface than the normal querying interface; you can find them listed in track.js.