TIL: ShazamKit's SHManagedSession will hang indefinitely on macOS Sonoma when run on Intel and will fix itself after you ask Siri to “can you Shazam?”

The `await session.result()` never returns, until the pumps are primed by something that Siri or Shazam does for that manual request.

This was not an easy bug to find: thanks to @stroughtonsmith for all the help in tracking it down. Both Triode and Broadcasts will be better off now that we know what the hell is going on.

It looks like the issue with SHManagedSession is resolved in the 14.1 beta of macOS Sonoma.

Can’t reproduce the issue anymore so not going to submit a FB.

I spoke too soon! The SHManagedSession issue is back after an OS upgrade, restart, and 12 hours (a timeout?).

Something tells me this is not a local issue (despite it being Intel only) and more likely a server getting confused.

This is going to be a hard FB to write even though I already have a sample project. Too many preconditions!

This is the wildest of wild bugs.

SHManagedSession on macOS Sonoma awaits endlessly for a `result()` on both Apple Silicon & Intel if you have the lid shut and are playing through built-in speakers. If you are using audio via Display Port, AirPods, wired headphones, Shazam works fine.

My Sonoma beta machine doesn't use any of those. It worked yesterday when I tested Siri because I opened the lid to activate Siri. @stroughtonsmith was testing on a Mac mini with external speakers.

Now an FB…

@stroughtonsmith For you Apple folks following along, check out FB13212305 re: ShazamKit on macOS Sonoma.

Only 8 lines of text, but it took several days of hunting to write them!

Between this and FB13133786, I'm getting tapped out on bugs that are incredibly hard to find.

@chockenberry @stroughtonsmith
How do I lookup a feedback? I always thought they weren't publicly accessible.
@gmpalter @chockenberry @stroughtonsmith You can’t, but Chris also has Apple employees following him, who can look them up and potentially help.
@chockenberry @stroughtonsmith does macOS have the security feature where built in microphones are disabled when it's closed like the iPad with the Magic Keyboard does?

@mrdaveanderson @stroughtonsmith It may, but:

1) It's not documented.
2) It works when headphones with a microphone are attached.

@chockenberry @stroughtonsmith when the laptop is closed isn’t there also a physical disconnect now on the microphone. Maybe that’s causing the hang as it’s not actually there?