So this a very annoying issue that wheneve you open spotify and try to play a track it says “Please disable offline Mode and try again”. Even though you’re online and every other website or service works, you’re still stuck at that error.
After searching the internet for a solution, you’ll get no solution or workaround to tackle the issue. Fortunately I could find a reason and solution for this issue. At last, the poor Spotify was right, although it could give us better details to pinpoint the problem. The thing is, it’s most likely your DNS servers are down and windows or whatever OS you’re using is utilizing it’s DNS resolver cache. This makes spotify app to be unable to get it’s servers IP addresses. the solution is that you should use another DNS resolver service like Google’s 184.108.40.206 or Quad9’s 220.127.116.11.
Another cause is Virtualbox’s network adapters. Once disabled, it seems the problem is gone. So try that as well.