[MAC] Spotify app crashes during launch when Offline Mode is enabled

Hi! The Spotify app (1.1.38.558.g4b100958) for macOS (10.15.5) crashes during launch when Offline Mode is enabled. This started happening on Jul 26, 2020.

 

To reproduce:

1. Install Spotify, launch the app, and sign in

2. Enable Offline Mode by going to Spotify menu > Offline Mode

3. Quit the app

4. Try to relaunch the app (it will crash immediately)

 

Specifically, if "~/Library/Application Support/Spotify/prefs" contains the line "app.force-offline-mode=true", the app crashes during launch. The error is "[0728/104943.830831⚠️system_snapshot_mac.cc(42)] sysctlbyname kern.nx: No such file or directory (2) Segmentation fault: 11".

 

More details:

- Removing the "app.force-offline-mode=true" line solves the issue

- Reinstalling Spotify (including removing all artifacts in "~/Library/Application Support/Spotify" and "~/Library/Caches/*spotify*") does not solve it

- Turning off "Local Files" does not solve it

- Changing the "Offline songs storage" location does not solve it

- Restarting my computer does not solve it

- Logging into a Spotify test account (provided by support) does not solve it

- The issue does not happen on any other devices (tested on an iPhone and iPad)

 

My current workaround is to use the following alias to launch Spotify: "alias open_spotify='sed -i "" "/app\.force-offline-mode=true/d" "~/Library/Application Support/Spotify/prefs" && /Applications/Spotify.app/Contents/MacOS/Spotify &'"

 

Possibly related:

https://community.spotify.com/t5/Desktop-Mac/SPOTIFY-NOT-WORKING-AFTER-UPDATING-TO-macOS-Catalina-10...

 

Is this a known issue? Can this be filed as a bug report with the engineering team?

Hey folks,

 

Thanks for reporting this to us!

 

We've just merged a few threads together to keep you all in the loop. 

 

We can confirm the right team is aware of this and they're looking into it. If you’re experiencing this issue, make sure to let us know by adding your +VOTE and posting the following info in a comment below:

In the meantime, we recommend you try the workaround shared by @thinkswan:

  1. Open the Terminal app
  2. Paste the following line: sed -i "" "/app\.force-offline-mode=true/d" ~/Library/Application\ Support/Spotify/prefs && /Applications/Spotify.app/Contents/MacOS/Spotify &
  3. Press enter

Let us know how you get on. We'll be keeping an eye out for your replies!

Status: Under investigation
0 Likes

Related Issues

Comments
Visitor

Hello,

 

I've never had any major issues with Spotify since I became a premium member in 2017. Suddenly, the app refuses to open no matter what I do. I've deleted and reinstalled, restarted my computer, and so on. It all started after I went into an offline session and quit the app. When I tried to reopen, the window briefly appears before automatically force quitting. I cannot get it to stay open for more than 1 second. For reference, I am running the desktop app on a 2018 Macbook Air on Catalina. I'd love to hear anybodies theories on the issue.

Newbie
same problem, macPro on Mohave
Rock Star 24
Rock Star 24

Hey @ragegage13 @seasmith3841 

 

Try a clean reinstall of Spotify to see if this fixes the problem. This is different from a regular reinstall because it also gets rid of any leftover corrupted Spotify files.

Advanced method: (requires digging through folders in Finder)
https://support.spotify.com/article/reinstallation-of-spotify/

Easy method:
Download this free Mac app uninstaller. It's super easy. Download button is on the right side. Do not click on any ads on the website.

http://freemacsoft.net/appcleaner/

When you open up the app, click the icon in the top right corner to switch to search mode and search for Spotify and it will automatically find and delete all files on your computer related to Spotify.

I use it all the time and it's a really great tool. If you ever decide to uninstall an app, the best way is to use this tool.

After that, download and reinstall Spotify.

Note: after you reinstall make sure to go into the Spotify settings and redo your preferences

Newbie

Plan: Premium

Operating System: 10.15.6 (macOS Catalina)

 

After upgrade to Catalina, the Spotify app instantly crashes after startup. The Spotify  installer also crashes after a while without any error message.

After searching in the forums, I found a number of related issues with Catalina.

The one linked below seemed to resolve my issue:

https://community.spotify.com/t5/Spotify-Answers/How-can-I-perform-a-clean-reinstall-of-the-app/ta-p...

 

However, after a reboot of the system, the Spotify app crashes again. I figured out that deleting the ~/Library/Application Support/Spotify folder allows me to restart the Spotify app. After the next system reboot however, I'm back to the crashing Spotify app.

 

Thanks for advice.

Glurz

Casual Listener

Hi @MattSuda, I appreciate your detailed answer, but a clean reinstall does not solve it.

Moderator
Moderator

Hey there @Glurz,

 

Thanks for reaching out about this in the Community!

 

Sorry to hear the app is causing you trouble - No worries, we're here to help 🙂

 

Could you try removing all lines from the hosts file that might be blocking Spotify - there's steps on how to do this in this Spotify Answer.

 

If that doesn't make a difference, it'd be great if you could let us know what Spotify version you are on and also if you set Spotify to offline mode before quitting the app, so we can have this looked into.

 

Keep us posted!

Visitor

been having this same problem lately with the spotify desktop app. i'd go on offline mode, forget to turn the app back online, close it, and the it'd refuse to open again. tried every method i can think of (clean reinstall, restart, firewall settings, etc.).

 

i found a workaround by deleting every single spotify-related file/folder off my mac, opening the spotify app on my phone (android samsung galaxy J7) and connecting it to the internet, and THEN reinstalling while keeping the app running. i don't understand it at all.

Casual Listener

Does the following workaround solve the problem for anyone?

1. Open the Terminal app
2. Paste the following line: sed -i "" "/app\.force-offline-mode=true/d" ~/Library/Application\ Support/Spotify/prefs && /Applications/Spotify.app/Contents/MacOS/Spotify &
3. Press enter

Newbie

Hi Xenia

 

The hosts file did not contain any entires that might interfere with Spotify.

But yes, your other guess was correct: the issue only occurs, when Spotify is in Offline-Mode. When I reboot the OS with Spotify being in Online-Mode, the process does not crash.

Is that a known issue?

 

My Spotify app has version 1.1.38.558.g4b100958.

 

Thanks

Glurz

Visitor

Awesome!

 

sed -i "" "/app\.force-offline-mode=true/d" ~/Library/Application\ Support/Spotify/prefs && /Applications/Spotify.app/Contents/MacOS/Spotify &

 

solved it for me