Answered

Sonos 5 sometimes plays the previous song in its buffer using AirPlay

  • 5 December 2023
  • 17 replies
  • 127 views

Hi folks,

So I recently got 2 Sonos 5s (3rd gen) and I am using them as stereo pair, both are updated to the latest software version (15.10 (build 76247142)). I mainly AirPlay from my iPhone and Apple Music into them and am also using the Apple Music app for playing music, volume control etc. 

The problem is when I am playing a playlist of songs, sometimes when I hit next to play the next song, my Sonos system plays a few seconds of the previously playing song (probably from its internal buffer) instead of the next song. If I wait a few seconds it starts playing the correct song though. This is a random behavior and it’s not happening every single time but I can easily reproduce it. I am not really sure if this is an AirPlay bug or it’s just Sonos but I am leaning towards Sonos. Any ideas why it’s happening and how to fix it maybe? 

icon

Best answer by Aringtone 6 December 2023, 19:09

View original

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

17 replies

As another Sonos user, I can’t say I’ve ever come across this issue, but will happily try to reproduce it here on my (stereo paired) Fives, if I can, albeit it will have to be tomorrow now, as it’s rather late where I am, but can I first ask a few questions to understand, in more detail, the precise steps needed to reproduce the issue. You mention this…

"The problem is when I am playing a playlist of songs, sometimes when I hit next to play the next song, my Sonos system plays a few seconds of the previously playing song” 

  • …is this whilst you’re partway through and playing the current song, that you skip to the next track in the playlist, or was the music paused?
  • Could the skip instruction just be taking a short while to process over the network and therefore the current playing track is taking a moment, or two, to actually skip to the next track (a skip instruction delay, perhaps due to wireless interference)?
  • How far are you into the playing track when you decide to skip, is it at the beginning, middle, or end of the playing track and when you do press to skip to next track, how long does it take (approx.) to switch to the next track?
  • Have you tried rebooting the Speaker's and your local router?
  • What WiFi channels and channel-width are you using, that’s assuming you’re using WiFi rather than a wireless SonosNet connection?

I will ‘happily’ try these things tomorrow, but just looking for a little more detail here first.

Hi Ken, 

Thanks for your response and willingness to help. Let me first try to answer your questions:

> is this whilst you’re partway through and playing the current song, that you skip to the next track in the playlist, or was the music paused?
it only happens when a song is playing and I play next regardless of where I am at time wise.

> Could the skip instruction just be taking a short while to process over the network and therefore the current playing track is taking a moment, or two, to actually skip to the next track (a skip instruction delay, perhaps due to wireless interference)?

It seems like it’s a delay or something. On the iPhone’s Apple Music app, it shows the next track but on Sonos it plays the previously playing song for a few seconds then it starts playing the actual song. It seems as if Apply Music goes out of sync with Sonos.

> How far are you into the playing track when you decide to skip, is it at the beginning, middle, or end of the playing track and when you do press to skip to next track, how long does it take (approx.) to switch to the next track?

it doesn’t seem to make any difference where I am at when hitting next. It continues playing the previous song for a while then switches to the next one. It appox. takes 3 ~ 5 seconds.

> Have you tried rebooting the Speaker's and your local router?

Yes. I tired rebooting both the speakers and the router. 

> What WiFi channels and channel-width are you using, that’s assuming you’re using WiFi rather than a wireless SonosNet connection?

I am using WiFi, and am connected directly to the router (no repeaters, etc.). It’s 5GHz (802.11ax) and I’m on channel 157, although the router is supposed to automatically switch to the best channel so I don’t have any options to tweak the channel through the admin panel. 


 

Those being said, I contacted Sonos support and sent them a couple of diagnostics while the issue was happening. Based on the logs they told me that it’s apparently a network issue (there was a bunch of packet drops in the logs) but I am still not 100% sure what that actual problem is. I have a super fast 1Gig internet and during the day my speed is usually around 500mbps. My ping time today to google.com and apple.com was perfect, 15ms average and with no packet drops whatsoever. The interesting thing is this is happening only when I use AirPlay with Apple Music app! but the thing is I use AirPlay to my Apple TV too and I never saw a problem like this before, so if there is a packet drop I should experience it on the Apple TV too. My router is provided to me by Comcast (XFinity) and it’s a ARRIS XB7 (Revision 10). They told me to contact my network provider (Comcast) and ask them for help but I’m really not sure if there well be able to help here since everything looks good. Also I tested AirPlaying from the Apple Music app on my Mac and while it happened there too the experience was better and instead of 3 ~ 5 mins delay the previous song kept playing for just a split second before switching to the next song! One last thing is, if I directly use Sonos app without airplay and try to play the same apply music playlist it works like a charm without an issue. 

 

all the best,

A

Okay, but note the Sonos App is not a music player it’s a ‘remote’ controller and so when using that App it works entirely differently to Airplay and the Apple Music App.

The Sonos App ‘remote’ causes the Music to play on the chosen speakers direct from the source. So in the case of Apple Music it streams from the iCloud server direct to the Sonos Speaker(s).

The difference with Airplay is your Apple Music App is the player and so it gets the chosen Music from the iCloud and it plays it through your mobile phone on the Sonos Speakers - so it’s likely the delay you’re seeing is along that connection somewhere. So it’s iCloud Server to WAN to LAN to iPhone to LAN and to the Speaker… the likelihood I would hazard a guess, is between your iPhone and across the LAN to the Five stereo pair.

However that’s a guess at this stage, but the above information here is just to help explain why you’re seeing a difference when playing music via the Sonos App compared to Airplaying to the speaker from the Apple Music App.

Do you know what the SNR levels are of both your Sonos Fives? See this link to assist you with that:

https://support.sonos.com/en-us/article/understanding-the-network-details-section-in-the-sonos-app

It would be helpful if you have an SNR level of 45dB, or above, as that would mean the wireless connection is excellent, so perhaps just check that to begin with. I will do some testing myself tomorrow too and report back, but it’s possible you have some wireless interference across your network aswell, or it maybe something running in the background on your mobile device?

You may find this link on ‘wireless interference’ helpful too, perhaps?

https://support.sonos.com/s/article/3286

A quick ‘initial’ test, just before I go off to bed shows things seem to be working okay here - I see/hear the Apple Music App change the track immediately when Airplaying to a Sonos Five stereo pair (called ‘Fireplace’ in my Sonos system) .. not currently seeing any noticeable delay, but it is just a first test.

Here’s an animation ‘extract’ as I recorded the test, changing/skipping the track at around the 5s mark on each track.

Like you, I have a 1Gig internet connection too and get around 500-550MB/s over a wireless link so these things are perhaps a fair comparison, except I did this first test with an iPad. I’ll try with an iPhone tomorrow.

SNR levels on my speakers are showing as 63dB and 60dB. 

 

Thanks for through explanation. The SNR values actually look great:

Five(Left): 57 dB
Five(Right): 60 dB

If not tried already, I would maybe reboot the router, speakers and the mobile device too and then see if that makes any difference. Ensure there’s not anything else wireless in close proximity to the router and check there isn’t anything else running on the mobile device besides the Apple Music App.

I tend to switch off these services on an iPhone when testing too:

  1. ‘Private WiFi Address’ in the mobile network connection properties.
  2. WiFi Calling
  3. Switch off Mobile Data (just while testing only) to ensure the mobile uses the local WiFi connection. 
  4. Switch off Background App Refresh.
  5. Disable Security Software.. eg VPN Client, Firewall, Anti-Virus etc.

Have you looked into the PING times and packet drops between the music source and the SONOS players? And from the controlling device and the SONOS players?

There are some rude and undocumented diagnostics available in the players. Go to http://[IP address of a player]:1400/support/review to display the diagnostics. If your players are very modern, the Network Matrix at the bottom of the list will be mostly unpopulated and nearly useless. This is a shame because older units will populate this view and red cells are attracting your attention with respect to very likely wireless issues. There is some very raw data available for each player in /proc/auth_rincon/status and /sbin/ifconfig regarding errors and dropped packets. (click on the links) I don’t find the data to be terribly useful, but it’s there for your enjoyment. I don’t know when the error count becomes significant. My own wireless situation can be grim. There is a medical facility next door and in some locations around the house I can log 70 access points. The error counts can sometimes be in the 100’s of thousands and I don’t usually notice any issues, however, once in a while … .

Raw Internet speed and network quality are not solidly linked. Consider a fine sports car, capable of very high speed on the open road, strangled in city traffic. You could have some local interference for one or more of your local wireless clients.

At this point we are not sure if your players are lagging or if the controller commands are not reaching the players.

 

One last thing is, if I directly use Sonos app without airplay and try to play the same apply music playlist it works like a charm without an issue. 

 

This suggests a controller communication issue.

Are you Grouping players? The player that is used to build a Group is the “Coordinator” for the Group. All network traffic for the Group passes through that player. If the Coordinator is struggling with its connectivity, all members of the Group will suffer. Maybe not critical here, but for stereo pairs, the left player is their Coordinator. When you open a controller it will “Associate” with a player. You have no control over this association. Imagine the potential grief if the Associated player is struggling with player, or worse, Group Coordinator communication. Go to Settings → System → About My System to discover the Associated Product.

@buzz thanks for the response,

Have you looked into the PING times and packet drops between the music source and the SONOS players? And from the controlling device and the SONOS players?

I checked the ping times between my mac (not the playing source but really close) to both speakers and it’s fairly steady < 10ms most of the times. 

 

Regarding the grouping I just have these Sonos 5s and no other Sonos speaker. They are just stereo paired and actually close to each other (almost 2m apart). 

 

Regarding the controller communication issue, I am not sure if I follow here, if my understanding is correct and the controller is the Sonos app on my iPhone, when I directly play from the Sonos app (aka controller?) without using AirPlay it works perfectly fine. The problem is when I AirPlay from my iPhone to the Sonos system. 

 

What actually baffles me here is if there is a problem with my local network how come AirPlay works perfectly find with my Apple TV? The Apple TV is on the same WiFi and all. The only thing that come to mind is probably the implementation of AirPlay protocol is different in Sonos compared to Apple TV and I think it’s probably an issue with Sonos but also it seems that no one else is experiencing it! It’s really weird. 

Are you sending music from an AppleTV box to SONOS? If so, this is a different connection than sending from your phone.

The SONOS controller is not playing music. Music is fetched directly from the source by the players. You can shut the controller down and the music will continue. If you are sending audio directly from the phone via AirPlay, then the phone wireless connectivity is a possible trouble point.

If the controller is struggling with its connectivity, command execution can be slow. The players have a generous cache. If the connection is lost, music might continue till the end of track. 

Are you sending music from an AppleTV box to SONOS? 

No this is not the case. I am just trying to compare AirPlay-ing from my iPhone to Apple TV and Sonos. My question is, if network is the culprit here (because of latency, packet loss or anything else) how come AirPlaying from iPhone into Apple TV has no problem? The network is exactly the same! This leads me to believe there is something wrong with Sonos itself rather than any network issues. 

Apologies, but the network is not the same. The two devices may reside on the same network, but there is no guaranty that packet delivery is the same between them both. It’s entirely possible that one is affected by wifi interference , and the other not, even when relatively close, or for that matter, a duplicate IP address issue might be affecting one, and not the other. 

The other difference here too @Aringtone is when you AirPlay from your phone to another Apple device like an Apple TV or a HomePod speaker, a cloud based source, such as Apple Music, is not sent via the phone on that occasion - because it’s another Apple product it bypasses the phone and goes direct  from the cloud to your Apple TV - Apple only do that though when the receiving device is another Apple product. So in that instance it works like the Sonos App and Sonos products. I hope that helps and makes sense.

It’s also why I ‘think’ the issue lies somewhere between your iPhone and your Sonos Speaker including the connection in-between. The first thing here though is to definitely look at the mobile device. No matter what, I think it’s perhaps worth starting there, but that’s after rebooting the router, speakers and the mobile itself.

Just to say I haven’t done any further testing here yet as I got side-tracked by the Wife to do some jobs, but when I get a chance I’ll give things another try here too.

@Aringtone 

Well I’ve tried/tested things here with iPad, iPhone XR and just very briefly with my Wife’s iPhone SE and not seeing any issues whilst AirPlaying to the Five stereo pair here called Fireplace - the tracks in a playlist always skip quickly on each of our devices without any noticeable delay.

I did a quick video taken from the iPhone XR which is attached - again for the video, it shows me skipping the tracks forward after approx. 4/5 seconds of playback - that was done just as a demonstration of the responsiveness.

The music always changes fine on the Fives. It’s almost instant. The streaming playlist I used is called "Pop in Spatial Audio” for the video demo attached - I picked that as it shows as lossless in the AM native App.

All I can say is it seems to be working okay - so my thoughts are that the issue is perhaps something local. I would maybe try with a different iOS device (if you have one available)… I’m hoping though that a reboot of your router, speakers and mobile device might resolve the issue for you.🤞

@Aringtone Install a network snooper on your phone and check PING times, especially to the SONOS players. 

@Aringtone 
The Wife and I have popped over to our Daughters Home at the moment and using Airplay/Apple Music on their WiFi network, I grouped together their Sonos Five with an Era 300 and a stereo pair of Sonos Ones and they are working okay too for skipping tracks on a randomly chosen Christmas Playlist. 

The tracks skip fine, even across the Sonos ‘group’ …and their ISP is perhaps not the best I’ve seen.

Their download/upload speed over WiFi according to Ookla’s Speedtest App is 66MB/s and 20MB/s so it’s clear the WAN link is likely not the issue in this instance, but my thoughts are that it’s something on the Home network, or mobile device, so I would perhaps concentrate on those things.

@Ken_Griffiths,

 

Thanks for all the tests and help I really appreciate it. So I was able to reproduce the issue with my LG TV that supports AirPlay! Same thing happened there too and as you said Apple devices get special treatment! So at the very least now I know that my Sonos speakers don’t have any problems and the problem is definitely somewhere in my network! It could also be my router maybe!  I will dig further and report back with my findings.

 

All the best and thanks again for the help.