@0132 I am having the same issue. My application was connecting fine with MusicKit and has recently stopped working.
At first I suspected it was related to the JWT I generate in Ruby, but I ran some tests and managed to call and get a successful response from an Apple Music API endpoint that doesn’t require the user token.
I noticed the same const in the “error” query param, check your local/session storage (if applicable to your use case) and clear it all. By doing that, I got past the “failed to verify jwt” error and am now getting stuck on a 400 BadRequest on GetMusicUserToken (or something) API request from within MusicKit’s popup window.
I will try a few more things and update this thread if I’m successful, just in case someone else is experiencing the same issue.