You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes during setInputState, I get this error, which crashes the app on release APK builds: Error: dispatchViewManagerCommand: found null reactTag, js engine: hermes
I managed to fix it by adding a null check in this file Rive.tsx, but I'm not sure why this occurs yet.
const setInputState = useCallback<RiveRef['setInputState']>(
(triggerStateMachineName, inputName, value) => {
// added null check
let nodeHandle = findNodeHandle(riveRef.current);
if(nodeHandle === null) {
console.error('RiveRef is not available');
return;
}
if (typeof value === 'boolean') {
UIManager.dispatchViewManagerCommand(
findNodeHandle(riveRef.current),
ViewManagerMethod.setBooleanState,
[triggerStateMachineName, inputName, value]
);
} else if (typeof value === 'number') {
UIManager.dispatchViewManagerCommand(
findNodeHandle(riveRef.current),
ViewManagerMethod.setNumberState,
[triggerStateMachineName, inputName, value]
);
}
},
[]
);
The text was updated successfully, but these errors were encountered:
Sometimes during setInputState, I get this error, which crashes the app on release APK builds:
Error: dispatchViewManagerCommand: found null reactTag, js engine: hermes
I managed to fix it by adding a null check in this file
Rive.tsx
, but I'm not sure why this occurs yet.The text was updated successfully, but these errors were encountered: