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

[0.45.0] Android release build failed #14417

Closed
vomchik opened this issue Jun 9, 2017 · 16 comments
Closed

[0.45.0] Android release build failed #14417

vomchik opened this issue Jun 9, 2017 · 16 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@vomchik
Copy link

vomchik commented Jun 9, 2017

After updating to new version release build failed. Any ideas how does this fix?

FAILURE: Build failed with an exception.

* What went wrong:
Could not list contents of '/Users/vomchik/Projects/LITS/toolook/toolook-app-react-native/node_modules/react-native/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.
@olivierkaisin
Copy link

Same problem here, it happens to me when I try to build a release APK for Android at the :app:bundleReleaseJsAndAssets step.

As a temporary solution deleting the whole node_modules folder and re-installing dependencies fixes it.

@tabrindle
Copy link
Contributor

I use a Makefile that points its clean target to a full clean script. I have found most issues like this can be solved by killing all simulators, packagers, etc, running clean, then reinstalling node_modules:

clean.sh

watchman watch-del-all
rm -rf node_modules
rm -rf $TMPDIR/react-*

@hramos
Copy link
Contributor

hramos commented Jun 9, 2017

Hey, thanks for reporting this issue!

It looks like your description is missing some necessary information. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!

@hramos hramos closed this as completed Jun 9, 2017
@cinder92
Copy link

same issue here! whats going on with latest react native release? is fully os issues in both platforms :(

@jdeibe
Copy link

jdeibe commented Jun 10, 2017

Same error for me but after a cleanup all works.

@benoitvallon
Copy link
Contributor

benoitvallon commented Jun 11, 2017

I have the same error. Cleaning the node_modules works for me but the error reappears after every Xcode build.

It seems that the script ios-install-third-party.sh recreates the third-party folder with its content in node_modules/react-native.

The symbolic link mentioned in the error:
node_modules/react-native/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link. should point to automake
test-driver -> /usr/share/automake-1.14/test-driver
which does not exist in my case. I did reinstall xcode devtools but it didn't solve the issue.

Can it be a wrong xcode setup/install on my side? I don't want to clean the folder between android and ios builds every times.

Xcode 8.3.3

@nehvaleem
Copy link

Also having exact same issue. Solution provided by @olivierkaisin seems to work, but it is indeed frustrating having to delete node_modules at each build.

@attilaaronnagy
Copy link

after every node_modules reinstall i have to update the build tools versions.. so the solution provided by @olivierkaisin works, but please fix this bug, every android build takes 10 times longer than before :(

@hramos
Copy link
Contributor

hramos commented Jun 15, 2017

This issue is closed. If this is still affecting you, please open a new issue and make sure to fill out everything in the template as documented in the contribution guidelines. Thanks!

@itinance
Copy link
Contributor

itinance commented Jun 18, 2017

This worked for me: to delete the broken test-driver-link as follows

unlink node_modules/react-native/third-party/glog-0.3.4/test-driver

@Guardiannw
Copy link
Contributor

This is a problem. Please resolve this. It is very annoying

@hramos
Copy link
Contributor

hramos commented Jun 19, 2017

@Guardiannw see my earlier comment.

@lprhodes
Copy link
Contributor

lprhodes commented Jun 20, 2017

@hramos Not every issue should require all details to be filled out before it's looked into...it's not always something you can document the steps for in order to reproduce. Closing a genuine issue because it doesn't meet your guidelines is pretty poor form.

@hramos
Copy link
Contributor

hramos commented Jun 20, 2017

My goal here is to get the issue tracker into a better state. There aren't enough people following up and submitting PRs to fix the existing set of open issues. Opening a new issue without providing a minimum level of details is not helping out. I'm happy to reconsider the guidelines once the number of outstanding issues is in better shape. Thanks for understanding.

@benoitvallon
Copy link
Contributor

The linked issue #14464 above is perfectly describing what is happening in this issue so there is no need for that one to stay open.

facebook-github-bot pushed a commit that referenced this issue Jun 21, 2017
Summary:
After execution of `scripts/ios-install-third-party.sh` a symlink is created :
`<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver`
that is pointing to `test-driver -> /usr/share/automake-1.14/test-driver`
This can be executed indirectly by `react-native run-ios`.

This breaks the bundle process if the system don't contain a given file under the link and having this strict dependency on the system setup is not a good practice.

Once the `test-driver` symlink is created android app release is failing, for :
`./gradlew assembleRelease`
the `:app:bundleReleaseJsAndAssets` returns :
```
FAILURE: Build failed with an exception.

* What went wrong:
Could not list contents of '<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.
```
Related issues:
#14417
#14464
#14548

1. Create new project with `react-native init <YOUR-APP>`
2. cd `<YOUR-APP>/`
3. Run app on iOS `react-native run-ios` so `scripts/ios-install-third-party.sh` is executed.
4. cd `android/`
5. Run android app release `./gradlew assembleRelease` (it will work properly after this fix and fail if the `test-driver` symlink exists)

IMHO we should resolve the issue with this quick fix and apply the proper fix later after the new version of `google/glog` will be released.
The proper cleanup of files generated by autotools was already applied : google/glog#188

Please let me know if I should provide more details : javache, mhorowitz, hramos
Closes #14638

Differential Revision: D5292362

Pulled By: javache

fbshipit-source-id: 81ff2273420ea078d624a76e781a5b67b96e6a4e
ujwal-setlur referenced this issue Jul 14, 2017
Summary:
I encountered an issue when building with fastlane gym / xcodebuild where glog would not build because of missing config.h header file. I tracked it down to the ios-configure-glog.sh script that ended up error-ing because of missing valid c compiler. I guess it didn't enter the if to set c compiler env in xcodebuild and that env doesn't have proper values set like it does in xcode so just removing this check fixed it. Also tested that it still works properly in xcode.
Closes #14267

Differential Revision: D5285691

Pulled By: javache

fbshipit-source-id: df5315926c2d2d78806618df3d9c9bbbb974d1ea
grabbou pushed a commit that referenced this issue Jul 17, 2017
Summary:
After execution of `scripts/ios-install-third-party.sh` a symlink is created :
`<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver`
that is pointing to `test-driver -> /usr/share/automake-1.14/test-driver`
This can be executed indirectly by `react-native run-ios`.

This breaks the bundle process if the system don't contain a given file under the link and having this strict dependency on the system setup is not a good practice.

Once the `test-driver` symlink is created android app release is failing, for :
`./gradlew assembleRelease`
the `:app:bundleReleaseJsAndAssets` returns :
```
FAILURE: Build failed with an exception.

* What went wrong:
Could not list contents of '<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.
```
Related issues:
#14417
#14464
#14548

1. Create new project with `react-native init <YOUR-APP>`
2. cd `<YOUR-APP>/`
3. Run app on iOS `react-native run-ios` so `scripts/ios-install-third-party.sh` is executed.
4. cd `android/`
5. Run android app release `./gradlew assembleRelease` (it will work properly after this fix and fail if the `test-driver` symlink exists)

IMHO we should resolve the issue with this quick fix and apply the proper fix later after the new version of `google/glog` will be released.
The proper cleanup of files generated by autotools was already applied : google/glog#188

Please let me know if I should provide more details : javache, mhorowitz, hramos
Closes #14638

Differential Revision: D5292362

Pulled By: javache

fbshipit-source-id: 81ff2273420ea078d624a76e781a5b67b96e6a4e
@ringo22
Copy link

ringo22 commented Oct 22, 2017

@itinance thanks for the answer, for me worked fine!

@facebook facebook locked as resolved and limited conversation to collaborators Jun 9, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests