Problem with quarantine of kindlegen

I’m not sure if this counts as a bug, but I thought I’d mention it here.

I’d been running the demo version of 2.3.1 on Mountain Lion 10.8.2 with no problems for a while. I bought/downloaded Scrivener from the Mac App Store yesterday (also 2.3.1), replacing the demo version, which seemed to cause .mobi compilation to break. The problem seemed to be with seeing/running kindlegen, but this had been fine before the new install. Here’s a typical error message I was getting:

Kindle document creation failed.
2012-10-04 16:35:20.656 Scrivener[428:203] *** NSTask: Task create for path
‘/Users/Paul/Downloads/KindleGen_Mac_i386_v2_5/kindlegen’ failed: 22, “Invalid argument”.
Terminating temporary process.

After poking around in the console logs, I found this:

10/4/12 4:40:55.000 PM kernel[0]: exec of
/Users/Paul/Downloads/KindleGen_Mac_i386_v2_5/kindlegen denied since it was quarantined by and not approved by Gatekeeper, qtn-flags was 0x00000002

I used the process described here to remove the quarantine flag from kindlegen: … plication/

Things seem to be okay now. I’m left slightly puzzled by how this wasn’t happening with the demo version, but only started with the paid version. And I’m surprised that other users haven’t seen something similar. This is also a very techie problem to fix.

This is a problem due to the sandboxing the Mac App Store requires, which is why you didn’t run into it with the demo downloaded from the website. Keith wrote up an article on it here which explains it and gives steps for getting around the error, though it sounds like you already figured out the fix. Hopefully this won’t remain an issue for long and we’ll get a KindleGen update that doesn’t set off all of Gatekeeper’s alarms!

Thanks also for purchasing Scrivener! Welcome aboard! :slight_smile:

Thanks, Jennifer. That all makes sense. I did try to search for references to the problem, but clearly missed the piece that Keith wrote.