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

bug: plex stuck on idle #218

Closed
2 tasks done
Sav3k opened this issue Oct 30, 2024 · 11 comments · Fixed by #219
Closed
2 tasks done

bug: plex stuck on idle #218

Sav3k opened this issue Oct 30, 2024 · 11 comments · Fixed by #219
Labels
bug Something isn't working

Comments

@Sav3k
Copy link

Sav3k commented Oct 30, 2024

Please check existing knowledge before opening an issue

Describe the Bug

After setting up Plex with the new API-method everything seemed to be working fine. When i proceeded to test the scrobling sometime later i noticed that plex was stuck on idle. The log shows an error there and i don't know if it's something with my setup or the app itself.

this is what my config looks like:

      {
        "name": "Plex",
        "enable": true,
        "clients": [],
        "data": {
          "token": "MYPLEXTOKEN",
          "url": "http://192.168.1.2:32400"
        },
        "type": "plex"
      }

Platform

Docker

Versions

  • multi-scrobbler on v0.8.7

Logs

[2024-10-30 14:35:43.393 +0100] ERROR  : [App] [Sources] [Plex - Plex] Error occurred while polling
[2024-10-30 14:35:43.393 +0100] ERROR  : [App] [Sources] [Plex - Plex] Cannot read properties of undefined (reading 'toLocaleLowerCase')
TypeError: Cannot read properties of undefined (reading 'toLocaleLowerCase')
    at PlexApiSource.isActivityValid (CWD/src/backend/sources/PlexApiSource.ts:215:88)
    at PlexApiSource.getRecentlyPlayed (CWD/src/backend/sources/PlexApiSource.ts:340:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at PlexApiSource.doPolling (CWD/src/backend/sources/AbstractSource.ts:389:34)
    at PlexApiSource.startPolling (CWD/src/backend/sources/AbstractSource.ts:324:27)
    at PlexApiSource.poll (CWD/src/backend/sources/AbstractSource.ts:292:9)

Additional Context

No response

@Sav3k Sav3k added the bug Something isn't working label Oct 30, 2024
@FoxxMD
Copy link
Owner

FoxxMD commented Oct 30, 2024

Thanks for the report. To help me debug this can you please do the following:

  • Use Plex with media/music playing the same way it was when this error occurred (or try your best to reproduce it)
  • Visit this URL (use your own token) and copy/paste the response XML data that is rendered to a comment here
http://192.168.1.2:32400/status/sessions?X-Plex-Token=MYPLEXTOKEN

@Sav3k
Copy link
Author

Sav3k commented Oct 30, 2024

yeah sure!

<Track addedAt="1730295306" duration="223667" grandparentGuid="mbid://18fd16ff-1807-4951-bfcf-700018019edb" grandparentKey="/library/metadata/2" grandparentRatingKey="2" grandparentTitle="Feine Sahne Fischfilet" guid="plex://track/5d080168403c640290e41fa4" index="9" key="/library/metadata/12" lastViewedAt="1730298343" librarySectionID="2" librarySectionKey="/library/sections/2" librarySectionTitle="Music" parentGuid="plex://album/5d07cbc6403c640290e1ca0a" parentIndex="1" parentKey="/library/metadata/3" parentRatingKey="3" parentStudio="Audiolith Records" parentThumb="/library/metadata/3/thumb/1730297920" parentTitle="Sturm & Dreck" parentYear="2018" ratingCount="4249" ratingKey="12" sessionKey="27" thumb="/library/metadata/3/thumb/1730297920" title="Suruç" titleSort="Suruc" type="track" updatedAt="1730295311" viewCount="2" viewOffset="19000">
<Media audioChannels="2" audioCodec="flac" container="flac" duration="223667" hasVoiceActivity="0" id="10" selected="1">
<Part container="flac" duration="223667" file="/media/Music/Feine Sahne Fischfilet/Sturm & Dreck (2018)/09 - Suruç.flac" hasThumbnail="1" id="22" key="/library/parts/22/1730297734/file.flac" size="35178264" decision="directplay" selected="1">
<Stream audioChannelLayout="stereo" bitDepth="16" bitrate="1258" channels="2" codec="flac" displayTitle="FLAC (Stereo)" extendedDisplayTitle="FLAC (Stereo)" id="36" index="0" samplingRate="44100" selected="1" streamType="2" location="direct"/>
</Part>
</Media>
<User/>
<Player address="192.168.1.187" device="Windows" machineIdentifier="m8j6q0phuxcndvbazwrgsd23" model="bundled" platform="Microsoft Edge" platformVersion="130.0" product="Plex Web" profile="Microsoft Edge" remotePublicAddress="192.168.1.187" state="playing" title="Microsoft Edge" version="4.138.0" local="0" relayed="0" secure="0" userID="1"/>
<Session id="fkzilylzov4pp2hdivrykjn8" bandwidth="2642" location="wan"/>
</Track>
</MediaContainer>

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 30, 2024

Thanks for the quick feedback. Can you confirm for me whether you need to login to Plex or not? If you are on desktop does the profile area just show "Sign In" like this?

image

@Sav3k
Copy link
Author

Sav3k commented Oct 30, 2024

Thank you, for your quick help! :) It shows sign in yes, i did and the issue persists.

@Sav3k
Copy link
Author

Sav3k commented Oct 30, 2024

Okay, maybe it needs some time after the login because now it seems to be working fine again:

[2024-10-30 17:06:32.210 +0100] INFO   : [App] [Sources] [Plex - Plex] Polling started
[2024-10-30 17:06:32.206 +0100] INFO   : [App] [Heartbeat] [Sources] Attempted to restart 1 sources that were not polling.
[2024-10-30 17:06:32.204 +0100] INFO   : [App] [Sources] [Plex - Plex] Should be polling! Attempting to restart polling...

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 30, 2024

There is an issue! I have isolated it and am building a PR for it shortly for you to test.

@Sav3k
Copy link
Author

Sav3k commented Oct 30, 2024

Ah okay, good to know it's not me going mad

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 30, 2024

@Sav3k please try using docker image foxxmd/multi-scrobbler:pr-219 and let me know if that fixes the issue

@Sav3k
Copy link
Author

Sav3k commented Oct 30, 2024

Seems to be working, after signing out the log shows that it's still scrobbling and correctly using the PLEX_LOCAL_USER

@FoxxMD FoxxMD closed this as completed in 312b6ce Oct 30, 2024
FoxxMD added a commit that referenced this issue Oct 30, 2024
fix(plex): Handle plex local user
@FoxxMD
Copy link
Owner

FoxxMD commented Oct 30, 2024

Fix is now available in latest tag or 0.8.8

@Sav3k
Copy link
Author

Sav3k commented Oct 31, 2024

Thanks for the quick fix, appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants