zip Plugin with password woks wrong

Hello,

Faced a problem when a password archive created on one device could not be unzipped on another.

Here is a link to a plugin zip: https://docs.coronalabs.com/plugin/zip/index.html

  1. For example, create an archive with password ‘12345’ on the server using the command:
    zip -P '12345' intro.png.zip intro.png

  2. … then copy archive intro.png.zip to your android path

  3. … run uncompress on Lua:

local zip = require( "plugin.zip" )
local function zipListener( event )
 
    if ( event.isError ) then
        print( "Error!" )
    else
        print ( event["type"] )  --> uncompress
        print ( event.response[1] )
    end
end
local zipOptions =
{
    zipFile = "intro.png.zip",
    zipBaseDir = system.DocumentsDirectory,
    dstBaseDir = system.DocumentsDirectory,
    files = { "intro.png" },
    listener = zipListener,
    password = "12345",
}
zip.uncompress( zipOptions )
  1. Result: error on any android device.

Hi. What is the error description? Are you able to uncompress this file by your own?

Hi,

The error has only info below. It was taken by table.foreach(event,print):

09-15 03:31:06.059: I/Corona(24321): type uncompress
09-15 03:31:06.059: I/Corona(24321): name zip
09-15 03:31:06.059: I/Corona(24321): errorMessage
09-15 03:31:06.059: I/Corona(24321): isError true
09-15 03:31:06.059: I/Corona(24321): response table: 0x7f749fe780
09-15 03:31:06.059: I/Corona(24321): Error:

As you can see, Error is empty.

The file was created on PC (Win10) via Corona Simulator.exe by using the same library:
zip.compress()

This is the API link:

The source code below.

All work fine on the same device, i mean:

:white_check_mark: zip compressed on PC with password => zip uncompressed on PC with the same password - works fine
:white_check_mark: zip compressed on Android Samsung with password => zip uncompressed on Android Samsung with the same password - works fine
:white_check_mark: zip compressed on Android Mi MAX 2 with password => zip uncompressed on Android Mi MAX 2 with the same password - works fine

:x: zip compressed on Android Mi MAX 2 with password => zip uncompressed on Android Samsung with the same password - dont work
:x: zip compressed on PC with password => zip uncompressed on Android Samsung with the same password - dont work

etc…

local zip = require( "plugin.zip" )
local function zipListener( event )
 
    if ( event.isError ) then
        print( "Error!" )
    else
        print ( event["type"] )  --> compress
        print ( event.response[1] )
    end
end
local zipOptions =
{
    zipFile = "intro.png.zip",
    zipBaseDir = system.DocumentsDirectory,
    srcBaseDir = system.DocumentsDirectory,
    files = { "intro.png" },
    listener = zipListener,
    password = "12345",
	
}
zip.compress( zipOptions )

Regards,

Hey! How are the steps you are following to compress in one device and uncompress in a different one? are you using the library in both compressing and uncompressing or you are manually compressing, moving the file to the device and then trying to uncompress there? I’m asking this to rule out that the file is being wrong placed, and also that the password is correctly setted.

Regards