<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SpotifyAppRemote Disconnects After Idle Despite Valid Access Token in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/SpotifyAppRemote-Disconnects-After-Idle-Despite-Valid-Access/m-p/6949155#M17778</link>
    <description>&lt;P&gt;I'm using Spotify playback in my iOS app.&lt;BR /&gt;&lt;BR /&gt;I'm using the Spotify iOS SDK, following the pattern shown in NowPlayingView. Everything works correctly at first:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Authorization flow completes&lt;/LI&gt;&lt;LI&gt;Remote playback starts via SPTAppRemote&lt;/LI&gt;&lt;LI&gt;App correctly receives playback state and metadata&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":lady_beetle:"&gt;🐞&lt;/span&gt;Problem:&lt;BR /&gt;After I pause playback, if I wait a few seconds, I consistently receive a disconnection callback from the SDK:&lt;BR /&gt;func appRemote(_ appRemote: SPTAppRemote, didDisconnectWithError error: Error)&lt;/P&gt;&lt;P&gt;This happens even while the app is fully active and foregrounded — not backgrounded, killed, or suspended.&lt;/P&gt;&lt;P&gt;Here is the actual debug output:&lt;BR /&gt;[SpotifyManager] &lt;span class="lia-unicode-emoji" title=":red_circle:"&gt;🔴&lt;/span&gt; appRemote disconnected with error:&lt;BR /&gt;• Description: Connection terminated.&lt;BR /&gt;• Code: -1002&lt;BR /&gt;• Domain: com.spotify.app-remote&lt;BR /&gt;• Failure Reason: The Spotify app might have been suspended.&lt;BR /&gt;• Recovery Suggestion: Try to reconnect.&lt;BR /&gt;• Underlying Error: End of stream.&lt;BR /&gt;• Underlying Failure Reason: One of the streams has reached the end.&lt;BR /&gt;• Underlying Recovery Suggestion: Reconnect to the Spotify app.&lt;/P&gt;&lt;P&gt;What I’ve Verified:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The Spotify app is open and active (not backgrounded or closed)&lt;/LI&gt;&lt;LI&gt;My app is also in foreground&lt;/LI&gt;&lt;LI&gt;Network is stable, no major background tasks running&lt;/LI&gt;&lt;LI&gt;I am not calling disconnect() manually&lt;/LI&gt;&lt;LI&gt;Valid Access Token&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":collision:"&gt;💥&lt;/span&gt;Impact&lt;BR /&gt;After this disconnection, I cannot control playback anymore.&lt;/P&gt;&lt;P&gt;To restore control, the user must go through the full authorisation and reconnection flow again, which results in a disrupted and unintuitive user experience.&lt;/P&gt;&lt;P&gt;Please let us know:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is there a recommended way to prevent this disconnection after pause?&lt;/LI&gt;&lt;LI&gt;How can we recover control without forcing full re-authentication?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This issue is blocking us from delivering a stable and seamless playback experience to users.&lt;/P&gt;&lt;P&gt;Any clarification or workaround would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 06 May 2025 10:05:53 GMT</pubDate>
    <dc:creator>NewTunes</dc:creator>
    <dc:date>2025-05-06T10:05:53Z</dc:date>
    <item>
      <title>SpotifyAppRemote Disconnects After Idle Despite Valid Access Token</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/SpotifyAppRemote-Disconnects-After-Idle-Despite-Valid-Access/m-p/6949155#M17778</link>
      <description>&lt;P&gt;I'm using Spotify playback in my iOS app.&lt;BR /&gt;&lt;BR /&gt;I'm using the Spotify iOS SDK, following the pattern shown in NowPlayingView. Everything works correctly at first:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Authorization flow completes&lt;/LI&gt;&lt;LI&gt;Remote playback starts via SPTAppRemote&lt;/LI&gt;&lt;LI&gt;App correctly receives playback state and metadata&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":lady_beetle:"&gt;🐞&lt;/span&gt;Problem:&lt;BR /&gt;After I pause playback, if I wait a few seconds, I consistently receive a disconnection callback from the SDK:&lt;BR /&gt;func appRemote(_ appRemote: SPTAppRemote, didDisconnectWithError error: Error)&lt;/P&gt;&lt;P&gt;This happens even while the app is fully active and foregrounded — not backgrounded, killed, or suspended.&lt;/P&gt;&lt;P&gt;Here is the actual debug output:&lt;BR /&gt;[SpotifyManager] &lt;span class="lia-unicode-emoji" title=":red_circle:"&gt;🔴&lt;/span&gt; appRemote disconnected with error:&lt;BR /&gt;• Description: Connection terminated.&lt;BR /&gt;• Code: -1002&lt;BR /&gt;• Domain: com.spotify.app-remote&lt;BR /&gt;• Failure Reason: The Spotify app might have been suspended.&lt;BR /&gt;• Recovery Suggestion: Try to reconnect.&lt;BR /&gt;• Underlying Error: End of stream.&lt;BR /&gt;• Underlying Failure Reason: One of the streams has reached the end.&lt;BR /&gt;• Underlying Recovery Suggestion: Reconnect to the Spotify app.&lt;/P&gt;&lt;P&gt;What I’ve Verified:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The Spotify app is open and active (not backgrounded or closed)&lt;/LI&gt;&lt;LI&gt;My app is also in foreground&lt;/LI&gt;&lt;LI&gt;Network is stable, no major background tasks running&lt;/LI&gt;&lt;LI&gt;I am not calling disconnect() manually&lt;/LI&gt;&lt;LI&gt;Valid Access Token&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":collision:"&gt;💥&lt;/span&gt;Impact&lt;BR /&gt;After this disconnection, I cannot control playback anymore.&lt;/P&gt;&lt;P&gt;To restore control, the user must go through the full authorisation and reconnection flow again, which results in a disrupted and unintuitive user experience.&lt;/P&gt;&lt;P&gt;Please let us know:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is there a recommended way to prevent this disconnection after pause?&lt;/LI&gt;&lt;LI&gt;How can we recover control without forcing full re-authentication?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This issue is blocking us from delivering a stable and seamless playback experience to users.&lt;/P&gt;&lt;P&gt;Any clarification or workaround would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 10:05:53 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/SpotifyAppRemote-Disconnects-After-Idle-Despite-Valid-Access/m-p/6949155#M17778</guid>
      <dc:creator>NewTunes</dc:creator>
      <dc:date>2025-05-06T10:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: SpotifyAppRemote Disconnects After Idle Despite Valid Access Token</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/SpotifyAppRemote-Disconnects-After-Idle-Despite-Valid-Access/m-p/7021586#M18250</link>
      <description>&lt;P&gt;Having the exact same issue with my app. It's a really poor implementation on Spotify's part IMO. The SDK should have an option to make your app "another device" or something so you can control playback from it. For example, when I have spotify playing through my phone, I can open the spotify app up on my computer and hit "next track" and my phone will stay in sync. If you could register your app as another "device" like this, it could just be in sync with everything else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm going to test and see if a "heartbeat" play/pause will keep it active - will report back.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 23:36:25 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/SpotifyAppRemote-Disconnects-After-Idle-Despite-Valid-Access/m-p/7021586#M18250</guid>
      <dc:creator>mattboy</dc:creator>
      <dc:date>2025-06-24T23:36:25Z</dc:date>
    </item>
  </channel>
</rss>

