YouTube Music 'NaN:NaN' error in Safari on Mac troubles many (workarounds inside)

YouTube Music is Google’s own music service. It uses the YouTube platform as a base to offer a complete catalog of thousands of songs.

YouTube Music differs from other music services because it also includes videos. The service is available for free, but you can pay a monthly subscription to remove ads and gain more features.

YouTube Music users on mobile devices can access the service through dedicated apps. Meanwhile, users on desktop computers can access via a web browser.

However, currently YouTube Music users are experiencing an issue in Safari (Mac web browser) where they are unable to play songs and receive an ‘NaN:NaN’ error message.

YouTube Music ‘NaN:NaN’ error in Safari (Mac)

According to multiple reports, the ‘NaN:NaN’ error message is preventing YouTube Music users from enjoying their songs and playlists.


YouTube music is not playing … keeps going in circles

Hi – for the last few days my Youtube music doesn’t want to play any songs. It just goes in circles thinking … restarted computer, checked internet, updated software,
I am not using the app as I try to find the app on the App Store and doesn’t show up. I use YouTube on Safari.

The issue seems to only affect YouTube Music, not the base YouTube platform.

unable to play music on Mac in Safari

I’m on Mac OS 12.1 and as of yesterday I’m not able to play music on YouTube Music. Works just fine on plain YouTube. And works in other browsers. But in Safari if I press play on a playlist I just get the spinning wheel. Have tried resetting a couple times but no luck. Anyone else?

It’s a JavaScript bug

According to a Google product expert, the issue is related to JavaScript errors. So, the most advisable thing is to send feedback to developers so that they can address the problem as quickly as possible.

According to a Google search, NaN errors are Javascript errors, so this is a bug. Please report it to the developers by clicking your picture at the top right of the YouTube Music website you’re using, then Send Feedback. They won’t reply, but they read all the feedback they receive.

A couple of workarounds

There are a couple of workarounds that reportedly help mitigate the issue. The first is for those who want to continue using YouTube Music on Safari, and consists of deleting Safari cache/cookies and removing all the website data.

It happened to me two days ago, but just 2 minutes ago I followed this instructions.
Delete Safari cache and cookies (Mac)
Click Safari again, from the top menu bar, and select Preferences.
In the Preferences window, click on the Privacy tab, and select Manage website data.
Then click Remove All.

But, It’s worth pointing out that the workaround is only temporary, since the issue will appear again. So, you will have to repeat the same process each time it occurs.


The other workaround is basically to use Google Chrome for Mac (macOS) where YouTube Music reportedly works correctly (Firefox also experiences similar issues to Safari).


We will update this story once new developments on the matter emerge.

PiunikaWeb started as purely an investigative tech journalism website with main focus on ‘breaking’ or ‘exclusive’ news. In no time, our stories got picked up by the likes of Forbes, Foxnews, Gizmodo, TechCrunch, Engadget, The Verge, Macrumors, and many others. Want to know more about us? Head here.

Want to work for PiunikaWeb and enjoy best-in-industry compensation & benefits? You'll be glad to know we're hiring experienced candidates.

Jean Leon

A tech enthusiast since ever. I like to always be up to date on the latest news in the industry and write about it. Twitter: @jean_ERdC