Closed ashtonlance closed 7 years ago
Hi Ashton,
Thanks for trying out the platform.
Quick question are you attempting to do a release or debug build of the app?
Thanks,
@achuvm a release build! Of the Gear VR flavor specifically.
Hi @atlance01
Can you try running just ./gradlew bundleOvrReleaseJsAndAssets
within your /android
directory to build just the OVR release bundle.
Thanks,
@achuvm sure!
Here's what I got:
~/Development/ViroSample/android master* ❯ ./gradlew bundleOvrReleaseJsAndAssets NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /Users/ashtonl/Development/Android/ndk-bundle. If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
Incremental java compilation is an incubating feature. :app:mergeOvrReleaseShaders UP-TO-DATE :app:compileOvrReleaseShaders UP-TO-DATE :app:generateOvrReleaseAssets UP-TO-DATE :app:preBuild UP-TO-DATE :app:preOvrReleaseBuild UP-TO-DATE :app:checkOvrReleaseManifest :app:preGvrDebugBuild UP-TO-DATE :app:preGvrReleaseBuild UP-TO-DATE :app:preOvrDebugBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2500Library :app:prepareComAndroidSupportAppcompatV72500Library :app:prepareComAndroidSupportRecyclerviewV72340Library :app:prepareComAndroidSupportSupportCompat2500Library :app:prepareComAndroidSupportSupportCoreUi2500Library :app:prepareComAndroidSupportSupportCoreUtils2500Library :app:prepareComAndroidSupportSupportFragment2500Library :app:prepareComAndroidSupportSupportMediaCompat2500Library :app:prepareComAndroidSupportSupportV42500Library :app:prepareComAndroidSupportSupportVectorDrawable2500Library :app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library :app:prepareComFacebookFrescoDrawee0110Library :app:prepareComFacebookFrescoFbcore0110Library :app:prepareComFacebookFrescoFresco0110Library :app:prepareComFacebookFrescoImagepipeline0110Library :app:prepareComFacebookFrescoImagepipelineBase0110Library :app:prepareComFacebookFrescoImagepipelineOkhttp30110Library :app:prepareComFacebookReactReactNative0412Library :app:prepareComFacebookSoloaderSoloader010Library :app:prepareComGoogleAndroidExoplayerExoplayerR220Library :app:prepareOrgWebkitAndroidJscR174650Library :app:prepareViroSampleGvr_commonUnspecifiedLibrary :app:prepareViroSampleReact_viroUnspecifiedLibrary :app:prepareViroSampleViro_rendererUnspecifiedLibrary :app:prepareOvrReleaseDependencies :app:mergeOvrReleaseAssets UP-TO-DATE :app:compileOvrReleaseRenderscript UP-TO-DATE :app:generateOvrReleaseResValues UP-TO-DATE :app:generateOvrReleaseResources UP-TO-DATE :app:mergeOvrReleaseResources UP-TO-DATE :app:bundleOvrReleaseJsAndAssets Loading dependency graph, done. Warning: The transform cache was reset.
'node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon@4x.android.png' could not be found, because 'node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets' is not a subdirectory of any of the roots ('/Users/ashtonl/Development/ViroSample')
:app:bundleOvrReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:bundleOvrReleaseJsAndAssets'.
Process 'command 'node'' finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 57.382 secs
Hi @atlance01
It sounds like that file is missing so either 1) a different version of react-native is being used or 2) your current installation of react-native was somehow corrupted.
To address the first issue, open your package.json
file in your project root and ensure that you're targeting "react-native": "0.41.2"
. If not, then change it and also blow away your node_modules/
directory and re-run npm install
.
To address the second issue, can you try blowing away your node_modules/
directory and re-run npm install
.
Let me know if that works!
Thanks for your help!
My package.json showed that I was running the correct version of react-native
So, I wiped out my node_modules folder. Ran npm install again and tada! I should've known - when in doubt, do a node_module reinstall.
So I've got my release OVR running on my phone right now - but none of my videos are playing. They're 720p mp4 360 videos. Any ideas?
Hi @atlance01
I'm glad that works!
We're not aware of any issues with 360 Video Playback, but to be sure, can you check the device logs to see if there are any errors? Attaching the logs here for us to look at would maybe be helpful too.
Do the videos work on other Viro supported platforms? (iOS Cardboard, Android Cardboard, etc)
Thanks,
Well I'm back to my original issue now - I'm trying to build a new version number and I'm getting my old error again. This time, wiping out the node_modules folder doesn't seem to help :(
What else could be going on? What could be causing that module to keep getting corrupted?
Hmm, I'm stumped that you're getting the exact same error and the wiping away doesn't help...
The ./gradlew bundleOvrReleaseJsAndAssets
command processes your .js
files and copies and adds your assets to the android build directories under /android/build
and /android/app/build
.
Maybe you can try removing them and rebuilding your app?
If the error is different, I'd like to see that.
I'll continue to think more about it and let me know if you discover anything else or if the above worked/didn't work.
@achuvm This morning, I tried updating to Viro 1.1.0, killing all my node modules and wiping out 'android/build' and '/android/app/build' and I'm still getting the same old error!
'node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon@4x.android.png' could not be found, because 'node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets' is not a subdirectory of any of the roots ('/Users/ashtonl/Development/ViroSample')
:app:bundleGvrReleaseJsAndAssets FAILED
@achuvm Update: I created a new Viro project, then immediately ran the asset bundler and everything worked out fine. Then, I copied over my javascript from my old files and BAM! build failed?
My repo is here: https://github.com/atlance01/ViroVRapp
Is there something wrong with my files?
Hi @atlance01 ,
I pulled the repo and ran ./gradlew bundleOvrReleaseJsAndAssets
just fine, although since your video files weren't included in the repo, I changed them to one of our own assets.
I noticed that the videos you do have in the js files have dashes and spaces, etc. Can you try renaming them to something simply alphanumeric ie. VIP 360 VR Montage 03-30-2017 1920x1080.mp4
-> VIP360VRMontage.mp4
? I suspect this is possibly an issue, although, not sure why this could cause an error trace like the one you posted above.
If this works, then it's due to how React Native bundles its "assets" by actually placing it into the Android resources directories which cause all sorts of other problems because Android resources have a lot more restrictions on filename/filename collisions than Android assets.
Thanks,
@achuvm ,
First off, I wanna thank you for working so much with me on this. I really wanna get this up and running!
So I tried changing the filenames of the videos as you suggested... and still the same error. I've updated my repo with the latest changes. When you pulled down my repo earlier, were you able to build more than once? It seems like the first build might be okay and then things are getting wonky from there?
Could there be a node version or npm version conflict or anything? I'm running node v7.8.0 with whatever version of npm that comes with it.
@atlance01
It's no problem at all, we just want to see you guys build something awesome :).
To answer your question, I was able to run ./gradlew bundleOvrReleaseJsAndAssets
more than once, with and without removing my /android/build/
and /android/app/build/
directories.
The node/npm version I'm using is:
~/ext-workspace/ViroVRapp$ node -v
v6.6.0
~/ext-workspace/ViroVRapp$ npm -v
4.4.4
I'll try updating my node version and see if I encounter this issue on my end.
In the meantime, can you confirm if you do have the file
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon@4x.android.png
in your project when you encounter the issue?
I also realized that I'm currently still on react-viro 1.0.0 based on the package.json, but you were running into this issue regardless of react-viro version.
Thanks!
I do indeed have that asset! Now the packager is throwing the same error when I try to run the testbed app too.
Closing this issue due to lack of activity.
Feel free to reopen this issue, create another issue or contact us at support@viromedia.com.
Thanks!
Okay, I really need some help here.
I've successfully created and installed my "cardboard release" app on my iPhone.
Getting it over to Android for the GearVR is a whole other story. So, when I run from the testbed app or I just run a debug app on my Android - everything works (more or less - the 360videos never load but I'm chalking that up the network). I do have an oculus signature at android/app/src/assets
So I've tried building a release and signing in through Android Studio. Everything seems to install okay - but it crashes on launch. So I ran adb logcat and saw that as soon as it crashes and I'm seeing:
So a quick Google regarding BatchedBridge not being found - I see people saying that I need to run react-native start (which worked okay okay) and then run
cd android && ./gradlew assembleRelease
- this gets me as far as this bit of code: