0

I am trying to create an NW.js app that uses Apple's MusicKitjs API.

MusicKit pops up an Auth window when you go to login via the standard "login to Apple Music" button. That looks like this in my app:

musickitjs auth

Eventually it makes a request to apple.com that fails, with two errors: "Unexpected end of JSON input" and a "Cross-Origin Read Blocking (CORB) blocked cross-origin response":

Apple music CORB error

NWjs has a page specifically addressing CORB issues here. I believe I have followed all of them. Here is a snippet of my manifest.json:

{
  "short_name": "NW.js React App",
  "name": "Create NW.js React App Sample",
  "nodejs":true,
  "node-remote":".apple.com",
  "chromium-args" : "--disable-features=CrossSiteDocumentBlockingAlways,CrossSiteDocumentBlockingIfIsolating",
}

As you can see, I also tried telling Chromium to disable CORB. But none of this is working. Thanks for any help!

Mads Hansen
  • 63,927
  • 12
  • 112
  • 147

1 Answers1

1

Try changing node-remote to a valid pattern like:

"node-remote":"https://*.apple.com/*"
Brandon
  • 38,310
  • 8
  • 82
  • 87