The application crashes completely when captchaRef.current?.show() is called in the ExposureScannerScreen component.
Platform: React Native Expo (iOS/Android)
Environment:
"@hcaptcha/react-native-hcaptcha": "2.1.0",
"react": "19.1.0",
"react-native": "0.81.5",
"expo": "54.0.0",
"react-native-modal": "14.0.0-rc.0",
"react-native-webview": "13.16.0"
Implementation:
import ConfirmHcaptcha from '@hcaptcha/react-native-hcaptcha';
const captchaRef = useRef<React.ComponentRef<typeof ConfirmHcaptcha>>(null);
// Triggers crash on React 19
captchaRef.current?.show();
<ConfirmHcaptcha
hasBackdrop={false}
ref={captchaRef}
siteKey={siteKey}
baseUrl={baseUrl}
languageCode="en"
size="invisible"
onMessage={onCaptchaMessage}
/>
Attempted Workarounds patching with patch-package:
We attempted comprehensive patches to remove PropTypes and fix imports in:
@hcaptcha/react-native-hcaptcha (both Hcaptcha.js and index.js)
react-native-modal (dependency)
react-native-animatable (dependency of modal)
Result: App still crashes silently, likely due to deeper React 19 incompatibilities in the modal rendering or native bridge.
The application crashes completely when captchaRef.current?.show() is called in the ExposureScannerScreen component.
Platform: React Native Expo (iOS/Android)
Environment:
Implementation:
Attempted Workarounds patching with patch-package:
We attempted comprehensive patches to remove PropTypes and fix imports in:
@hcaptcha/react-native-hcaptcha(both Hcaptcha.js and index.js)react-native-modal(dependency)react-native-animatable(dependency of modal)Result: App still crashes silently, likely due to deeper React 19 incompatibilities in the modal rendering or native bridge.