React-native-code-push: Code Push Error - The folder “unzipped” doesn’t exist.

Created on 21 Mar 2019  Â·  17Comments  Â·  Source: microsoft/react-native-code-push

Hi,

I am getting this error on app install when checking for update. Its coming randomly not on each and every install. I have implemented
codePushDownloadDidProgress

What could cause this error?

Environment:

react-native-code-push: ^5.4.2
react-native: 0.55.4

codepush error

_Originally posted by @faisal-aym in https://github.com/Microsoft/react-native-code-push/issues/516#issuecomment-474792914_

bug no-repro

All 17 comments

I got a similar error (iOS):

Error Domain=NSCocoaErrorDomain Code=256 "The file “unzipped” couldn’t be opened." UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/1922C8E5-E8C7-4833-998B-0CC3EE503332/Library/Application Support/CodePush/unzipped,
NSUserStringVariant=(
Folder
),
NSUnderlyingError=0x2812af0c0 {Error Domain=NSPOSIXErrorDomain Code=20 "Not a directory"}}

Hi @faisal-aym, @dneprDroid
Thanks for reporting!

Can you please clarify some moments:

  • Platform (iOS?)
  • Does this reproduce on a debug build or release build?
  • Does this reproduce on a simulator, or only on a physical device?

It looks very similar to this issue.

  • ios, "react-native": "0.57.7", "react-native-code-push": "^5.6.0",
  • debug build,
  • tested only on a physical device

I opened internal files from../Application Support/CodePush and noticed that zip-file is valid but it was uncompressed to invalid unzipped file.
In my case, unzipped is one image from app's resource folder (from zip archive), but it should be a folder.

Example of this zip file:
download.zip
Screen Shot 2019-03-26 at 3 13 56 PM

  • Platform: iOS 12
  • Notice issue on release then logged issue on debug
  • Logged while using simulator.

@yuri-kulikov It seems that CodePush has invalid SSZipArchive dependency, I've deleted SSZipArchive from CodePush and replaced with my SSZipArchive from Pods and it's working properly for me.

Hey @faisal-aym, @dneprDroid
Sorry for the delay!

I just tested a simple app with react-native-code-push connected via pods, and it works correctly.
Maybe this issue occurs when the project already has a SSZipArchive dependency?

hey @yuri-kulikov ,

My problem is when i install app its not getting the latest build/updates instead it installs some old build. But when i kill app and bring it to foreground again, it updates the app. I have 2 different keys for two different user groups. Following is my implementation:

try {
  codePush.notifyAppReady();
  (await codePush.checkForUpdate())
    ? codePush.sync(
      {
        deploymentKey: platform.group,
        installMode: codePush.InstallMode.IMMEDIATE
      },
      this.codePushStatusDidChange,
      this.codePushDownloadDidProgress
    )
    : console.log('already updated')
} catch (e) {
  console.log(e)
}

As far as I understand, these

  • The folder "unzipped" doesn't exist
  • The file "unzipped" couldn’t be opened

seem to be two completely different problems.

@faisal-aym Do you wrap your App component with codePush or you only use codePush.sync method?

@yuri-kulikov

I am not wrapping App component with codepush, i need to check for update on install and when user comes to foreground from background so i am using codepush.sync method from within my update method.

i am getting "The folder unzipped doesn't exist".

@faisal-aym Maybe you can provide us with a simple reproducible demo so we could test it directly?

@faisal-aym Just a friendly ping :)

@yuri-kulikov thanks :) I am working on a demo project and will share with you soon.

That's great, thank you! :)

[CodePush] The file “unzipped” couldn’t be opened.

@yuri-kulikov I met this problem. #1457 not work for me.

react-native-code-push: 5.6.0

React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
      Memory: 824.89 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.15.3 - /usr/local/bin/node
      Yarn: 1.15.2 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 22, 23, 25, 26, 27, 28
        Build Tools: 26.0.3, 28.0.1
        System Images: android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.1 AI-173.4819257
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.3 => 0.59.3 
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1

Hi @dneprDroid , @faisal-aym ,

I'm going to close this issue for now as we haven't heard from you in a while, unfortunately.
Please feel free to reopen it if you have any questions or if you provide a demo app for reproducing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SudoPlz picture SudoPlz  Â·  4Comments

kevando picture kevando  Â·  4Comments

Phredward picture Phredward  Â·  3Comments

vira-khdr picture vira-khdr  Â·  3Comments

ninjz picture ninjz  Â·  4Comments