Skip to content

zipWithPassword produces empty zip and fails with an exception.  #321

@Volland

Description

@Volland

Describe the bug
zipWithPassword produces an empty zip and fails with an exception.
I am using default encryption

To Reproduce
Steps to reproduce the behavior:

await zipWithPassword(backupDir, zipPath, await this.passwordProvider.getPassword());

Expected behavior
A clear and concise description of what you expected to happen.

Env (please complete the following information):

  • Device: [e.g. iPhone12 simulator]
  • OS: [e.g. iOS8.1]
  • OS Version: [e.g. 22]
  • Package Version: [7.0.1]

Additional context
zipWithPassword error {
"stack": "Error: unable to zip\n at promiseMethodWrapper (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:13438:45)\n at zipWithPassword (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:649460:192)\n at ?anon_0_ (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:752800:64)\n at next (native)\n at asyncGeneratorStep (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:1520:19)\n at _next (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:1534:29)\n at tryCallOne (address at InternalBytecode.js:1:1180)\n at anonymous (address at InternalBytecode.js:1:1874)\n at apply (native)\n at anonymous (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:52701:26)\n at _callTimer (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:52580:17)\n at _callReactNativeMicrotasksPass (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:52625:17)\n at callReactNativeMicrotasks (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:52831:44)\n at __callReactNativeMicrotasks (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:11086:48)\n at anonymous (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:10859:45)\n at __guard (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:11058:15)\n at flushedQueue (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:10858:21)\n at callFunctionReturnFlushedQueue (http://192.168.1.104:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app:10843:33)",
"code": "zip_error",
"message": "unable to zip",
"domain": "RCTErrorDomain",
"userInfo": null,
"nativeStackIOS": [
"0 DevKin.debug.dylib 0x0000000109d179e4 RCTJSErrorFromCodeMessageAndNSError + 100",
"1 DevKin.debug.dylib 0x0000000109cb9e98 __41-[RCTModuleMethod processMethodSignature]block_invoke_2.73 + 164",
"2 DevKin.debug.dylib 0x0000000109c1d9c4 -[RNZipArchive zipFolderWithPassword:destinationPath:password:encryptionType:resolver:rejecter:] + 460",
"3 CoreFoundation 0x00000001804b4760 invoking
+ 144",
"4 CoreFoundation 0x00000001804b1ac4 -[NSInvocation invoke] + 276",
"5 CoreFoundation 0x00000001804b1d5c -[NSInvocation invokeWithTarget:] + 60",
"6 DevKin.debug.dylib 0x0000000109cbb590 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 1892",
"7 DevKin.debug.dylib 0x0000000109cbf8a4 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicEiN12_GLOBAL__N_117SchedulingContextE + 1848",
"8 DevKin.debug.dylib 0x0000000109cbef78 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 136",
"9 DevKin.debug.dylib 0x0000000109cbeee4 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28",
"10 libdispatch.dylib 0x0000000180170104 _dispatch_call_block_and_release + 24",
"11 libdispatch.dylib 0x0000000180171978 _dispatch_client_callout + 16",
"12 libdispatch.dylib 0x0000000180179b10 _dispatch_lane_serial_drain + 960",
"13 libdispatch.dylib 0x000000018017a688 _dispatch_lane_invoke + 388",
"14 libdispatch.dylib 0x0000000180185a84 _dispatch_root_queue_drain_deferred_wlh + 276",
"15 libdispatch.dylib 0x00000001801850d0 _dispatch_workloop_worker_thread + 448",
"16 libsystem_pthread.dylib 0x0000000100df3b74 _pthread_wqthread + 284",
"17 libsystem_pthread.dylib 0x0000000100df2934 start_wqthread + 8"
],
"sentry_captured": true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions