Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1.0-beta] react-native link gets stuck #999

Closed
fungilation opened this issue Sep 14, 2017 · 15 comments
Closed

[5.1.0-beta] react-native link gets stuck #999

fungilation opened this issue Sep 14, 2017 · 15 comments
Assignees

Comments

@fungilation
Copy link

fungilation commented Sep 14, 2017

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
@ruslan-bikkinin
Copy link
Contributor

@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.

@fungilation
Copy link
Author

fungilation commented Sep 14, 2017

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.

@ruslan-bikkinin
Copy link
Contributor

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

@fungilation
Copy link
Author

fungilation commented Sep 15, 2017

@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.

@ruslan-bikkinin
Copy link
Contributor

ruslan-bikkinin commented Sep 18, 2017

@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.

@fungilation
Copy link
Author

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

@ruslan-bikkinin
Copy link
Contributor

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

@ethanyuwang
Copy link

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?

@luongs3
Copy link

luongs3 commented Mar 2, 2018

still stuck in this issue ?

@garrottkai
Copy link

Same issue still occurs for me on v5.3.2

@itoys
Copy link
Contributor

itoys commented Mar 23, 2018

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

Thanks!

@garrottkai
Copy link

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

@itoys
Copy link
Contributor

itoys commented Mar 27, 2018

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.

@mouthzipper
Copy link

mouthzipper commented Apr 5, 2018

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.

@antofa
Copy link

antofa commented Sep 12, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants