React-native-code-push: The bundle update stuck on Done copying asset.

Created on 5 Jun 2019  路  7Comments  路  Source: microsoft/react-native-code-push

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Steps to Reproduce

  1. appcenter codepush release-react -a -d Production -p "./ios/app/Info.plist" -t 1.4.21 --description "bug fixed"

Expected Behavior

What you expected to happen?
I expect the bundle to be uploaded to the code-push server.

Actual Behavior

What actually happens?
I am stuck on Done copying assets.
After react-release command . I get

  • info Writing bundle output to:, /var/folders/l1/lnm98dxx5kng16sy41d66b080000gn/T/code-push11955-2252-9fk90y.9i2c/CodePush/main.jsbundle
  • info Done writing bundle output
  • info Copying 28 asset files
  • info Done copying assets

and nothing after that.
I check my internet connection and it is ok. I tried multiple time and waited more than half an hour on 2 instance.

  STACK TRACE AND/OR SCREENSHOTS

Reproducible Demo

Environment

  • react-native-code-push version: 5.6.0
  • react-native version: 0.59.5
  • iOS/Android/Windows version: IOS
  • Does this reproduce on a debug build or release build? N/A
  • Does this reproduce on a simulator, or only on a physical device? N/A

(The more info the faster we will be able to address it!)

Most helpful comment

@yuri-kulikov I'm having the same issue. At first at react-native version 0.59.10. I then updated to 0.60.0 and the issue remains.
CodePush version 5.6.0.

Running release with
appcenter codepush release-react -a <username/app-name> -d Production --output-dir ./ios/build --sourcemap-output ./ios/build/CodePush/main.jsbundle.map

Everything seems to bundle correct but it's stuck att "info Done copying assets".
Adding the --debug flag shows nothing suspicious.
Restarting the computer does not fix it for me. I've tried on 2 different computers.

Any idea on what the problem may be or how to debug further?

All 7 comments

I restarted my computer and it is working now. Sorry for the false alarm.

@nirajhi Sure, don't worry :+1:
Please feel free to reopen the issue if you encounter the issue again!

@yuri-kulikov I'm having the same issue. At first at react-native version 0.59.10. I then updated to 0.60.0 and the issue remains.
CodePush version 5.6.0.

Running release with
appcenter codepush release-react -a <username/app-name> -d Production --output-dir ./ios/build --sourcemap-output ./ios/build/CodePush/main.jsbundle.map

Everything seems to bundle correct but it's stuck att "info Done copying assets".
Adding the --debug flag shows nothing suspicious.
Restarting the computer does not fix it for me. I've tried on 2 different computers.

Any idea on what the problem may be or how to debug further?

@yuri-kulikov I'm having the same issue. At first at react-native version 0.59.10. I then updated to 0.60.0 and the issue remains.
CodePush version 5.6.0.

Running release with
appcenter codepush release-react -a <username/app-name> -d Production --output-dir ./ios/build --sourcemap-output ./ios/build/CodePush/main.jsbundle.map

Everything seems to bundle correct but it's stuck att "info Done copying assets".
Adding the --debug flag shows nothing suspicious.
Restarting the computer does not fix it for me. I've tried on 2 different computers.

Any idea on what the problem may be or how to debug further?

Did you manage to fix the problem?

I've been having this same issue for a while. This is what I wrote in my troubleshooting notes:

For some reason the react native cli does not exit when a command completes. This is an issue because when we are trying to read a new JS bundle for CodePush the operation hangs indefinitely. To solve this open up {REPO_ROOT}\node_modules\@react-native-community\build\cliEntry.js and modify the addCommand function to include this:

const cmd = _commander().default.command(command.name).description(command.description).action(function handleAction(...args) {
    const passedOptions = this.opts();
    const argv = Array.from(args).slice(0, -1);
    Promise.resolve().then(() => {
      (0, _assertRequiredOptions.default)(options, passedOptions);
      var result = command.func(argv, ctx, passedOptions);
      if (result && result.then) {
        result.then(() => {
          process.exit();
        });
      }
      return result;
    }).catch(handleError);
  });

The key piece of code is the call to process.exit(). Note that this fix is targeted to the bundle command. Other commands might still hang.

WARNING: The code above will prevent you from running metro js bundler for debugging so you will have to comment out process.exit().

I'm now having this issue. Has anyone else discovered a more permanent solution or reasoning this occurs?

It blocks builds on AppCenter as they timeout and local release builds are hanging at the same location consistently. "Done copying assets"

I've been having this same issue for a while. This is what I wrote in my troubleshooting notes:

For some reason the react native cli does not exit when a command completes. This is an issue because when we are trying to read a new JS bundle for CodePush the operation hangs indefinitely. To solve this open up {REPO_ROOT}\node_modules\@react-native-community\build\cliEntry.js and modify the addCommand function to include this:

const cmd = _commander().default.command(command.name).description(command.description).action(function handleAction(...args) {
    const passedOptions = this.opts();
    const argv = Array.from(args).slice(0, -1);
    Promise.resolve().then(() => {
      (0, _assertRequiredOptions.default)(options, passedOptions);
      var result = command.func(argv, ctx, passedOptions);
      if (result && result.then) {
        result.then(() => {
          process.exit();
        });
      }
      return result;
    }).catch(handleError);
  });

The key piece of code is the call to process.exit(). Note that this fix is targeted to the bundle command. Other commands might still hang.

WARNING: The code above will prevent you from running metro js bundler for debugging so you will have to comment out process.exit().

I dont see build folder in @react-native-community folder am i missing something

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisjrex picture chrisjrex  路  4Comments

diegocouto picture diegocouto  路  4Comments

vira-khdr picture vira-khdr  路  3Comments

fanzhiri picture fanzhiri  路  3Comments

Adr1ann picture Adr1ann  路  3Comments