react-native: Could not list contents of '/third-party/glog-0.3.4/test-driver' - Android Release

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?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 42
  • Comments: 15 (2 by maintainers)

Commits related to this issue

Most upvoted comments

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

also having this issue

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.

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

Same issue over here, fix by @itinance works 🔥

I’m also having this issue.

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

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 https://github.com/facebook/react-native/issues/14382 was fixed in 0.46.3