React-native-code-push: [5.1.0-beta] `react-native link` gets stuck

Created on 14 Sep 2017  路  15Comments  路  Source: microsoft/react-native-code-push

Steps to Reproduce

  1. react-native unlink react-native-code-push
  2. react-native link react-native-code-push
  3. Doesn't return to cli, stuck on last line: "codepush.gradle" is already linked in the build definition

Expected Behavior

Exit cleanly on link

Actual Behavior

See 3 above

Reproducible Demo

Output copied from terminal, with [STRINGS] replaced:

$ react-native unlink react-native-code-push
Scanning 611 folders for symlinks in [PROJECT]/node_modules (7ms)
rnpm-install info Unlinking react-native-code-push android dependency 
rnpm-install info Android module react-native-code-push has been successfully unlinked 
rnpm-install info Unlinking react-native-code-push ios dependency 
rnpm-install info iOS module react-native-code-push has been successfully unlinked 
$ react-native link react-native-code-push
Scanning 611 folders for symlinks in [PROJECT]/node_modules (8ms)
? What is your CodePush deployment key for Android (hit <ENTER> to ignore) [KEY]
rnpm-install info Linking react-native-code-push android dependency 
rnpm-install info Android module react-native-code-push has been successfully linked 
rnpm-install info Linking react-native-code-push ios dependency 
rnpm-install info iOS module react-native-code-push has been successfully linked 
"CodePush.h" header already imported.
"jsCodeLocation" already pointing to "[CodePush bundleURL]".
Could not determine correct xcode proj path to retrieve related plist file, there are multiple xcodeproj under the solution.
? What is your CodePush deployment key for iOS (hit <ENTER> to ignore) "getJSBundleFile" is already overridden
"codepush.gradle" is already linked in the build definition

... then stuck here, not returning to cli. Have to force quit with CTRL-C

Environment

  • react-native-code-push version: 5.1.0-beta
  • react-native version: 0.48.3
  • iOS/Android/Windows version: iOS 10.3.3
  • Does this reproduce on a debug build or release build? Neither (cli)
  • Does this reproduce on a simulator, or only on a physical device? Neither
bug fix-in-master

Most helpful comment

I'm still seeing Could not determine correct xcode proj path to retrieve related plist file, there are multiple xcodeproj under the solution. After a reinstall. How should I fix it?

All 15 comments

@fungilation thanks for reaching us! Yeah, it seems to be a bug in postlinking scripts, i will be working on fix tomorrow. If you need additional assistance from our side with linking your application with react-native-code-push feel free to ask.

Thanks for the quick reply! This is an existing installation and CTRL-C after relinking doesn't seem to have broken anything with my app. The broken postlinking scripts may break new installations however.

@fungilation I just made PR with fix, could you please check it out and let us know does it resolve your issue?

@ruslan-bikkinin How should I test it, yarn add https://github.com/Microsoft/react-native-code-push.git instead of using npm since there's no new release yet with your PR?

Or not, since I'm not seeing it on master commits either.

@fungilation you can check out patched version of react-native-code-push directly from my branch:

cd /path/to/your/rn-app
rm -rf node_modules/react-native-code-push
npm i ruslan-bikkinin/react-native-code-push#fix-postlink

Sorry that I'vent provided this instructions at the beginning.

Looks like you fixed it:

$ yarn remove react-native-code-push
...
$ yarn add ruslan-bikkinin/react-native-code-push#fix-postlink
...
$ react-native link react-native-code-push
Scanning 610 folders for symlinks in [PROJECT]/node_modules (7ms)
? What is your CodePush deployment key for Android (hit <ENTER> to ignore) 
rnpm-install info Linking react-native-code-push android dependency 
rnpm-install info Android module react-native-code-push has been successfully linked 
rnpm-install info Linking react-native-code-push ios dependency 
rnpm-install info iOS module react-native-code-push has been successfully linked 
Running ios postlink script
"CodePush.h" header already imported.
"jsCodeLocation" already pointing to "[CodePush bundleURL]".
Could not determine correct xcode proj path to retrieve related plist file, there are multiple xcodeproj under the solution.
? What is your CodePush deployment key for iOS (hit <ENTER> to ignore) [DSN]
Running android postlink script
"getJSBundleFile" is already overridden
"codepush.gradle" is already linked in the build definition
$

Exited to cli prompt cleanly

@fungilation thank you for reply! So fix in the master now and I am closing issue.

I'm still seeing Could not determine correct xcode proj path to retrieve related plist file, there are multiple xcodeproj under the solution. After a reinstall. How should I fix it?

still stuck in this issue ?

Same issue still occurs for me on v5.3.2

Hi guys,
could you please paste here your terminal output?

Thanks!

All I'm getting is:

? What is your CodePush deployment key for Android (hit <ENTER> to ignore)
Running ios postlink script
? What is your CodePush deployment key for iOS (hit <ENTER> to ignore) 
Running android postlink script

It hangs there

Unfortunately I can't reproduce this issue.
My steps:

$ react-native init AwesomeProject
$ cd AwesomeProject
$ npm i react-native-code-push --save
$ react-native link react-native-code-push
$ react-native unlink react-native-code-push
$ react-native link react-native-code-push

And all works fine.

Could you please give me more clues e.g.: rn version, node version, npm version, additional steps.

same issue here.

"CodePush.h" header already imported.
"jsCodeLocation" already pointing to "[CodePush bundleURL]".
"CodePushDeploymentKey" already specified in the plist file.
Running android postlink script
"getJSBundleFile" is already overridden
"codepush.gradle" is already linked in the build definition

--- hangs

Update, working now after waiting for around 4mins.

I had this issue too and resolved it by downgrading to node 9.7.0 from 10.9.0.

Was this page helpful?
0 / 5 - 0 ratings