aonez / Keka

The macOS & iOS file archiver
https://www.keka.io
4.87k stars 241 forks source link

Error 13 when uncompressing large rar files on Mojave. Frequent issue since OS update last week! #567

Open CubeDroid opened 4 years ago

CubeDroid commented 4 years ago

Configuration Keka version: 1.1.29 (3468) latest macOS version: Mojave 10.14.6

Describe the bug Since updating my macOS last week from High Sierra to Mojave, Keka is now frequently failing to extract rar files. Worse offenders are larger files. Keka always fails with error 13 when trying to uncompress larger files. I sometimes repeatedly use Keka after failures to get by but currently I have a large 11.5GB file not extracting at all (it's NOT the file at fault!). Keka never fails in the same place, so some results are 5.5GB and some are shorter or longer; different stages in the process basically.

I have tried uncompressing this large rar file on 2 separate HDDS and my local Mac drive, so 3 locations in total with no other apps running. All drives have sufficient free space and my 2017 iMac has 64GB RAM!

Please note: using the command in Terminal successfully extracts the file! So, the issue is with the application itself.

To Reproduce Steps to reproduce the behavior: Frequently try to unrar large files on Mojave, basically!

Expected behavior Failing with error code 13 at different stages in the process of uncompressing files. Not all files but typically larger ones.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Since updating my macOS last week from High Sierra to Mojave, Keka is now frequently failing to extract rar files. Worse offenders are larger files, but I suppose that's because Keka is being used for a longer period increasing the possibility of failing? I have currently uncompressed a 12 part image to make one large final 11.5GB file to uncompress. Keka always fails with error 13 when trying to uncompress this file. It never fails in the same place, so some results are 5.5GB and some are shorter or longer; different stages in the process basically.

I cannot see an open issue similar to this, yet bug report #362 seems to be the same. When reading that it mentions Mojave and APFS file format - though to be clear, I have tried uncompressing this rar file on 2 separate HDDS and my local Mac drive, so 3 locations in total with no other apps running. All drives have sufficient free space and my 2017 iMac has 64GB RAM!

Pleas note: using the command in Terminal successfully extracts the file! So, the issue is with the application itself.

aonez commented 4 years ago

Thanks for the feedback! This is clearly #362 again. Still unable to find the trigger here... I’ll create a custom version in a few hours to share with you, but I’m not very confident it will fix the issue :(

CubeDroid commented 4 years ago

Good luck!

And thank you for the prompt reply!

Cheers

aonez commented 4 years ago

By the way @CubeDroid are you able to share that parted RAR? Maybe the link via mail to info@keka.io?

aonez commented 4 years ago

Here the test build:

https://github.com/aonez/Keka/releases/download/dev-test-builds/Keka-RAR-workdir.7z

Just try it if and when you can. I doubt it will fix the issue but need to try everything...

aonez commented 4 years ago

And another build, with another test:

https://github.com/aonez/Keka/releases/download/dev-test-builds/Keka-RAR-1014.7z

CubeDroid commented 4 years ago

Hi

My network speed:

[cid:image001.png@01D63C0C.D6A1F260]

Uploads kill me, to the point where I tend to have to use HandBrake to greatly compress video uploads to YouTube. There’s no way I can upload one 11.5GB rar file! Not just the time it would take but if it fails partway and having to start over! Sorry

Both your Keka files fail to extract this large 11.5GB rar (though works in Terminal). I also tried on a ‘smaller’ file of 378MB. Keka worked the first time, but I when I tried the same file again I get this (but only when the ‘Extraction complete’ window is open):

[cid:image002.png@01D63C0C.D6A1F260]

[cid:image003.png@01D63C0C.D6A1F260]

[cid:image004.png@01D63C0C.D6A1F260]

However, I discovered this happened a few times:

  1. When I extract the file it works
  2. When I extract the same file again whilst this message window is open, it fails:

[cid:image005.png@01D63C0C.D6A1F260]

If I wait for the message window to disappear it works fine. UPDATE: I can’t replicate this every time now, despite it doing it the first 3 times?!

But it’s just done it again when the ‘Extraction Complete’ box is visible!! [cid:image006.png@01D63C0C.D6A1F260]

I’ve found another single rar file that fails like my large one does. This is ‘only’ 755MB but fails in the same way, resulting in a partial extraction: [cid:image007.png@01D63C0C.D6A1F260]

It’s basically a collection of WAV files for music production (one shots and loops). There are no executable files inside it’; just lots of WAV files in a handful of folders. Not sure what you would garner from me trying to submit this file to you? I use Keka almost every day but it’s become impossible since upgrading my macOS from High Sierra to Mojave which I had to do to install the latest Logic Pro X 10.5 version!

Why does Terminal work and not Keka? Can you not employ the same/similar process inside your app?

Please let me know your thoughts!

Kind regards,

aonez commented 4 years ago

Thanks for the time @CubeDroid. Sadly none of the images are attached.

Not sure what you would garner from me trying to submit this file to you?

I want to reproduce the issue because I can't right now and we know you can with those files. I understand they're big files and you might be unable to share them for that, for privacy or whatever reason, don't worry about that.

Why does Terminal work and not Keka? Can you not employ the same/similar process inside your app?

It is in fact the same process. The problem here is with macOS sandboxing, it kills the extraction for some reason I can't understand yet.

CubeDroid commented 4 years ago

Is there any kind of logging files I can run to work out what is happening/not happening, either within Keka itself or a utility you could send to me to run in the background and capture the process? I could then send you the reports.

In the meantime I’ll try and find a smaller rar file. Also, I’m not sure if I mentioned this previously, with some of the failed extractions, perseverance often paid off by repeatedly trying, but it’s not always guaranteed and very frustrating! So, it’s not entirely black or white. Maybe the larger the file the higher the probability of failure?

Thanks

CubeDroid commented 4 years ago

Also, as mentioned previously, do you know why extracting the same rar again (or another rar file as I have just tested) whilst Keka's dialogue message 'Extraction complete' is still present from the first successful extraction, causes it to fail/crash, too?!

  1. Double-Click rar file for Keka to open/extract
  2. As soon as the message 'Extraction complete' appears, double-click the same rar (or another as if you were working down a list) and the process tends to fail/crash producing a Mac message: 'Keka quit unexpectedly' with 'Ignore', 'Report...', 'Reopen' buttons

I used to be able to run down several rar files opening them at the same time but now that's history!

CubeDroid commented 4 years ago

The 755MB rar file I have (with WAV files in previously mentioned) still fails to extract with Keka, but successfully extracted with 'Extractor.app' v1.5. It initially asked for permission to extract the file which I granted. Then it successfully extracted the file, first time with no issues!

aonez commented 4 years ago

2. soon as the message 'Extraction complete' appears, double-click the same rar (or another as if you were working down a list) and the process tends to fail/crash producing a Mac message: 'Keka quit unexpectedly' with 'Ignore', 'Report...', 'Reopen' buttons

This is a totally different issue. If Keka crashed you should find a crash report in the Console.app -> User Reports. If you have it there, please share so I can take a look at the crash.

Also, I’m not sure if I mentioned this previously, with some of the failed extractions, perseverance often paid off by repeatedly trying, but it’s not always guaranteed and very frustrating! So, it’s not entirely black or white. Maybe the larger the file the higher the probability of failure?

The problem of this issue is the inconsistency for reproducing it. That's the main reason I'm unable to fix it, it just appears some times, for some users, on some files. I know (discovered on #362) that it fails when the operating system (macOS) forces the end of the extraction process, most probably for a sandbox violation.

Is there any kind of logging files I can run to work out what is happening/not happening, either within Keka itself or a utility you could send to me to run in the background and capture the process?

You can enable logs in Keka in Help -> Debug. Enable both "Enable" and "Save" debug information. But most probably those logs will be useless since it's the OS that forces the process to end.

Thanks again for all the feedback @CubeDroid!

aonez commented 4 years ago

Another build with another test, in case you can try:

https://github.com/aonez/Keka/releases/download/dev-test-builds/Keka-HARDEX.7z

CubeDroid commented 4 years ago

Thanks for the new Keka (Version 1.1.30 (3471). This has actually resolved 2 of my 3 Mojave issues:

  1. Opening/extracting more than one rar file at a time [Tick]
  2. Opening the aforementioned 755MB rar file I was referring to (previously opened with extractor.app v1.5 but not Keka) [Tick]

Great! This leaves the 11GB file, which I tried twice with this version of Keka but still fails. Interestingly, extractor.app v1.5 didn't even try to open this file; error msg: 'Invalid format'.

So, I tried 'RAR Extractor Lite.app' v5.6.8 which does successfully extract the troublesome 11GB file?! Interesting to know what this app does, or doesn't do, different to Keka?

Thanks again

aonez commented 4 years ago

So, I tried 'RAR Extractor Lite.app' v5.6.8

This one from the App Store?

CubeDroid commented 4 years ago

I'm pretty sure it was from the App Store but it's been on my iMac a long time. i.e. I didn't just download it recently to try and resolve this problem. I bought Keka as a one-stop solution to avoid using multiple zip, rar, apps, etc., so never thought of trying it until my Mojave issues!

CubeDroid commented 4 years ago

Just an update: RAR Extractor Lite is from the App Store as I was just prompted to update to 5.6.9 which I did.

Obrservation: Keka (1.1.30 (3477)) fails to unpack an 800MB file in my 'Downloads' folder on my Mac. (Mojave 10.14.6, APFS)...

But, Keka successfully unpacks the SAME FILE when it's located on my external HDD (Mac OS Extended (Journaled)). So, the filesystem is playing some part?

gingerbeardman commented 4 years ago

How about the free https://github.com/BlackWolf/RAR-Archive-Utility/

Here is an unsigned 64-bit version: RAR-Archive Utility.app.zip

aonez commented 4 years ago

That one is not sandboxed and that is the main cause of the issue. Probably if you sandbox it will fail the same way.

By the way @gingerbeardman including the RAR binary is prohibited in the license if RARLAB does not grant you explicit permission, as per 3.b:

The software's unlicensed trial version may not be distributed inside of any other software package without written permission. The software must remain in the original unmodified installation file for download without any barrier and conditions to the user such as collecting fees for the download or making the download conditional on the user giving his contact data.

Just FYI. I've tried asking to bundle it into Keka with no luck.

gingerbeardman commented 4 years ago

In the past with an old app I made I couldn't bundle a utility, but the author was OK with my prompting the user to download at which point I downloaded the latest version for use by the app.

That may not work for RAR, but I thought it worth mentioning.

aonez commented 4 years ago

Again sandbox prohibits execution of binaries outside the bundle... Not even in the Container's Application Support folder. ☹️