React navigation makes the app crash when going back from ViroARSceneNavigator
I have a Main navigator with multiple screens where one of them is ViroARSceneNavigator that has an ViroARScene with ViroArImageMarker that displayes a Video on top of the image when recognized.
When i go back from this scene to the previous screen app closes immidietly. Also some methods like onAnchorRemoved doesnt work.
I was using react native 0.76 before because this library was not working with latest version but after forking the library and made some changes it is working on latest react native now. Still the app crashes. Is there any solution or advice ? Thanks in advance!
Hi @anxheloo,
We're currently testing version 2.43.1 with the community, and this update should resolve this issue.
If you'd like to join our beta program and test 2.43.1 to ensure this issue is resolved ahead of release then you can do so here: https://discord.gg/6fAu7kFr
+1 Facing this issue
I am adding a simple ViroARSceneNavigator and ViroARScene to a modal.
When I close the modal, the app crashes. Will follow this issue and the 2.43.1 testing for updates.
Hi @oliedis ,
Does this beta version supports react native latest version?
Till now i forked the current available update and changed some files in order to use it with react 19 and react native 0.79.
+1 Facing this issue
I am adding a simple ViroARSceneNavigator and ViroARScene to a modal.
When I close the modal, the app crashes. Will follow this issue and the 2.43.1 testing for updates.
On Ios keep crashing, while on android is better. try adding some conditional rendering also on the SceneNavigator itself
Hey,
Are you still experiencing the issue on iOS when running the Beta of 2.43.1?
If so, please can you report the issue within the Beta-testing channel on Discord. We can then DM with you to better understand your environment and setup as others are no longer reporting this issue in the Beta.
Oliver Edis
CEO
On Wed, 18 Jun 2025, 10:31 anxheloo, @.***> wrote:
anxheloo left a comment (ReactVision/viro#350) https://github.com/ReactVision/viro/issues/350#issuecomment-2983414682
+1 Facing this issue
I am adding a simple ViroARSceneNavigator and ViroARScene to a modal.
When I close the modal, the app crashes. Will follow this issue and the 2.43.1 testing for updates.
On Ios keep crashing, while on android is better. try adding some conditional rendering also on the SceneNavigator itself
โ Reply to this email directly, view it on GitHub https://github.com/ReactVision/viro/issues/350#issuecomment-2983414682, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZWUVBXYMC326Z2GZXEKSL3EEWVJAVCNFSM6AAAAAB7JEPSYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBTGQYTINRYGI . You are receiving this because you were mentioned.Message ID: @.***>
I am not able to install it at all.
I am getting :
warn tarball tarball data for file:reactvision-react-viro-2.43.1.tgz (null) seems to be corrupted. Trying again.
Error: ENOENT: no such file or directory, open '/Users/anxhelocenollari/Desktop/Bunkart/reactvision-react-viro-2.43.1.tgz'
The other problem i have is that i forked and used it before with react 19 and react native latest. But it still doesnt work with latest version.
@oliedis It still gives freeze on android when i navigate back from the ar screen. The error only happens when i have rendered an ViroARImageMarker inside an ViroARScene. When i track the source and show a video , than i try to go back, it freezes. But if i dont track the image and go back it works.
This is my ViroArSceneNavigator:
<View style={StyleSheet.absoluteFill}> <View style={styles.container}> {remoteVideoUrl && ( <ViroARSceneNavigator ref={sceneRef} numberOfTrackedImages={1} autofocus initialScene={{ scene: ArScene, }} style={styles.container} /> )} </View> </View>
This is my ArScene:
<ViroARScene onTrackingUpdated={handleTrackingUpdated}> <ViroARImageMarker target="targetOne" onAnchorFound={handleAnchorFound} onAnchorRemoved={handleAnchorRemoved}> <ViroNode rotation={[-90, 0, 0]}> <ViroVideo source={videoPath} height={0.1 * (4 / 3)} width={0.1} position={[0, 0, 0]} scale={[1, 1, 1]} loop={true} muted={false} volume={1} visible={true} /> </ViroNode> </ViroARImageMarker> <ViroARImageMarker target="targetTwo" onAnchorFound={handleAnchorFound} onAnchorRemoved={handleAnchorRemoved}> <ViroNode rotation={[-90, 0, 0]}> <ViroVideo source={videoPath2} width={0.1} height={0.1} position={[0, 0, 0]} scale={[1, 1, 1]} loop={true} muted={false} volume={1} visible={true}/> </ViroNode> </ViroARImageMarker> </ViroARScene>
Also handleAnchorRemoved is not working at all
Are you having this issue with the beta version though? It sounds like you can't install the bets version?
Oliver Edis
CEO
On Wed, 18 Jun 2025, 14:28 anxheloo, @.***> wrote:
anxheloo left a comment (ReactVision/viro#350) https://github.com/ReactVision/viro/issues/350#issuecomment-2984216828
@oliedis https://github.com/oliedis It still gives freeze on android when i navigate back from the ar screen. The error only happens when i have rendered an ViroARImageMarker inside an ViroARScene. When i track the source and show a video , than i try to go back, it freezes. But if i dont track the image and go back it works. This is my ViroArSceneNavigator: {remoteVideoUrl && ( )} ,
This is my ArScene:
<ViroNode rotation={[-90, 0, 0]}> <ViroVideo source={videoPath} height={0.1 * (4 / 3)} width={0.1} position={[0, 0, 0]} scale={[1, 1, 1]} loop={true} muted={false} volume={1} visible={true} />
<ViroARImageMarker target="targetTwo" onAnchorFound={handleAnchorFound} onAnchorRemoved={handleAnchorRemoved}> <ViroNode rotation={[-90, 0, 0]}> <ViroVideo source={videoPath2} width={0.1} height={0.1} position={[0, 0, 0]} scale={[1, 1, 1]} loop={true} muted={false} volume={1} visible={true} /> </ViroNode> </ViroARImageMarker> </ViroARScene>. Also handleAnchorRemoved is not working at all.
โ Reply to this email directly, view it on GitHub https://github.com/ReactVision/viro/issues/350#issuecomment-2984216828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZWUVGK6HVG6HU74Y2PER33EFSPLAVCNFSM6AAAAAB7JEPSYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBUGIYTMOBSHA . You are receiving this because you were mentioned.Message ID: @.***>
@oliedis I am not able to install the bets version. Error: warn tarball tarball data for file:reactvision-react-viro-2.43.1.tgz (null) seems to be corrupted. Trying again. Error: ENOENT: no such file or directory, open '/Users/anxhelocenollari/Desktop/Bunkart/reactvision-react-viro-2.43.1.tgz'
Am i missing something? Should i download the whole project, make changes to be compatible with react 19 and latest react native and than host it in my github and than install?
@oliedis I cloned the whole viro repo, changed the branch to na-validation-Eduardo, changed the versions of react and react native to have it compatible with react 19 and react native 0.79. Added React.JSX.Element as return type in typescript but i am getting: Viro: New Architecture is not enabled. This library requires React Native New Architecture. But i am already using new Architecture since im using react 19 and react native 0.79. Note: i had the library installed before by forking the main repo and make changes to the versions and files i mentioned above. With the forked version it crashes completly on ios when going back while on the beta version modified gives the new architecture error.
@oliedis I am also happy to check if this issue persists with the BETA Version. After installing the beta version with Expo 52/React Native 0.76.9/React 18.3.1, I am observing the Folly error that was shared in the Discord Beta testing channel.
โ (ios/Pods/Headers/Public/RCT-Folly/folly/portability/Config.h:20:10)
18 |
19 | #ifndef FOLLY_NO_CONFIG
> 20 | #include <folly/folly-config.h>
| ^ 'folly/folly-config.h' file not found
21 | #endif
22 |
23 | #if __has_include(<features.h>)
โบ Compiling @reactvision/react-viro Pods/ViroFabric ยป ViroFabricContainerManager.mm
โบ Compiling @reactvision/react-viro Pods/ViroFabric ยป ViroFabricContainerComponentView.mm
โ (ios/Pods/Headers/Public/RCT-Folly/folly/portability/Config.h:20:10)
18 |
19 | #ifndef FOLLY_NO_CONFIG
> 20 | #include <folly/folly-config.h>
| ^ 'folly/folly-config.h' file not found
21 | #endif
22 |
23 | #if __has_include(<features.h>)
I saw your announcement and Eduardo's messages that the Folly error is resolved in the next Beta version coming in 1-2 days. I will wait and try again with the new Beta version.
Any luck with this issue? I downgraded to 2.41.6 but same crash.
I simply cannot navigate back from AR Scene.
The team is currently working on a new version Solving all the bugs. Patience, they will have soon a new version
Any solution to the crash related to unmountin scene? It seems to still happen sometimes with the new release version 2.43.4