nicoboss/nsz

Compression task failed due to corruption being detection during NSZ verification

M-hyun opened this issue · 3 comments

i just drop my nsp file into the compressor and pressed compress to nsz button
..the software does compress it but he decompress it to nsp again and delete the nsz file automatically

I tried with the latest nsz_v4.4.0_win64_portable version with and without the rm-source option or the rm-old-versions option and can't recreate your issue. Can you please provide the text visible in the console window and provide your config file located under nsz_v4.4.0_win64_portable/Lib/site-packages/nsz/gui/gui.ini so I can recreate and fix this issue?

1
2
kivy_23-08-10_0.txt
(gui.ini)👇🏻
https://mega.nz/file/ZltC3CDI#uKHaHfbD4bdMEjuGnsoTuNpY2IAxzWMEohC7NzRG5x8
sorry if i made a self mistake not sure what happened i just changed the compression to lvl 22 that's all
after all process finished the nsz file is deleted automatically

This occurs because verification failed. The original file is never deleted. Only the compressed NSZ file gets deleted due to corruption being detected during verification. This is to ensure users of this tool never end up with corrupted files.

if verifyArg:
	Print.info("[VERIFY NSZ] {0}".format(outFile))
	try:
		verify(outFile, removePadding, True, keepDelta, None if quickVerify else filePath, [statusReport, id], pleaseNoPrint)
	except VerificationException:
		Print.error("[BAD VERIFY] {0}".format(outFile))
		Print.error("[DELETE NSZ] {0}".format(outFile))
		remove(outFile)

It seems likely that the NSP file you try to compress is corrupted. First make sure you have the latest prod.keys dumped and copied into %userprofile%/.switch. Then verify your NSP file using the "Verify" option and let me know if it shows up as corrupted or not.

If it shows up as corrupted you have the following options:

  • Setting verification inside the NSZ GUI settings to "None". This will fix your issue and keeps your NSZ file but it will contain the same corruption which in this case was already present in your source file.
  • Verify the game files on your Nintendo Switch and make sure it passes. Then dump it again using nxdumptool or any other homebrew you trust. Compression to NSZ should now be possible without any issue as the source file is no longer corrupted.

If the original file doesn't show up as corrupted things will get really interesting as in this case converting your file from NSP to NSZ might cause the corruption inside the NSZ file. In this case, please post the console output of the NSP verification so I can make sure everything is indeed not corrupted. I will then provide you further instructions how to find what is causing this.

If you have any other NSP files please try if they work or leads to the same issue.