anatosun / plexamp-docker

An unofficial Docker image for Plexamp
https://www.plex.tv/plexamp/
30 stars 5 forks source link

Coulnd't start Playback #1

Open fmnamado opened 1 year ago

fmnamado commented 1 year ago

Hello,

Thank you for this docker image. I have been trying to deploy this docker image. It deploys but I cannot playback any song. I have a combination of several servers and players, both Plex and PlexAmp so I can test them out.

I am trying to run this docker container on a PC, 64 bits.

This is the content of my docker compose file:

version: '3'
services:
  plexamp:
    container_name: plexamp
    privileged: true
    image: ghcr.io/anatosun/plexamp:amd64
    devices:
        - "/dev/snd:/dev/snd"
    volumes:
        - "##my_directory##..."/Config/PlexAmp:/root/.local/share/Plexamp/Settings # replace that with the appropriate host binding
    environment:
        - PLEXAMP_CLAIM_TOKEN=claim-w_____xxxx_____6 # get your claim at https://www.plex.tv/claim/
        - PLEXAMP_PLAYER_NAME=HPG1MiniUSBPlexAmp # replace this with your player name
    ports:
        - 32500:32500
        - 20000:20000
    restart: unless-stopped

What I have acomplished:

What I CANNOT DO:

Googling I also found this post on reddit:

https://www.reddit.com/r/plexamp/comments/146y4tz/plexamp_headless_docker_image/

sumoneelse 2 mo. ago
Raspberry Pi B model 4. I seem to have some sort of issue with my audio device. I get "cannot start playback" despite having selected my headphone jack as the audio device. Testing audio to that jack from the command line and from the desktop both work fine. I am passing /dev/snd to the docker image and see all 3 devices (headphones, HDMI 1 and 2) show up as options in Plexamp. 

It seems the same problem.

Can someone help? Has anyone been able to launch this on AMD64 version? What am I doing wrong?

Thank you very much for your work :)

anatosun commented 1 year ago

Do you have additional logs? You may find them at ~/.cache/Plexamp/log inside your container. I suggest you add a binding to make them persistent on your host.

fmnamado commented 1 year ago

Thank you for your quick answer.

I followed your suggestions and made it persistent. I added this in docker compose file - "mydir"/PlexAmp/log:/root/.cache/Plexamp/log # replace that with the appropriate host binding

Down below the logs. I changed what seemed to me somekind of identifiers for privacy reasons. Does this make sense, to change them when displaying publicly on the internet? Is there anything in the logs you would advise to mask?

Aug 11, 2023 10:41:50.516 [Javascript] INFO - Starting Plexamp 4.8.1 - linux 6.1.0-0.deb11.7-amd64
Aug 11, 2023 10:41:50.516 [Javascript] INFO - METRICS: Initializing.
Aug 11, 2023 10:41:50.518 [Javascript] INFO - USER: Refreshing users.
Aug 11, 2023 10:41:50.518 [Javascript] INFO - Autoupdate: Identifier desktop should check: false.
Aug 11, 2023 10:41:50.519 [Javascript] INFO - DEVICE: Initializing device manager.
Aug 11, 2023 10:41:50.522 [Javascript] INFO - DEVICE: Loaded 10 devices.
Aug 11, 2023 10:41:50.523 [0x1XXXXX0] DEBUG - Networking: Create request 1: (GET https://plex.tv/api/users).
Aug 11, 2023 10:41:50.524 [Javascript] INFO - DEVICE: Initializing manager.
Aug 11, 2023 10:41:50.525 [Javascript] INFO - DEVICE: Fetching latest provider list from cloud.
Aug 11, 2023 10:41:50.526 [Javascript] INFO - DEVICE: Fetching latest list from cloud.
Aug 11, 2023 10:41:50.527 [Javascript] INFO - DEVICE: Fetching latest cloud player list from https://sonos.plex.tv
Aug 11, 2023 10:41:50.528 [Javascript] INFO - DEVICE: Starting connection test.
Aug 11, 2023 10:41:50.531 [0x1XXXXX0] DEBUG - Networking: Create request 2: (GET https://plex.tv/media/providers).
Aug 11, 2023 10:41:50.532 [0x1XXXXX0] DEBUG - Networking: Create request 3: (GET https://sonos.plex.tv/resources).
Aug 11, 2023 10:41:50.533 [Javascript] INFO - DEVICE: Fast-path connection testing.
Aug 11, 2023 10:41:50.535 [Javascript] INFO - DEVICE: Persisting 10 devices.
Aug 11, 2023 10:41:50.543 [Javascript] INFO - DEVICE: Initialization finished in 18ms.
Aug 11, 2023 10:41:50.543 [Javascript] WARNING - Background function failed: 15000 is not a function
Aug 11, 2023 10:41:50.544 [0x1XXXXX0] DEBUG - Networking: Create request 4: (GET https://plex.tv/api/v2/user/privacy.json).
Aug 11, 2023 10:41:50.545 [0x1XXXXX0] DEBUG - Networking: Create request 5: (GET https://plex.tv/api/v2/resources?includeHttps=1&includeRelay=1).
Aug 11, 2023 10:41:50.548 [Javascript] INFO - ACCOUNT: Refreshing data.
Aug 11, 2023 10:41:50.549 [0x1XXXXX0] DEBUG - Networking: Create request 6: (GET https://plex.tv/api/v2/user.json?includeSubscriptions=1&includeProviders=1).
Aug 11, 2023 10:41:50.568 [Javascript] INFO - App: Device manager, settings and cache initialized in 50ms.
Aug 11, 2023 10:41:50.569 [Javascript] INFO - Sync: Loaded in 1ms.
Aug 11, 2023 10:41:50.570 [Javascript] INFO - App: Offline store initialized in 1ms.
Aug 11, 2023 10:41:50.573 [Javascript] INFO - Companion: Initializing.
Aug 11, 2023 10:41:50.575 [Javascript] INFO - Companion: Network type is -1 and enabled is true.
Aug 11, 2023 10:41:50.576 [0x1XXXXX0] DEBUG - BASS: Starting up.
Aug 11, 2023 10:41:50.576 [0x1XXXXX0] DEBUG - BASS: Created bass audio renderer.
Aug 11, 2023 10:41:50.587 [0x1XXXXX0] INFO - BASS: Device 1: Default - enabled default - sample rates: () - active 0/0
Aug 11, 2023 10:41:50.587 [0x1XXXXX0] INFO - BASS: Device 2: USB Audio Device: USB Audio - enabled - sample rates: () - active 0/0
Aug 11, 2023 10:41:50.587 [0x1XXXXX0] DEBUG - BASS: Using plugin path '/home/root/plexamp/treble/linux-x64/'.
Aug 11, 2023 10:41:50.587 [0x1XXXXX0] DEBUG - BASS: Reloading ourselves for symbol visibility.
Aug 11, 2023 10:41:50.587 [0x1XXXXX0] INFO - BASS: Loaded AAC plug-in version 2.4.5.8
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Loaded ALAC plug-in version 2.4.0.3
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Loaded FLAC plug-in version 2.4.4.5
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Loaded OPUS plug-in version 2.4.2.1
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Loaded APE plug-in version 2.4.2.0
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Loaded MPC plug-in version 2.4.1.2
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Loaded DSD plug-in version 2.4.1.2
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Core version 2.4.17.0
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Mixer version 2.4.11.1
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: FX version 2.4.12.1
Aug 11, 2023 10:41:50.588 [0x1XXXXX0] INFO - BASS: Curl version is 7.84.0 (protocols: dict file http https mqtt; ssl: OpenSSL/1.1.1u; libz: 1.2.11; DNS: threaded).
Aug 11, 2023 10:41:50.589 [0x1XXXXX0] INFO - BASS: Thread pool library is version v3.0.0 (2022-05-30)
Aug 11, 2023 10:41:50.589 [0x1XXXXX0] DEBUG - Network Cost: Updated to unconstrained, cheap.
Aug 11, 2023 10:41:50.590 [Javascript] INFO - Audio: Initializing.
Aug 11, 2023 10:41:50.590 [Javascript] INFO - Audio: Binding settings.
Aug 11, 2023 10:41:50.590 [Javascript] INFO - Audio: Setting player info.
Aug 11, 2023 10:41:50.591 [0x0a425700] DEBUG - BASS: Setting audio interface:  -> hw:1,0.
Aug 11, 2023 10:41:50.591 [0x0a425700] DEBUG - BASS: Resetting device (soft: 0, force: 1, initialized: 0).
Aug 11, 2023 10:41:50.600 [Javascript] INFO - App: Player initialized in 11ms.
Aug 11, 2023 10:41:50.602 [Javascript] INFO - App: Waiting for rest of stores to initialize.
Aug 11, 2023 10:41:50.603 [Javascript] INFO - Companion: Device token changed: true
Aug 11, 2023 10:41:50.603 [Javascript] INFO - Companion: Network type is -1 and enabled is true.
Aug 11, 2023 10:41:50.604 [Javascript] INFO - Server Activity: Connecting based on switch.
Aug 11, 2023 10:41:50.604 [Javascript] INFO - Server Activity: Trying to connect to 4dbXXXXXXXXXXXX6b.
Aug 11, 2023 10:41:50.605 [Javascript] INFO - EventSource: Connecting to https://192-168-10-250.90cXXXXXXXXXXXX2f5f.plex.direct:32400/:/eventsource/notifications?filters=timeline&X-Plex-Token=<token>
Aug 11, 2023 10:41:50.605 [0x1XXXXX0] DEBUG - Networking: Create request 7: (GET https://192-168-10-250.90cXXXXXXXXXXXXf5f.plex.direct:32400/:/eventsource/notifications?filters=timeline&X-Plex-Token=<token>).
Aug 11, 2023 10:41:50.607 [Javascript] INFO - DeeJay: Initializing.
Aug 11, 2023 10:41:50.608 [Javascript] INFO - GPT: Error loading prompts Tried to access storage on the server. Did you forget to call this in useEffect?
Aug 11, 2023 10:41:50.609 [Javascript] INFO - Player: Initializing with state null
Aug 11, 2023 10:41:50.610 [Javascript] INFO - Player: Sending state changed [A]  -  (0/0) in state stopped with artwork false.
Aug 11, 2023 10:41:50.612 [Javascript] INFO - App: Stopping activity recognition.
Aug 11, 2023 10:41:50.613 [Javascript] INFO - Network changed: type is ethernet -> WIFI (192.168.64.2)
Aug 11, 2023 10:41:50.613 [Javascript] INFO - Companion: Network type is 2 and enabled is true.
Aug 11, 2023 10:41:50.613 [Javascript] INFO - PubSub: Network type is 2.
Aug 11, 2023 10:41:50.614 [Javascript] INFO - PubSub: Attempting to connect to pubsub, started false connected false
Aug 11, 2023 10:41:50.614 [Javascript] INFO - EventSource: Connecting to https://pubsub.plex.tv/sub/eventsource/5850175/f6603XXXXXXXXXXXXc77f628f?X-Plex-Token=<token>
Aug 11, 2023 10:41:50.614 [0x1XXXXX0] DEBUG - Networking: Create request 8: (GET https://pubsub.plex.tv/sub/eventsource/58XXXXXXXXXXXX75/f660XXXXXXXXXXXXc77f628f?X-Plex-Token=<token>).
Aug 11, 2023 10:41:50.614 [0x1XXXXX0] INFO - BASS: Network switched to 2.
Aug 11, 2023 10:41:50.614 [Javascript] INFO - App: Network is connected, but type changed to 2, so doing preemptive connection testing on selected server.
Aug 11, 2023 10:41:50.615 [Javascript] INFO - DEVICE: Finding best connection for <library> 4db8426b7XXXXXXXXXXXX0fef6b.
Aug 11, 2023 10:41:50.616 [0x1XXXXX0] DEBUG - Networking: Create request 9: (GET https://192-168-10-250.90c85XXXXXXXXXXXX2f5f.plex.direct:32400/).
Aug 11, 2023 10:41:50.616 [Javascript] INFO - Player: Restoring player route of local with network state 2.
Aug 11, 2023 10:41:50.642 [0x08c22700] DEBUG - Networking: Completed request 9: (GET https://192-168-10-250.90c8XXXXXXXXXXXX2f5f.plex.direct:32400/) with code 200 (have 7922 bytes) in 26 ms.
Aug 11, 2023 10:41:50.652 [Javascript] INFO - Player: Sending state changed [A]  -  (0/0) in state stopped with artwork false.
Aug 11, 2023 10:41:50.653 [Javascript] INFO - Companion: Attempting to start HTTP Server on port 32500.
Aug 11, 2023 10:41:50.654 [0xea5f8700] DEBUG - HTTP: Serving on port 32500.
Aug 11, 2023 10:41:50.656 [Javascript] INFO - DEVICE: Server connection worked for <library> ~ https://192-168-10-250.90cXXXXXXXXXXXXf5f.plex.direct:32400
Aug 11, 2023 10:41:50.656 [Javascript] INFO - DEVICE: Reading libraries and features from <library>
Aug 11, 2023 10:41:50.657 [0x1XXXXX0] DEBUG - Networking: Create request 10: (GET https://192-168-10-250.90c85XXXXXXXXXXXX12f5f.plex.direct:32400/media/providers?includePreferences=1).
Aug 11, 2023 10:41:50.672 [Javascript] INFO - Player: Sending state changed [A]  -  (0/0) in state stopped with artwork false.
Aug 11, 2023 10:41:50.672 [Javascript] INFO - ViewState: Error loading from storage. Unexpected token u in JSON at position 0
Aug 11, 2023 10:41:50.680 [Javascript] INFO - Companion: Advertising for GDM.
Aug 11, 2023 10:41:50.680 [Javascript] INFO - Companion: Listening for GDM messages.
Aug 11, 2023 10:41:50.682 [Javascript] INFO - Companion: Registering device 'HPG1MiniUSBPlexAmp' at 192.168.64.2:32500.
Aug 11, 2023 10:41:50.682 [0x1XXXXX0] DEBUG - Networking: Create request 11: (PUT https://plex.tv/devices/f6603b0XXXXXXXXXXXXf628f?Connection[][uri]=http://192.168.64.2:32500&X-Plex-Device-Name=HPG1MiniUSBPlexAmp).
Aug 11, 2023 10:41:50.685 [Javascript] INFO - Cloud: [RecentPlays] Loading from storage 20 items and 0 deleted.
Aug 11, 2023 10:41:50.685 [Javascript] INFO - Cloud: [RecentPlays] Syncing.
Aug 11, 2023 10:41:50.686 [0x1XXXXX0] DEBUG - Networking: Create request 12: (GET https://plex.tv/api/v2/user/settings?uuid=00XXXXXXXXXXXX1&key=RecentPlays).
Aug 11, 2023 10:41:50.686 [Javascript] INFO - Discovery: Are we offline? 0 hubs, network is 2 => offline: true.
Aug 11, 2023 10:41:50.687 [Javascript] INFO - Cloud: [SharedItems] Loading from storage 0 items and 0 deleted.
Aug 11, 2023 10:41:50.687 [Javascript] INFO - Cloud: [SharedItems] Syncing.
Aug 11, 2023 10:41:50.687 [0x1XXXXX0] DEBUG - Networking: Create request 13: (GET https://plex.tv/api/v2/user/settings?uuid=00XXXXXXXXXXXXc1&key=SharedItems).
Aug 11, 2023 10:41:50.687 [Javascript] INFO - App: Stores initialized in 87ms.
Aug 11, 2023 10:41:50.688 [Javascript] INFO - App: Stores all initialized.
Aug 11, 2023 10:41:50.688 [Javascript] INFO - Car: Going offline for loss of network.
Aug 11, 2023 10:41:50.690 [Javascript] INFO - Discovery: Are we offline? 8 hubs, network is 2 => offline: false.
Aug 11, 2023 10:41:50.690 [Javascript] INFO - Car: We have network now, and home screen loaded.
Aug 11, 2023 10:41:50.690 [Javascript] INFO - Discovery: Refresh based on server/library switch 4dbXXXXXXXXXXXXfef6b /library/sections/5.
Aug 11, 2023 10:41:50.691 [Javascript] INFO - Discovery: Fetching hubs for library /library/sections/5 server 4db8XXXXXXXXXXXXf6b refreshing from cloud false.
Aug 11, 2023 10:41:50.692 [0x1XXXXX0] DEBUG - Networking: Create request 14: (GET https://192-168-10-250.90c85XXXXXXXXXXXX5f.plex.direct:32400/hubs/sections/5?count=6&includeExternalMetadata=1&includeMyMixes=1&includeAnniversaryReleases=1&excludeElements=Similar,Mood&includeLibraryPlaylists=1&includeStations=1&includeStationDirectories=1&excludeFields=summary&includeFields=thumbBlurHash&X-Plex-Device-Name=HPG1MiniUSBPlexAmp).
Aug 11, 2023 10:41:50.730 [0x08c22700] DEBUG - Networking: Completed request 14: (GET https://192-168-10-250.90c85XXXXXXXXXXXXf5f.plex.direct:32400/hubs/sections/5?count=6&includeExternalMetadata=1&includeMyMixes=1&includeAnniversaryReleases=1&excludeElements=Similar,Mood&includeLibraryPlaylists=1&includeStations=1&includeStationDirectories=1&excludeFields=summary&includeFields=thumbBlurHash&X-Plex-Device-Name=HPG1MiniUSBPlexAmp) with code 200 (have 32731 bytes) in 37 ms.
Aug 11, 2023 10:41:50.737 [Javascript] INFO - Discovery: Setting 9 hubs from <library>.
Aug 11, 2023 10:41:50.737 [Javascript] INFO - Discovery: Are we offline? 8 hubs, network is 2 => offline: false.
Aug 11, 2023 10:41:50.799 [0x08c22700] DEBUG - Networking: Completed request 10: (GET https://192-168-10-250.9XXXXXXXXXXXXf5f.plex.direct:32400/media/providers?includePreferences=1) with code 200 (have 38270 bytes) in 128 ms.
Aug 11, 2023 10:41:50.800 [Javascript] INFO - DEVICE: Found 9 libraries from <library>: <<<<<MY LIBRARIES>>>>>
Aug 11, 2023 10:41:50.853 [0x08c22700] DEBUG - Networking: Completed request 3: (GET https://sonos.plex.tv/resources) with code 403 (have 9 bytes) in 321 ms.
Aug 11, 2023 10:41:50.856 [Javascript] WARNING - DEVICE: Error loading cloud players from plex.tv HTTP status 403
Aug 11, 2023 10:41:50.903 [Javascript] INFO - DEVICE: Finding best connection for browser c6e10XXXXXXXXXXXXe4.
Aug 11, 2023 10:41:50.904 [0x1XXXXX0] DEBUG - Networking: Create request 15: (GET http://192.168.64.2:32500/resources).
Aug 11, 2023 10:41:50.904 [Javascript] INFO - DEVICE: Finding best connection for DESKTOP CR37ILV e5XXXXXXXXXXXX8f7.
Aug 11, 2023 10:41:50.904 [0x1XXXXX0] DEBUG - Networking: Create request 16: (GET http://192.168.10.238:32500/resources).
Aug 11, 2023 10:41:50.904 [Javascript] INFO - DEVICE: Finding best connection for HPG1MiniUSBPlexAmp 7a4XXXXXXXXXXXX8.
Aug 11, 2023 10:41:50.904 [0x1XXXXX0] DEBUG - Networking: Create request 17: (GET http://192.168.48.2:32500/resources).
Aug 11, 2023 10:41:50.904 [Javascript] INFO - DEVICE: Finding best connection for iPhone F37XXXXXXXXXXXXCE.
Aug 11, 2023 10:41:50.905 [0x1XXXXX0] DEBUG - Networking: Create request 18: (GET http://192.168.254.96:32500/resources).
Aug 11, 2023 10:41:50.905 [Javascript] INFO - DEVICE: Finding best connection for iPhone cfdaXXXXXXXXXXXX11.
Aug 11, 2023 10:41:50.906 [0x1XXXXX0] DEBUG - Networking: Create request 19: (GET http://192.168.254.96:57874/resources).
Aug 11, 2023 10:41:50.906 [Javascript] INFO - DEVICE: Finding best connection for LG XXXXXXXXXXXX x3hXXXXXXXXXXXXk7n.
Aug 11, 2023 10:41:50.906 [0x1XXXXX0] DEBUG - Networking: Create request 20: (GET https://192-168-10-250.90c8XXXXXXXXXXXXf5f.plex.direct:32400/resources).
Aug 11, 2023 10:41:50.909 [Javascript] INFO - HttpServer: [192.168.64.2] GET /resources 
Aug 11, 2023 10:41:50.915 [0x08c22700] DEBUG - Networking: Completed request 20: (GET https://192-168-10-250.90c8XXXXXXXXXXXX5f.plex.direct:32400/resources) with code 200 (have 83 bytes) in 8 ms.
Aug 11, 2023 10:41:50.916 [0x08c22700] DEBUG - Networking: Completed request 11: (PUT https://plex.tv/devices/f6XXXXXXXXXXXX8f?Connection[][uri]=http://192.168.64.2:32500&X-Plex-Device-Name=HPG1MiniUSBPlexAmp) with code 200 (have 502 bytes) in 233 ms.
Aug 11, 2023 10:41:50.918 [0x08c22700] DEBUG - Networking: Completed request 5: (GET https://plex.tv/api/v2/resources?includeHttps=1&includeRelay=1) with code 200 (have 9753 bytes) in 372 ms.
Aug 11, 2023 10:41:50.924 [0x08c22700] DEBUG - Networking: Completed request 13: (GET https://plex.tv/api/v2/user/settings?uuid=004XXXXXXXXXXXX1&key=SharedItems) with code 404 (have 105 bytes) in 236 ms.
Aug 11, 2023 10:41:50.924 [0x08c22700] DEBUG - Networking: Completed request 12: (GET https://plex.tv/api/v2/user/settings?uuid=0XXXXXXXXXXXXc1&key=RecentPlays) with code 200 (have 9495 bytes) in 238 ms.
Aug 11, 2023 10:41:50.925 [0x08c22700] DEBUG - Networking: Completed request 15: (GET http://192.168.64.2:32500/resources) with code 200 (have 356 bytes) in 21 ms.
Aug 11, 2023 10:41:50.930 [Javascript] WARNING - DEVICE: The player xXXXXXXXXXXXXn wasn't found in available resources at https://192-168-10-250.90c8XXXXXXXXXXXX2f5f.plex.direct:32400.
Aug 11, 2023 10:41:50.930 [Javascript] WARNING - DEVICE: Connection testing failed for LG XXXXXXXXXXXX
Aug 11, 2023 10:41:50.930 [Javascript] INFO - Companion: Started HTTP Server on port 32500 and registered.
Aug 11, 2023 10:41:50.931 [Javascript] INFO - DEVICE: Fetched 10 devices from the cloud.
Aug 11, 2023 10:41:50.931 [Javascript] INFO - Cloud: [SharedItems] Error getting data: HTTP status 404
Aug 11, 2023 10:41:50.931 [Javascript] INFO - Cloud: [SharedItems] Received data, performing sync.
Aug 11, 2023 10:41:50.932 [Javascript] INFO - Cloud: [SharedItems] Syncing complete with added: 0 deleted: 0 and dirty: 0.
Aug 11, 2023 10:41:50.933 [Javascript] INFO - Cloud: [RecentPlays] Received data, performing sync.
Aug 11, 2023 10:41:50.934 [Javascript] INFO - Discovery: There was a change to Recent Plays.
Aug 11, 2023 10:41:50.935 [Javascript] INFO - Discovery: Are we offline? 8 hubs, network is 2 => offline: false.
Aug 11, 2023 10:41:50.936 [Javascript] INFO - Cloud: [RecentPlays] Syncing complete with added: 0 deleted: 0 and dirty: 0.
Aug 11, 2023 10:41:50.937 [Javascript] WARNING - DEVICE: The player c6eXXXXXXXXXXXX4 wasn't found in available resources at http://192.168.64.2:32500.
Aug 11, 2023 10:41:50.937 [Javascript] WARNING - DEVICE: Connection testing failed for browser
Aug 11, 2023 10:41:50.939 [0x08c22700] DEBUG - Networking: Completed request 2: (GET https://plex.tv/media/providers) with code 200 (have 217 bytes) in 407 ms.
Aug 11, 2023 10:41:50.939 [0x08c22700] DEBUG - Networking: Completed request 4: (GET https://plex.tv/api/v2/user/privacy.json) with code 200 (have 6930 bytes) in 394 ms.
Aug 11, 2023 10:41:50.940 [Javascript] INFO - METRICS: Saving latest cloud settings for metrics.
Aug 11, 2023 10:41:50.941 [0x08c22700] DEBUG - Networking: Completed request 1: (GET https://plex.tv/api/users) with code 200 (have 625 bytes) in 417 ms.
Aug 11, 2023 10:41:50.948 [Javascript] INFO - USER: Loaded 1 users
Aug 11, 2023 10:41:50.949 [Javascript] INFO - METRICS: Error loading from storage. Unexpected token u in JSON at position 0
Aug 11, 2023 10:41:50.949 [Javascript] INFO - METRICS: Loaded 0 events from storage
Aug 11, 2023 10:41:51.017 [0x08c22700] DEBUG - Networking: Completed request 6: (GET https://plex.tv/api/v2/user.json?includeSubscriptions=1&includeProviders=1) with code 200 (have 6472 bytes) in 468 ms.
Aug 11, 2023 10:41:51.060 [0x1XXXXX0] DEBUG - Networking: Create request 21: (GET https://plex.tv/api/home/users).
Aug 11, 2023 10:41:51.062 [Javascript] INFO - DEVICE: Persisting 11 devices.
Aug 11, 2023 10:41:51.143 [0x08c22700] DEBUG - Networking: Completed request 21: (GET https://plex.tv/api/home/users) with code 200 (have 785 bytes) in 82 ms.
Aug 11, 2023 10:41:53.958 [0x08c22700] DEBUG - Networking: Completed request 16: (GET http://192.168.10.238:32500/resources) with code -7 (have 0 bytes) in 3053 ms.
Aug 11, 2023 10:41:53.958 [Javascript] WARNING - DEVICE: Player connection http://192.168.10.238:32500 didn't work for DESKTOP CR37ILV: HTTP status -7
Aug 11, 2023 10:41:53.958 [Javascript] WARNING - DEVICE: Connection testing failed for DESKTOP CR37ILV
Aug 11, 2023 10:41:55.905 [0x08c22700] DEBUG - Networking: Completed request 17: (GET http://192.168.48.2:32500/resources) with code -28 (have 0 bytes) in 5000 ms.
Aug 11, 2023 10:41:55.905 [0x08c22700] DEBUG - Networking: Completed request 18: (GET http://192.168.254.96:32500/resources) with code -28 (have 0 bytes) in 4999 ms.
Aug 11, 2023 10:41:55.905 [Javascript] WARNING - DEVICE: Player connection http://192.168.48.2:32500 didn't work for HPG1MiniUSBPlexAmp: HTTP status -28
Aug 11, 2023 10:41:55.905 [Javascript] WARNING - DEVICE: Connection testing failed for HPG1MiniUSBPlexAmp
Aug 11, 2023 10:41:55.905 [Javascript] WARNING - DEVICE: Player connection http://192.168.254.96:32500 didn't work for iPhone: HTTP status -28
Aug 11, 2023 10:41:55.905 [Javascript] WARNING - DEVICE: Connection testing failed for iPhone
Aug 11, 2023 10:41:55.906 [0x08c22700] DEBUG - Networking: Completed request 19: (GET http://192.168.254.96:57874/resources) with code -28 (have 0 bytes) in 5000 ms.
Aug 11, 2023 10:41:55.906 [Javascript] WARNING - DEVICE: Player connection http://192.168.254.96:57874 didn't work for iPhone: HTTP status -28
Aug 11, 2023 10:41:55.906 [Javascript] WARNING - DEVICE: Connection testing failed for iPhone
Aug 11, 2023 10:42:00.533 [Javascript] INFO - DEVICE: Finding best connection for <library> 4db84XXXXXXXXXXXX6b.
Aug 11, 2023 10:42:00.534 [0x1XXXXX0] DEBUG - Networking: Create request 22: (GET https://192-168-10-250.90c8XXXXXXXXXXXX5f.plex.direct:32400/).
Aug 11, 2023 10:42:00.538 [0x08c22700] DEBUG - Networking: Completed request 22: (GET https://192-168-10-250.90cXXXXXXXXXXXXf.plex.direct:32400/) with code 200 (have 7922 bytes) in 4 ms.
Aug 11, 2023 10:42:00.538 [Javascript] INFO - DEVICE: Server connection worked for <library> ~ https://192-168-10-250.90c8XXXXXXXXXXXXf.plex.direct:32400
Aug 11, 2023 10:42:00.539 [Javascript] INFO - DEVICE: Reading libraries and features from <library>
Aug 11, 2023 10:42:00.539 [0x1XXXXX0] DEBUG - Networking: Create request 23: (GET https://192-168-10-250.90c85XXXXXXXXXXXX5f.plex.direct:32400/media/providers?includePreferences=1).
Aug 11, 2023 10:42:00.644 [0x08c22700] DEBUG - Networking: Completed request 23: (GET https://192-168-10-250.90XXXXXXXXXXXX5f.plex.direct:32400/media/providers?includePreferences=1) with code 200 (have 38270 bytes) in 105 ms.
Aug 11, 2023 10:42:00.645 [Javascript] INFO - DEVICE: Found 9 libraries from <library>: <<<libraries>>>
Aug 11, 2023 10:42:00.688 [Javascript] INFO - Sharing: refreshing shared items.
Aug 11, 2023 10:42:00.689 [0x1XXXXX0] DEBUG - Networking: Create request 24: (GET https://plex.tv/api/v2/shared_sources/received).
Aug 11, 2023 10:42:00.776 [0x08c22700] DEBUG - Networking: Completed request 24: (GET https://plex.tv/api/v2/shared_sources/received) with code 200 (have 2 bytes) in 86 ms.
Aug 11, 2023 10:42:00.776 [Javascript] INFO - Cloud: [SharedItems] Syncing.
Aug 11, 2023 10:42:00.776 [0x1XXXXX0] DEBUG - Networking: Create request 25: (GET https://plex.tv/api/v2/user/settings?uuid=00XXXXXXXXXXXX1&key=SharedItems).
Aug 11, 2023 10:42:00.777 [Javascript] INFO - Sharing: refresh completed, existing: undefined, new: 0 deleted: 0
Aug 11, 2023 10:42:00.863 [0x08c22700] DEBUG - Networking: Completed request 25: (GET https://plex.tv/api/v2/user/settings?uuid=00XXXXXXXXXXXX&key=SharedItems) with code 404 (have 105 bytes) in 86 ms.
Aug 11, 2023 10:42:00.863 [Javascript] INFO - Cloud: [SharedItems] Error getting data: HTTP status 404
Aug 11, 2023 10:42:00.863 [Javascript] INFO - Cloud: [SharedItems] Received data, performing sync.
Aug 11, 2023 10:42:00.864 [Javascript] INFO - Cloud: [SharedItems] Syncing complete with added: 0 deleted: 0 and dirty: 0.
Aug 11, 2023 10:42:05.496 [Javascript] INFO - DEVICE: Persisting devices because <library> was dirty.
Aug 11, 2023 10:42:05.496 [Javascript] INFO - DEVICE: Persisting 11 devices.
Aug 11, 2023 10:42:05.570 [Javascript] INFO - Sync: Refreshing and completing items.
Aug 11, 2023 10:42:20.571 [Javascript] INFO - Sync: Error cleaning up: ENOENT: no such file or directory, scandir '/root/.local/share/Plexamp/Offline'.

There are some strange IPs there. The docker container is running in OpenMediaVault. Its IP is 192.168.10.100, my network is 192.168.10.xx range. The PC is an HP, hence the HPG1MiniUSBAudio (it has USB Audio board installed). It has no wifi boards (don't understand the wifi mention in the logs) and there is only one ethernet interface physically on the machine and this is the only the host has. The 192.168.48.2 doesn't make sense, maybe subnetting by docker/container?

BTW, why do we need privileged mode to run this container? Isn't this a security risk we want to avoid?

Does this logs help? I can't find anything that helps me!

Thank you once again!

fmnamado commented 1 year ago

Can someone help me out please? Ty

trankillity commented 11 months ago

I'm not sure if this is related to your error. Seeing a 404 error in there generally means that your Plexamp server can't talk to a host (in this case https://plex.tv/) - but I had a similar thing when I first set mine up. For whatever reason it would work fine when being remotely controlled by another Plexamp client, but trying to play directly through the web interface would give the same error. It turns out that by default, it doesn't select itself as the player. What fixed it for me was to click the cast button in the top right, select a different player, then toggle it back to the target device. Then it was able to play back no problems.

fmnamado commented 11 months ago

Thank you for your help. The container has connectivity to plex.tv

If I enter the console in the container, using wget, a command that can connect to the internet

root@a702356295a5:/home/root/plexamp# wget plex.tv --2023-09-05 10:31:10-- http://plex.tv/ Resolving plex.tv (plex.tv)... 52.210.209.44, 52.211.246.152 Connecting to plex.tv (plex.tv)|52.210.209.44|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://plex.tv/ [following] --2023-09-05 10:31:10-- https://plex.tv/ Connecting to plex.tv (plex.tv)|52.210.209.44|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://www.plex.tv/ [following] --2023-09-05 10:31:10-- https://www.plex.tv/ Resolving www.plex.tv (www.plex.tv)... 104.18.41.153, 172.64.146.103, 2606:4700:4400::ac40:9267, ... Connecting to www.plex.tv (www.plex.tv)|104.18.41.153|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: 'index.html'

index.html [ <=> ] 282.66K --.-KB/s in 0.07s

2023-09-05 10:31:11 (4.22 MB/s) - 'index.html' saved [289443]

root@a702356295a5:/home/root/plexamp#

So from here I would assume it can reach plex.tv

Your suggestion of clicking in anither player and then again in the desired in, gives the "can't connect to remote player", but only in the first try.

If I run the plexamp windows app, I cant play the songs without problem. The headeless plexamp player is also found bue gives the same error.

I would really appreciate some guidance into troubleshooting this.

Also, here

https://github.com/odinb/bash-plexamp-installer

I found this

Q: I got an error during the first Plexamp install and start up:

xxx@PlexampPi:~ $ node /home/xxx/plexamp/js/index.js Starting Plexamp 4.3.0 Please visit https://plex.tv/claim and enter the claim token: claim-xxxxxxxxxxxxxxxxxxxx Please give the player a name (e.g. Bedroom, Kitchen): Marantz DEVICE: Error loading cloud players from plex.tv HTTP status 403

A: That is not a bad thing per se, it just means you didn’t link any “cloud players”. See also: https://forums.plex.tv/t/plexamp-headless-not-playing-music/809078/21

Which led me to

elan Co-Founder Sep '22

DEVICE: Error loading cloud players from plex.tv HTTP status 403

That is not a bad thing per se, it just means you didn’t link any “cloud players”.

Can anyone help me out? What is this cloud players feature and how do I enable it? I tried googling it without success.

Thank you once again.

anatosun commented 7 months ago

Could you try erasing the cookie on the url http://ip:32500, login again and try?

itsdeyan commented 7 months ago

I ran into the exact same issue. Clearing cookies does nothing. Audio devices are detected but whenever I try to play something I get "Coulnd't start Playback" :/

GeekSquirrel commented 6 months ago

It seems a network issue. I changed the network mode to "host"(default is "bridge" in docker) and it just worked.

version: '3'
services:
  plexamp:
    container_name: plexamp
    network_mode: host
    privileged: true
    image: ghcr.io/anatosun/plexamp:arm64v8
    devices:
      - /dev/snd:/dev/snd
    volumes:
      - ./config:/root/.local/share/Plexamp/Settings # replace that with the appropriate host binding
    environment:
      - PLEXAMP_CLAIM_TOKEN=claim-xxxxxxxxxxxxxxxxxx # get your claim at https://www.plex.tv/claim/
      - PLEXAMP_PLAYER_NAME=docker # replace this with your player name
    restart: always
almcken2 commented 6 months ago

I am getting the same error message. I tried switching to host with no luck. I am getting this error in the web console:

index.js:2 PlayQueue: Error playing media: this.app.audioController.setShuffled is not a function

almcken2 commented 6 months ago

Here is all of my code from the console:

PLAYER: Issuing play for music from server 21a5..... index.js:2 PlayQueue: Processing STOP index.js:2 PlayQueue: Processing send timelines in state stopped time undefined. index.js:2 ViewState: Progress NaN% (undefined ms) on item 21a59b.... index.js:2 ViewState: Trying to send directly. index.js:2 PlayQueue: Processing play media. index.js:2 ViewState: Server reports playback state ignore. index.js:2 PlayQueue: Saving to storage. index.js:2 PlayQueue: Processing PQ 21a59...... 1160 with 1 items (full: true, play after: true), selected 17596 at offset 0. index.js:2 PlayQueue: Looked at all the tracks and consecutive: false. index.js:2 PlayQueue: Error playing media: this.app.audioController.setShuffled is not a function index.js:2 PlayQueue: Processed play media with success false index.js:2 Cloud: [RecentPlays] Refreshing item index.js:2 Discovery: There was a change to Recent Plays.

GeekSquirrel commented 6 months ago

I am getting the same error message. I tried switching to host with no luck. I am getting this error in the web console:

index.js:2 PlayQueue: Error playing media: this.app.audioController.setShuffled is not a function

Try to disconnect and reconnect to the device in casting menu. Try to switch ouput device in Settings → Playback → Audio Output → Audio Device

almcken2 commented 6 months ago

I am getting the same error message. I tried switching to host with no luck. I am getting this error in the web console: index.js:2 PlayQueue: Error playing media: this.app.audioController.setShuffled is not a function

Try to disconnect and reconnect to the device in casting menu. Try to switch ouput device in Settings → Playback → Audio Output → Audio Device

Great, that worked, music is playing, but there is no sound. Here are some of the errors in the console:

Access to fetch at 'https://192-168-1-1.........6.plex.direct:32400/photo/:/transcode?width=1116&height=1116&url=%2Flibrary%2Fmetadata%2F440%2Fthumb%2F179999961&quality=90&format=jpeg&X-Plex-Token=Cs6xxxxps' from origin 'http://192.168.1.00:32500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. index.js:2

   GET https://192-168-1-192.00c86.plex.direct:32400/photo/:/transcode?width=1116&height=1116&url=%2Flibrary%2Fmetadata%2F49999%2Fthumb%2F19999661&quality=90&format=jpeg&X-Plex-Token=Csxxxps net::ERR_FAILED
GeekSquirrel commented 6 months ago

I am getting the same error message. I tried switching to host with no luck. I am getting this error in the web console: index.js:2 PlayQueue: Error playing media: this.app.audioController.setShuffled is not a function

Try to disconnect and reconnect to the device in casting menu. Try to switch ouput device in Settings → Playback → Audio Output → Audio Device

Great, that worked, music is playing, but there is no sound. Here are some of the errors in the console:

Access to fetch at 'https://192-168-1-1.........6.plex.direct:32400/photo/:/transcode?width=1116&height=1116&url=%2Flibrary%2Fmetadata%2F440%2Fthumb%2F179999961&quality=90&format=jpeg&X-Plex-Token=Cs6xxxxps' from origin 'http://192.168.1.00:32500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. index.js:2

   GET https://192-168-1-192.00c86.plex.direct:32400/photo/:/transcode?width=1116&height=1116&url=%2Flibrary%2Fmetadata%2F49999%2Fthumb%2F19999661&quality=90&format=jpeg&X-Plex-Token=Csxxxps net::ERR_FAILED

From my experience(I used a bare raspberry pi 4 and a 3B+ without DAC extension), there are two things that work not very well. First is the output is not so loud but at least it plays songs normally, and second is the audio device make a very slight abnormal sound like the sound card is broken. It happens randomly when your start a new connection to the headless device.

My solution is:

  1. Plug in a headphone or speaker to your headless device, usually a Pi.
  2. Open web interface for controlling headless device.
  3. Turn up volume of headless device in web interface.
  4. Make sure your music is playing even with no sound.
  5. Go to Audio Device settings in web interface. Just click every audio device randomly for a few times and wait for the normal playback.
  6. If it works but the playback is abormal again when you start a new connection to the headless device, just repeat step 1-5. It seems normal playback could be stable after a few times at least when you don't restart the container.
almcken2 commented 6 months ago

So wait, should the sound be coming out of my pi or my desktop (computer I'm accessing the web interface) ?

GeekSquirrel commented 6 months ago

So wait, should the sound be coming out of my pi or my desktop (computer I'm accessing the web interface) ?

Pi, you need a headphone or a speaker connected to your pi. Web interface or plexamp app both are for controlling the headless device, in another word, your pi. But the settings page(including Audio Device settings) for pi is only avaliable on web interface.

By the way, I updated the instruction in last reply for being more clear. Hope it can help you.