Posts

Post not yet marked as solved
6 Replies
2.3k Views
I'm very excited to hear that Apple will be supporting a javascript version of their library. So excited, that I've already tried to create a test integration but I have run into a couple of issues. To begin with, it seems like the meta tag integration is able to initialize the declarative markup but MusicKit.configure does not. With the meta tags in place, I'm able to initiate an Apple Music OAuth screen and login (via Two Step) but the final screen presents the following error:Problem ConnectingThere may be a network issue.Try AgainIn addition, the URL shows the following parameter:error=ERROR_FAILED_TO_VERIFY_JWTHowever, I have been able to successfully call the API with the token I generated and I've made sure to create a fresh one in my authentication attempts. For example:{"data":[{"id":"203709340","type":"songs","href":"/v1/catalog/us/songs/203709340","attributes":{"previews":[{"url":"https://audio-ssl.itunes.apple.com/apple-assets-us-std-000001/AudioPreview71/v4/ab/b3/48/abb34824-1510-708e-57d7-870206be5ba2/mzaf_8515316732595919510.plus.aac.p.m4a"}],"artwork":{"width":1500,"height":1500,"url":"https://is4-ssl.mzstatic.com/image/thumb/Music5/v4/5d/fa/37/5dfa370a-76a1-fba9-1768-23d2d73ab437/source/{w}x{h}bb.jpeg","bgColor":"321511","textColor1":"faf9f4","textColor2":"eee2ca","textColor3":"d2cbc6","textColor4":"c8b9a5"},"artistName":"Bruce Springsteen","url":"https://itunes.apple.com/us/album/dancing-in-the-dark/203708420?i=203709340","discNumber":1,"genreNames":["Rock","Music","Hard Rock","Arena Rock","Rock & Roll","Pop","Pop/Rock","Singer/Songwriter"],"durationInMillis":245298,"releaseDate":"1984-05-04","name":"Dancing in the Dark","isrc":"USSM18400416","albumName":"Born in the U.S.A.","playParams":{"id":"203709340","kind":"song"},"trackNumber":11,"composerName":"Bruce Springsteen"},"relationships":{"albums":{"data":[{"id":"203708420","type":"albums","href":"/v1/catalog/us/albums/203708420"}],"href":"/v1/catalog/us/songs/203709340/albums"},"artists":{"data":[{"id":"178834","type":"artists","href":"/v1/catalog/us/artists/178834"}],"href":"/v1/catalog/us/songs/203709340/artists"}}}]}Looking forward to a resolution to this issue so I can begin hacking.Thanks!
Posted
by leemartin.
Last updated
.
Post not yet marked as solved
1 Replies
419 Views
I built a player demo yesterday which I logged into and it worked great:https://s.codepen.io/leemartin/debug/bKEeZLFlash forward to today and the console is showing the following error:Uncaught SyntaxError: Invalid regular expression: /(?:^|;\s*)Ag/zlbh4X32PLS+19Sv+ZlRv1OV8zxQZIMvaZ280bApwe9ljw+Xg+7TTwGiV3ZzcvWYogiEdYX+fSiRLWUiEi++IeqXZtkP9hUmg8B2AXlrWBOaoUfgu9wjGXJru7gFVpeoU6T2ZyALhaRcesnDVkznluIjiGTPta3ws3IQMYrBNzcAMiz5YngE4hn+P4Tci+domaZcK71jmC6l3yrGo2eiQvDy+aA6m/9/y6mdZRIWJsflK1A==.s=([^;]*)/: Nothing to repeat at new RegExp (<anonymous>) at Object.t.getCookie (musickit.js:13) at StoreKit._migrateStorageItem (musickit.js:13) at StoreKit._getStorageItem (musickit.js:13) at StoreKit.get [as storefrontCountryCode] (musickit.js:13) at new StoreKit (musickit.js:13) at new MusicKitInstance (musickit.js:13) at configure (musickit.js:13) at HTMLDocument.<anonymous> (musickit.js:13) t.getCookie @ musickit.js:13 StoreKit._migrateStorageItem @ musickit.js:13 StoreKit._getStorageItem @ musickit.js:13 get @ musickit.js:13 StoreKit @ musickit.js:13 MusicKitInstance @ musickit.js:13 configure @ musickit.js:13 (anonymous) @ musickit.js:13It looks like MusicKit is having trouble pulling a previously created cookie.The website works fine when using a fresh incognito browser session.
Posted
by leemartin.
Last updated
.