I had this problem about a year ago. I have a BT Smart Hub router. My B2 and my Sonos devices were connected to my home network wirelessly. Although this worked for a couple of months, I began to get this message more and more often. Eventually, I was getting it all the time. The problem was specific to the B2. Sonos could still play music from my iTunes library (which was connected physically to the router) and via streaming from Spotify.
After contacting both Sonos and Brennan, my solution was to buy a Sonos Boost. The Boost is connected physically to the router. It then creates a separate wireless network which is used by the other Sonos devices.
https://www.sonos.com/en-gb/shop/boost.html
Since installing the Boost, the problem has not recurred.
I still don’t really know which component in my system was the root cause of the problem or why the setup worked for a couple of months before the problem appeared. It could have been the router, the B2, the Sonos system, or a combination. I found it very difficult to diagnose a problem which covered three different vendors all of whom thought that their device was not the cause of the problem. There may have been a simpler solution which avoided the need to buy yet another piece of kit, but I was happy to return to a working system.