SABnzbd doesn't extract passworded rar files with Unrar 5.80

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Starshadow
Newbie
Newbie
Posts: 14
Joined: August 14th, 2013, 12:23 pm

SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by Starshadow »

I'm running on Linux where Unrar is not bundled. After updating Unrar to 5.80, SABnzbd has not extracted any files from passworded rar files. The job completes without any error message, but says "Unpacked 0 files/folders in 0 seconds" in the Unpack status. My debug log shows SABnzbd always passing the -p- argument and never trying the password from passwords.txt. I downgraded back to 5.71 and everything works fine again. FYI the following log is from the latest develop branch, but the issue is the same in 2.3.9.

Code: Select all

2020-02-04 20:45:20,977::INFO::[postproc:371] Running unpack_magic on Open.Source.Software
2020-02-04 20:45:20,977::DEBUG::[newsunpack:2128] build_filelists(): joinables: []
2020-02-04 20:45:20,977::DEBUG::[newsunpack:2129] build_filelists(): zips: []
2020-02-04 20:45:20,977::DEBUG::[newsunpack:2130] build_filelists(): rars: ['/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar']
2020-02-04 20:45:20,977::DEBUG::[newsunpack:2131] build_filelists(): 7zips: []
2020-02-04 20:45:20,977::DEBUG::[newsunpack:2132] build_filelists(): ts: []
2020-02-04 20:45:20,978::INFO::[newsunpack:253] Unrar starting on /mnt/storage/incoming/SABnzbd/Open.Source.Software
2020-02-04 20:45:20,978::DEBUG::[newsunpack:477] Rar_sets: {'005-oss': ['/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar']}
2020-02-04 20:45:20,978::DEBUG::[newsunpack:495] DirectUnpacker still alive for Open.Source.Software: 01/01
2020-02-04 20:45:20,995::DEBUG::[directunpacker:284] DirectUnpack Unrar output 
UNRAR 5.80 freeware      Copyright (c) 1993-2019 Alexander Roshal

Incorrect password for /mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar
Total errors: 1

2020-02-04 20:45:21,402::DEBUG::[bpsmeter:241] bps: 4092121.969683617
2020-02-04 20:45:22,980::INFO::[newsunpack:520] Extracting rarfile /mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar (belonging to 005-oss) to /mnt/storage/downloads/PC/_UNPACK_Open.Source.Software.1
2020-02-04 20:45:22,980::DEBUG::[misc:722] Read these passwords from file: ['<the right password>']
2020-02-04 20:45:22,980::INFO::[misc:724] Read 1 passwords from file /home/<USERNAME>/.sabnzbd/passwords.txt
2020-02-04 20:45:22,980::DEBUG::[newsunpack:615] rar_extract(): Extractionpath: /mnt/storage/downloads/PC/_UNPACK_Open.Source.Software.1
2020-02-04 20:45:22,981::DEBUG::[newsunpack:656] Analyzing rar file ... RAR5 found
2020-02-04 20:45:22,981::DEBUG::[newsunpack:657] Running unrar ['/usr/bin/nice', '-n10', '/usr/bin/ionice', '-c2', '-n4', '/usr/bin/unrar', 'x', '-idp', '-o-', '-or', '-p-', '/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar', '/mnt/storage/downloads/PC/_UNPACK_Open.Source.Software.1/']
2020-02-04 20:45:23,017::DEBUG::[newsunpack:827] UNRAR output 
UNRAR 5.80 freeware      Copyright (c) 1993-2019 Alexander Roshal

Incorrect password for /mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar
Total errors: 1
2020-02-04 20:45:23,017::INFO::[newsunpack:831] Unpacked 0 files/folders in 0 seconds
2020-02-04 20:45:23,017::DEBUG::[newsunpack:541] rar_unpack(): Rars: ['/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar']
2020-02-04 20:45:23,017::DEBUG::[newsunpack:542] rar_unpack(): Newfiles: []
2020-02-04 20:45:23,017::INFO::[newsunpack:257] Unrar finished on /mnt/storage/incoming/SABnzbd/Open.Source.Software
2020-02-04 20:45:23,017::DEBUG::[newsunpack:2128] build_filelists(): joinables: []
2020-02-04 20:45:23,017::DEBUG::[newsunpack:2129] build_filelists(): zips: []
2020-02-04 20:45:23,017::DEBUG::[newsunpack:2130] build_filelists(): rars: ['/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar']
2020-02-04 20:45:23,018::DEBUG::[newsunpack:2131] build_filelists(): 7zips: []
2020-02-04 20:45:23,018::DEBUG::[newsunpack:2132] build_filelists(): ts: []
2020-02-04 20:45:23,018::DEBUG::[newsunpack:2128] build_filelists(): joinables: []
2020-02-04 20:45:23,018::DEBUG::[newsunpack:2129] build_filelists(): zips: []
2020-02-04 20:45:23,018::DEBUG::[newsunpack:2130] build_filelists(): rars: ['/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar']
2020-02-04 20:45:23,018::DEBUG::[newsunpack:2131] build_filelists(): 7zips: []
2020-02-04 20:45:23,018::DEBUG::[newsunpack:2132] build_filelists(): ts: []
2020-02-04 20:45:23,018::INFO::[newsunpack:253] Unrar starting on /mnt/storage/incoming/SABnzbd/Open.Source.Software
2020-02-04 20:45:23,018::DEBUG::[newsunpack:477] Rar_sets: {'005-oss': ['/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar']}
2020-02-04 20:45:23,018::INFO::[newsunpack:520] Extracting rarfile /mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar (belonging to 005-oss) to /mnt/storage/downloads/PC/_UNPACK_Open.Source.Software.1
2020-02-04 20:45:23,018::DEBUG::[misc:722] Read these passwords from file: ['<the right password>']
2020-02-04 20:45:23,018::INFO::[misc:724] Read 1 passwords from file /home/<USERNAME>/.sabnzbd/passwords.txt
2020-02-04 20:45:23,019::DEBUG::[newsunpack:615] rar_extract(): Extractionpath: /mnt/storage/downloads/PC/_UNPACK_Open.Source.Software.1
2020-02-04 20:45:23,019::DEBUG::[newsunpack:656] Analyzing rar file ... RAR5 found
2020-02-04 20:45:23,019::DEBUG::[newsunpack:657] Running unrar ['/usr/bin/nice', '-n10', '/usr/bin/ionice', '-c2', '-n4', '/usr/bin/unrar', 'x', '-idp', '-o-', '-or', '-p-', '/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar', '/mnt/storage/downloads/PC/_UNPACK_Open.Source.Software.1/']
2020-02-04 20:45:23,054::DEBUG::[newsunpack:827] UNRAR output 
UNRAR 5.80 freeware      Copyright (c) 1993-2019 Alexander Roshal

Incorrect password for /mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar
Total errors: 1
2020-02-04 20:45:23,054::INFO::[newsunpack:831] Unpacked 0 files/folders in 0 seconds
2020-02-04 20:45:23,054::DEBUG::[newsunpack:541] rar_unpack(): Rars: ['/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar']
2020-02-04 20:45:23,054::DEBUG::[newsunpack:542] rar_unpack(): Newfiles: []
2020-02-04 20:45:23,055::INFO::[newsunpack:257] Unrar finished on /mnt/storage/incoming/SABnzbd/Open.Source.Software
2020-02-04 20:45:23,055::DEBUG::[newsunpack:2128] build_filelists(): joinables: []
2020-02-04 20:45:23,055::DEBUG::[newsunpack:2129] build_filelists(): zips: []
2020-02-04 20:45:23,055::DEBUG::[newsunpack:2130] build_filelists(): rars: ['/mnt/storage/incoming/SABnzbd/Open.Source.Software/005-oss.rar']
2020-02-04 20:45:23,055::DEBUG::[newsunpack:2131] build_filelists(): 7zips: []
2020-02-04 20:45:23,055::DEBUG::[newsunpack:2132] build_filelists(): ts: []
2020-02-04 20:45:23,055::INFO::[postproc:373] Unpacked files []
2020-02-04 20:45:23,055::INFO::[postproc:378] Finished unpack_magic on Open.Source.Software

The 'Incorrect password' error message is different in 5.80 and I'm betting that's the cause of the issue.

Code: Select all

UNRAR 5.71 freeware      Copyright (c) 1993-2019 Alexander Roshal

The specified password is incorrect
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by sander »

On the CLI, with unrar 5.80, can you 'manually' unrar the passworded rar set?
Starshadow
Newbie
Newbie
Posts: 14
Joined: August 14th, 2013, 12:23 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by Starshadow »

Yes, manually unraring with the -p<password> argument works fine with 5.80.
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by sander »

I tried with unrar 5.90 beta 2, and I cannot reproduce
Starshadow
Newbie
Newbie
Posts: 14
Joined: August 14th, 2013, 12:23 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by Starshadow »

I tried 5.90 beta 1 (the highest I can find for linux right now) and I still have the same issue. The rar format version of the file may be a factor as well. SABnzbd does try the password for a RAR3 file using 5.80/5.90b1 and successfully extracts it. But any passworded RAR5 causes the issue.

Code: Select all

2020-02-05 16:13:35,601::DEBUG::[newsunpack:656] Analyzing rar file ... RAR3 found
2020-02-05 16:13:35,601::DEBUG::[newsunpack:657] Running unrar ['/usr/bin/nice', '-n10', '/usr/bin/ionice', '-c2', '-n4', '/usr/bin/unrar', 'x', '-idp', '-o-', '-or', '-p-', '/mnt/storage/incoming/SABnzbd/RAR3/rar3.rar', '/mnt/storage/downloads/PC/_UNPACK_RAR3.1/']
2020-02-05 16:13:35,635::DEBUG::[newsunpack:817] UNRAR output 
UNRAR 5.90 beta 1 freeware      Copyright (c) 1993-2020 Alexander Roshal

Checksum error in the encrypted file /mnt/storage/incoming/SABnzbd/RAR3/rar3.rar. Corrupt file or wrong password.
2020-02-05 16:13:35,636::DEBUG::[newsunpack:596] Trying unrar with password "<the right password>"
2020-02-05 16:13:35,636::DEBUG::[newsunpack:615] rar_extract(): Extractionpath: /mnt/storage/downloads/PC/_UNPACK_RAR3.1
2020-02-05 16:13:35,636::DEBUG::[newsunpack:656] Analyzing rar file ... RAR3 found
2020-02-05 16:13:35,636::DEBUG::[newsunpack:657] Running unrar ['/usr/bin/nice', '-n10', '/usr/bin/ionice', '-c2', '-n4', '/usr/bin/unrar', 'x', '-idp', '-o-', '-or', '-p<the right password>', '/mnt/storage/incoming/SABnzbd/RAR3/rar3.rar', '/mnt/storage/downloads/PC/_UNPACK_RAR3.1/']
This is newsunpack.py line 760:

Code: Select all

        elif 'The specified password is incorrect' in line or \
             ('ncrypted file' in line and (('CRC failed' in line) or ('Checksum error' in line))):
            # unrar 3.x: "Encrypted file: CRC failed in oLKQfrcNVivzdzSG22a2xo7t001.part1.rar (password incorrect ?)"
            # unrar 4.x: "CRC failed in the encrypted file oLKQfrcNVivzdzSG22a2xo7t001.part1.rar. Corrupt file or wrong password."
            # unrar 5.x: "Checksum error in the encrypted file oLKQfrcNVivzdzSG22a2xo7t001.part1.rar. Corrupt file or wrong password."
            # unrar 5.01: "The specified password is incorrect."
The message 'Incorrect password for ...' I'm seeing from Unrar >=5.80 for RAR5 files does not match any of those patterns and SABnzbd does not detect that the file is passworded.
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by sander »

reference NZB with passworded rar ('secret') here https://github.com/sanderjo/NZBs/blob/m ... 7D.nzb.nzb or https://raw.githubusercontent.com/sande ... 7D.nzb.nzb

Output below.

Can you share your NZB?

Code: Select all

2020-02-06 04:21:17,135::DEBUG::[directunpacker:365] Running unrar for DirectUnpack ['/usr/bin/unrar', 'x', '-vp', '-idp', '-o+', '-psecret', '/home/sander/Downloads/incomplete/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/home/sander/Downloads/complete/_UNPACK_reftestnzb-password-is-secret-ff17139db320/']
... directunpacker ... so different from you?

Code: Select all

2020-02-05 09:52:17,430::DEBUG::[newsunpack:827] UNRAR output 
UNRAR 5.90 beta 2 freeware      Copyright (c) 1993-2020 Alexander Roshal


Extracting from /home/sander/Downloads/incomplete/blabla-passworded/sometestfile-100MB.part1.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /home/sander/Downloads/incomplete/blabla-passworded/sometestfile-100MB.part2.rar

Incorrect password for sometestfile-100MB.bin
--
2020-02-06 04:21:18,175::DEBUG::[directunpacker:214] DirectUnpack Unrar output 
UNRAR 5.90 beta 2 freeware      Copyright (c) 1993-2020 Alexander Roshal


Extracting from /home/sander/Downloads/incomplete/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar

Extracting  /home/sander/Downloads/complete/_UNPACK_reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.bin
Insert disk with /home/sander/Downloads/incomplete/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar [C]ontinue, [Q]uit

Extracting from /home/sander/Downloads/incomplete/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar

--
2020-02-06 04:21:18,175::DEBUG::[directunpacker:284] DirectUnpack Unrar output
Starshadow
Newbie
Newbie
Posts: 14
Joined: August 14th, 2013, 12:23 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by Starshadow »

Your nzb as-is does get extracted, but if I remove the '{{secret}}' from the filename, and instead put 'secret' into my password file it does not. Please try that on your end. The directunpacker fails, and the normal newsunpack takes over and never uses the password from passwords.txt.

Code: Select all

2020-02-06 00:19:59,416::DEBUG::[directunpacker:365] Running unrar for DirectUnpack ['/usr/bin/nice', '-n10', '/usr/bin/ionice', '-c2', '-n4', '/usr/bin/unrar', 'x', '-vp', '-idp', '-o+', '-p-', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/downloads/PC/_UNPACK_reftestnzb-password-is-secret-ff17139db320/']
...snip...
2020-02-06 00:20:10,749::DEBUG::[directunpacker:284] DirectUnpack Unrar output 
UNRAR 5.90 beta 1 freeware      Copyright (c) 1993-2020 Alexander Roshal


Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar

Incorrect password for sometestfile-100MB.bin
Insert disk with /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar [C]ontinue, [Q]uit

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar

Incorrect password for sometestfile-100MB.bin
Insert disk with /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar [C]ontinue, [Q]uit

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar

Incorrect password for sometestfile-100MB.bin
Insert disk with /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar [C]ontinue, [Q]uit

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar

Incorrect password for sometestfile-100MB.bin
Insert disk with /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar [C]ontinue, [Q]uit

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar

Incorrect password for sometestfile-100MB.bin
Insert disk with /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar [C]ontinue, [Q]uit

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar

Incorrect password for sometestfile-100MB.bin
Insert disk with /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar [C]ontinue, [Q]uit

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar

Incorrect password for sometestfile-100MB.bin
Total errors: 7

2020-02-06 00:20:12,694::INFO::[newsunpack:520] Extracting rarfile /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar (belonging to sometestfile-100MB) to /mnt/storage/downloads/PC/_UNPACK_reftestnzb-password-is-secret-ff17139db320
2020-02-06 00:20:12,695::DEBUG::[misc:722] Read these passwords from file: ['<the right password>', 'secret']
2020-02-06 00:20:12,695::INFO::[misc:724] Read 2 passwords from file /home/<USERNAME>/.sabnzbd/passwords.txt
2020-02-06 00:20:12,695::DEBUG::[newsunpack:615] rar_extract(): Extractionpath: /mnt/storage/downloads/PC/_UNPACK_reftestnzb-password-is-secret-ff17139db320
2020-02-06 00:20:12,695::DEBUG::[newsunpack:656] Analyzing rar file ... RAR5 found
2020-02-06 00:20:12,695::DEBUG::[newsunpack:657] Running unrar ['/usr/bin/nice', '-n10', '/usr/bin/ionice', '-c2', '-n4', '/usr/bin/unrar', 'x', '-idp', '-o-', '-or', '-p-', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/downloads/PC/_UNPACK_reftestnzb-password-is-secret-ff17139db320/']
2020-02-06 00:20:12,763::DEBUG::[newsunpack:827] UNRAR output 
UNRAR 5.90 beta 1 freeware      Copyright (c) 1993-2020 Alexander Roshal


Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar

Incorrect password for sometestfile-100MB.bin
Total errors: 7
2020-02-06 00:20:12,763::INFO::[newsunpack:831] Unpacked 0 files/folders in 0 seconds
2020-02-06 00:20:12,763::DEBUG::[newsunpack:541] rar_unpack(): Rars: ['/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar']
2020-02-06 00:20:12,763::DEBUG::[newsunpack:542] rar_unpack(): Newfiles: []
2020-02-06 00:20:12,764::INFO::[newsunpack:257] Unrar finished on /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320
2020-02-06 00:20:12,765::DEBUG::[newsunpack:2128] build_filelists(): joinables: []
2020-02-06 00:20:12,765::DEBUG::[newsunpack:2129] build_filelists(): zips: []
2020-02-06 00:20:12,765::DEBUG::[newsunpack:2130] build_filelists(): rars: ['/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar']
2020-02-06 00:20:12,765::DEBUG::[newsunpack:2131] build_filelists(): 7zips: []
2020-02-06 00:20:12,765::DEBUG::[newsunpack:2132] build_filelists(): ts: []
2020-02-06 00:20:12,766::DEBUG::[newsunpack:2128] build_filelists(): joinables: []
2020-02-06 00:20:12,766::DEBUG::[newsunpack:2129] build_filelists(): zips: []
2020-02-06 00:20:12,766::DEBUG::[newsunpack:2130] build_filelists(): rars: ['/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar']
2020-02-06 00:20:12,767::DEBUG::[newsunpack:2131] build_filelists(): 7zips: []
2020-02-06 00:20:12,767::DEBUG::[newsunpack:2132] build_filelists(): ts: []
2020-02-06 00:20:12,767::INFO::[newsunpack:253] Unrar starting on /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320
2020-02-06 00:20:12,767::DEBUG::[newsunpack:477] Rar_sets: {'sometestfile-100MB': ['/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar']}
2020-02-06 00:20:12,767::INFO::[newsunpack:520] Extracting rarfile /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar (belonging to sometestfile-100MB) to /mnt/storage/downloads/PC/_UNPACK_reftestnzb-password-is-secret-ff17139db320
2020-02-06 00:20:12,767::DEBUG::[misc:722] Read these passwords from file: ['<the right password>', 'secret']
2020-02-06 00:20:12,767::INFO::[misc:724] Read 2 passwords from file /home/<USERNAME>/.sabnzbd/passwords.txt
2020-02-06 00:20:12,768::DEBUG::[newsunpack:615] rar_extract(): Extractionpath: /mnt/storage/downloads/PC/_UNPACK_reftestnzb-password-is-secret-ff17139db320
2020-02-06 00:20:12,768::DEBUG::[newsunpack:656] Analyzing rar file ... RAR5 found
2020-02-06 00:20:12,768::DEBUG::[newsunpack:657] Running unrar ['/usr/bin/nice', '-n10', '/usr/bin/ionice', '-c2', '-n4', '/usr/bin/unrar', 'x', '-idp', '-o-', '-or', '-p-', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/downloads/PC/_UNPACK_reftestnzb-password-is-secret-ff17139db320/']
2020-02-06 00:20:12,832::DEBUG::[newsunpack:827] UNRAR output 
UNRAR 5.90 beta 1 freeware      Copyright (c) 1993-2020 Alexander Roshal


Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar

Incorrect password for sometestfile-100MB.bin

Extracting from /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar

Incorrect password for sometestfile-100MB.bin
Total errors: 7
2020-02-06 00:20:12,832::INFO::[newsunpack:831] Unpacked 0 files/folders in 0 seconds
2020-02-06 00:20:12,833::DEBUG::[newsunpack:541] rar_unpack(): Rars: ['/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar']
2020-02-06 00:20:12,833::DEBUG::[newsunpack:542] rar_unpack(): Newfiles: []
2020-02-06 00:20:12,833::INFO::[newsunpack:257] Unrar finished on /mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320
2020-02-06 00:20:12,834::DEBUG::[newsunpack:2128] build_filelists(): joinables: []
2020-02-06 00:20:12,834::DEBUG::[newsunpack:2129] build_filelists(): zips: []
2020-02-06 00:20:12,834::DEBUG::[newsunpack:2130] build_filelists(): rars: ['/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part1.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part2.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part3.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part4.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part5.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part6.rar', '/mnt/storage/incoming/SABnzbd/reftestnzb-password-is-secret-ff17139db320/sometestfile-100MB.part7.rar']
2020-02-06 00:20:12,835::DEBUG::[newsunpack:2131] build_filelists(): 7zips: []
2020-02-06 00:20:12,835::DEBUG::[newsunpack:2132] build_filelists(): ts: []
2020-02-06 00:20:12,835::INFO::[postproc:373] Unpacked files []
2020-02-06 00:20:12,835::INFO::[postproc:378] Finished unpack_magic on reftestnzb-password-is-secret-ff17139db320
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by sander »

OK, tried that ... and works too (all on SABnzbd 3 for python3)

Code: Select all

2020-02-06 07:13:40,456::DEBUG::[misc:724] Read these passwords from file: ['bla1', 'secret', 'bla2', 'onzin']
2020-02-06 07:13:40,457::INFO::[misc:726] Read 4 passwords from file /home/sander/some-passwords.txt
2020-02-06 07:13:40,457::INFO::[assembler:258] Trying password "bla1" on job "reftestnzb-passworded"
2020-02-06 07:13:40,470::DEBUG::[nzbstuff:1229] Download Quality: bad-articles=0
2020-02-06 07:13:40,471::INFO::[nzbqueue:724] [sabnzbd.nzbqueue.register_article] Ending job reftestnzb-passworded
2020-02-06 07:13:40,503::INFO::[assembler:258] Trying password "secret" on job "reftestnzb-passworded"
2020-02-06 07:13:41,079::INFO::[assembler:286] Password "secret" matches for job "reftestnzb-passworded"
2020-02-06 07:13:41,079::DEBUG::[directunpacker:130] DirectUnpack queued sometestfile-100MB.part1.rar for sometestfile-100MB
2020-02-06 07:13:41,080::DEBUG::[filesystem:690] Renaming "/home/sander/Downloads/complete/reftestnzb-passworded" to "/home/sander/Downloads/complete/_UNPACK_reftestnzb-passworded"
2020-02-06 07:13:41,080::DEBUG::[directunpacker:365] Running unrar for DirectUnpack ['/usr/bin/unrar', 'x', '-vp', '-idp', '-o+', '-psecret', '/home/sander/Downloads/incomplete/reftestnzb-passworded/sometestfile-100MB.part1.rar', '/home/sander/Downloads/complete/_UNPACK_reftestnzb-passworded/']
2020-02-06 07:13:41,089::INFO::[directunpacker:374] DirectUnpacked volume 1 for sometestfile-100MB
2020-02-06 07:13:41,090::INFO::[assembler:87] Decoding /home/sander/Downloads/incomplete/reftestnzb-passworded/sometestfile-100MB.part6.rar yenc
2020-02-06 07:13:41,091::DEBUG::[filesystem:724] [sabnzbd.load_data] Deleting file /home/sander/Downloads/incomplete/reftestnzb-passworded/__ADMIN__/SABnzbd_article_2ajkasds
2020-02-06 07:13:41,131::DEBUG::[filesystem:448] Applying permissions 0o600 (octal) to /home/sander/Downloads/incomplete/reftestnzb-passworded/sometestfile-100MB.part6.rar
2020-02-06 07:13:41,131::DEBUG::[nzbstuff:341] Removing article database for SABnzbd_nzf_fanjtmqs
2020-02-06 07:13:41,131::DEBUG::[filesystem:724] [sabnzbd.nzbstuff.remove_admin] Deleting file /home/sander/Downloads/incomplete/reftestnzb-passworded/__ADMIN__/SABnzbd_nzf_fanjtmqs
And works too with Direct Unpack turned off:

Code: Select all

2020-02-06 07:18:54,724::DEBUG::[misc:724] Read these passwords from file: ['bla1', 'secret', 'bla2', 'onzin']
2020-02-06 07:18:54,724::INFO::[misc:726] Read 4 passwords from file /home/sander/some-passwords.txt
2020-02-06 07:18:54,724::INFO::[assembler:258] Trying password "bla1" on job "reftestnzb-passworded-again"
2020-02-06 07:18:54,768::INFO::[assembler:258] Trying password "secret" on job "reftestnzb-passworded-again"
2020-02-06 07:18:54,786::DEBUG::[nzbstuff:283] Finishing import on sometestfile-100MB.part7.rar
2020-02-06 07:18:54,786::DEBUG::[__init__:910] [sabnzbd.nzbstuff.finish_import] Loading data for SABnzbd_nzf_utpa_tc0 from /home/sander/Downloads/incomplete/reftestnzb-passworded-again/__ADMIN__/SABnzbd_nzf_utpa_tc0
2020-02-06 07:18:54,902::DEBUG::[nzbstuff:1229] Download Quality: bad-articles=0
2020-02-06 07:18:54,943::DEBUG::[nzbstuff:1229] Download Quality: bad-articles=0
2020-02-06 07:18:55,029::DEBUG::[nzbstuff:1229] Download Quality: bad-articles=0
2020-02-06 07:18:55,035::DEBUG::[nzbstuff:1229] Download Quality: bad-articles=0
2020-02-06 07:18:55,084::INFO::[assembler:286] Password "secret" matches for job "reftestnzb-passworded-again"
2020-02-06 07:18:55,084::INFO::[assembler:87] Decoding /home/sander/Downloads/incomplete/reftestnzb-passworded-again/sometestfile-100MB.part6.rar yenc
2020-02-06 07:18:55,085::DEBUG::[filesystem:724] [sabnzbd.load_data] Deleting file /home/sander/Downloads/incomplete/reftestnzb-passworded-again/__ADMIN__/SABnzbd_article_uw26s4jp
2020-02-06 07:18:55,123::DEBUG::[filesystem:448] Applying permissions 0o600 (octal) to /home/sander/Downloads/incomplete/reftestnzb-passworded-again/sometestfile-100MB.part6.rar
--
2020-02-06 07:18:55,552::DEBUG::[newsunpack:596] Trying unrar with password "secret"
2020-02-06 07:18:55,552::DEBUG::[newsunpack:615] rar_extract(): Extractionpath: /home/sander/Downloads/complete/_UNPACK_reftestnzb-passworded-again
2020-02-06 07:18:55,552::DEBUG::[newsunpack:656] Analyzing rar file ... RAR5 found
2020-02-06 07:18:55,552::DEBUG::[newsunpack:657] Running unrar ['/usr/bin/unrar', 'x', '-idp', '-o-', '-or', '-psecret', '/home/sander/Downloads/incomplete/reftestnzb-passworded-again/sometestfile-100MB.part1.rar', '/home/sander/Downloads/complete/_UNPACK_reftestnzb-passworded-again/']
2020-02-06 07:18:56,184::INFO::[downloader:778] Thread [email protected]: forcing disconnect
2020-02-06 07:18:56,343::INFO::[downloader:778] Thread [email protected]: forcing disconnect
2020-02-06 07:18:56,443::INFO::[downloader:778] Thread [email protected]: forcing disconnect
2020-02-06 07:18:56,544::INFO::[downloader:778] Thread [email protected]: forcing disconnect
2020-02-06 07:18:56,545::DEBUG::[newsunpack:827] UNRAR output 
UNRAR 5.90 beta 2 freeware      Copyright (c) 1993-2020 Alexander Roshal
Starshadow
Newbie
Newbie
Posts: 14
Joined: August 14th, 2013, 12:23 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by Starshadow »

I have a new finding. It turns out the issue happens when the 'Action when encrypted RAR is downloaded' setting is 'Off'. If it's set to 'Pause', then extraction works with directunpack either on or off. Please try to duplicate my bug with the setting 'Off'.

When the setting is 'Pause', assembler finds out about the encryption early on in the download and finds the password right then and there, and both directunpack and newsunpack can extract fine. But when it's 'Off', assembler ignores the encryption and the responsibility falls to newsunpack to do the job alone, which fails because it does not recognize Unrar's new error message. In code terms, rar_extract_core() does not return 2 after the first attempt using an empty password fails.
User avatar
safihre
Administrator
Administrator
Posts: 5521
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by safihre »

Aah this could definitely be the problem. Can you maybe create a bug at our GitHub repo so I can fix it?
I can also create the issue of course, but this way it's easier to keep track :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Starshadow
Newbie
Newbie
Posts: 14
Joined: August 14th, 2013, 12:23 pm

Re: SABnzbd doesn't extract passworded rar files with Unrar 5.80

Post by Starshadow »

Sorry for disappearing! I created an issue on GitHub: https://github.com/sabnzbd/sabnzbd/issues/1365 The truth is this bug stopped bothering me since I switched to the 'Pause' setting which really works better anyway as it lets direct unpack do it's thing.
Post Reply