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

Could not list contents of '/third-party/glog-0.3.4/test-driver' - Android Release #14464

Closed
ben-snaize opened this issue Jun 12, 2017 · 15 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ben-snaize
Copy link

ben-snaize commented Jun 12, 2017

Scenario
When creating an Android release APK, the error Could not list contents of '/Users/user/project/node_modules/react-native/third-party/glog-0.3.4/test-driver' is encountered which causes the build to fail.

Steps to Reproduce
npm i react-native@0.45 --save
cd android && ./gradlew assembleRelease && ./gradlew installRelease

There is a folder named third-party-podspecs that contains the GLog.podspec. This probably gets expanded into another folder, third-party on build. Inside of this, there is a file under glog-0.3.4/test-driver which appears to be an alias that does not resolve.

screen shot 2017-06-12 at 10 03 32

There is a temporary fix which is to delete the third-party folder. Please can we look at getting this one corrected?

@ms88privat
Copy link

#14417

@nehvaleem
Copy link

also having this issue

@g4laura
Copy link

g4laura commented Jun 18, 2017

I'm also having this issue.

@itinance
Copy link
Contributor

itinance commented Jun 18, 2017

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

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

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

kelset commented Jul 4, 2017

Same issue over here, fix by @itinance works 🔥

@tapz
Copy link

tapz commented Jul 12, 2017

In addition to unlinking, I also had to remove third-party/glog-0.3.4 in the project root.

I'm using RN 0.46.1 and Yarn.

@ujwal-setlur
Copy link

With RN 0.46.3, @itinance solution worked for me.

@ujwal-setlur
Copy link

ujwal-setlur commented Jul 14, 2017

This issue occurs in 0.46.3 only if you do an android build after you do an iOS build. That link gets created during the iOS build. If you do an android build after a fresh npm install, it's fine.

It's ironic that I ran into this issue after I upgraded after #14382 was fixed in 0.46.3

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
@ujwal-setlur
Copy link

Please see 5c53f89#commitcomment-23107918

@ujwal-setlur
Copy link

This is fixed in master branch. Guess we need to wait for 0.47.0

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

hramos commented Sep 21, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Sep 21, 2017
@hramos hramos closed this as completed Sep 21, 2017
@alexgvozden
Copy link

issue does happen, I deleted the folder third_party and it worked...
I have this issue with XCode too which running ios-install-glog solves

@brianinator
Copy link

After unlink, I ran the command and get stuck at :app:bundleReleaseJsAndAssets #10078

@tspringborg
Copy link

tspringborg commented Apr 12, 2018

I am also experiencing this issue.

tried cleaning with

yarn run clean
rm -rf node_modules
yarn install
rm -rf android/.gradle
rm -rf android/build
rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache verify
rm -rf $TMPDIR/haste-map-react-native-packager-*

But still getting Could not list contents of '/Users/.../sammenholdetapp/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.

did unlink third-party/glog-0.3.4/test-driver and that seemed to work

@thomashagstrom
Copy link

We're on react-native 0.55.3 and get this for release build Android, so I don't understand why it's closed.

We have no node_modules/react-native/third-party folder, as seen in screenshot.

gradlew assembleRelease -s

FAILURE: Build failed with an exception.

  • What went wrong:
    Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.

Could not list contents of '/Users/thomas/Source/ParkeraApp.React/mobile/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.

  • Try:
    Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Exception is:
    org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.

package_json

@facebook facebook locked as resolved and limited conversation to collaborators Sep 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 21, 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