Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

[CodePush] The file “unzipped” couldn’t be opened - unzippedFolderPath appears as a file instead of a folder #1457

@andrewrt

Description

@andrewrt

Steps to Reproduce

  1. Install CodePush via manual method to xcode project
  2. Ensure that CodePush is using its own SSZipArchive library
  3. In react native - app.js:
import codePush from 'react-native-code-push';
class App extends React.Component {

  codePushDownloadDidProgress = (progress) => {
    console.log(`${progress.receivedBytes} of  ${progress.totalBytes}  received.`);
  }

  componentDidMount() {
    codePush.sync(
      {
        updateDialog: true,
        installMode: codePush.InstallMode.IMMEDIATE,
      },
      (syncStatus) => {/*log status*/},
      (progress) => { this.codePushDownloadDidProgress(progress); }
    );
  }
 }

const codePushOptions = { checkFrequency: codePush.CheckFrequency.MANUAL };
// const codePushOptions = { checkFrequency: codePush.CheckFrequency.ON_APP_RESUME };
const MyApp = codePush(codePushOptions)(App);
export default MyApp;

Expected Behavior

Bundle downloads and installs

Actual Behavior

Console outputs:

2018-11-20 14:47:59.576 [info][tid:com.facebook.react.JavaScript] 'CodePush syncStatus: ', 7
2018-11-20 14:48:00.031 [info][tid:com.facebook.react.JavaScript] 17996 of  1247495  received.
2018-11-20 14:48:00.063 [info][tid:com.facebook.react.JavaScript] 50764 of  1247495  received.
2018-11-20 14:48:00.097 [info][tid:com.facebook.react.JavaScript] 99916 of  1247495  received.
2018-11-20 14:48:00.403 [info][tid:com.facebook.react.JavaScript] 1247495 of  1247495  received.
2018-11-20 14:48:00.499 [info][tid:com.facebook.react.JavaScript] 'CodePush syncStatus: ', 3
2018-11-20 14:48:00.500 [info][tid:com.facebook.react.JavaScript] [CodePush] The file “unzipped” couldn’t be opened.

Bundle downloads successfully, but then the unzip inside of CodePush appears to unzip the package as a file instead of a folder, so in CodePushPackage.m

 [SSZipArchive2 unzipFileAtPath:downloadFilePath  toDestination:unzippedFolderPath];

the phone's folder structure looks like:
/Library/Application Support/CodePush:

  • download.zip (correct 1.2MB zip with my package, assets, etc etc)
  • unzipped (a 3.6MB file without type)

Environment

  • react-native-code-push version: "react-native-code-push": "^5.4.2",
  • react-native version: "react-native": "0.56.x",
  • iOS version: iOS 12.0.1
  • Does this reproduce on a debug build or release build? Happens on both release and debug
  • Does this reproduce on a simulator, or only on a physical device? Physical device & simulator

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions