Can't trigger Native crashes with expo-sentry?

Hi @arohan, @larson3 and @bkamrani

Try this as a workaround, at least on Android. The following crashes reliably for me, and it’s a native crash:

import { useState } from 'react';
import { StatusBar } from 'expo-status-bar';
import { Button, StyleSheet, Text, View } from 'react-native';

export default function App() {
  const [pressed, setPressed] = useState(false);

  const onPress = () => {
    setPressed(!pressed);
  };

  return (
    <View style={styles.container}>
      <Button title="Crash!" onPress={onPress} />
      {pressed && <Text style={{width: "crash!"}}>Did I crash?</Text>}
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

I have not tried it with Sentry, though.

05-11 01:16:27.049 25915 25915 E AndroidRuntime: FATAL EXCEPTION: main
05-11 01:16:27.049 25915 25915 E AndroidRuntime: Process: host.exp.exponent, PID: 25915
05-11 01:16:27.049 25915 25915 E AndroidRuntime: java.lang.IllegalStateException: abi45_0_0.com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 889
05-11 01:16:27.049 25915 25915 E AndroidRuntime:  detail: View tag:875 View Type:class abi45_0_0.com.facebook.react.views.view.ReactViewGroup
05-11 01:16:27.049 25915 25915 E AndroidRuntime:   children(2): [
05-11 01:16:27.049 25915 25915 E AndroidRuntime: 867,873,
05-11 01:16:27.049 25915 25915 E AndroidRuntime:  ],
05-11 01:16:27.049 25915 25915 E AndroidRuntime:   viewsToAdd(1): [
05-11 01:16:27.049 25915 25915 E AndroidRuntime: [2,889],
05-11 01:16:27.049 25915 25915 E AndroidRuntime:  ],
05-11 01:16:27.049 25915 25915 E AndroidRuntime:
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:6)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:2)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:7)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:1)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at android.view.Choreographer.doCallbacks(Choreographer.java:761)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at android.view.Choreographer.doFrame(Choreographer.java:693)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:873)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:214)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7050)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
05-11 01:16:27.049 25915 25915 E AndroidRuntime: Caused by: abi45_0_0.com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 889
05-11 01:16:27.049 25915 25915 E AndroidRuntime:  detail: View tag:875 View Type:class abi45_0_0.com.facebook.react.views.view.ReactViewGroup
05-11 01:16:27.049 25915 25915 E AndroidRuntime:   children(2): [
05-11 01:16:27.049 25915 25915 E AndroidRuntime: 867,873,
05-11 01:16:27.049 25915 25915 E AndroidRuntime:  ],
05-11 01:16:27.049 25915 25915 E AndroidRuntime:   viewsToAdd(1): [
05-11 01:16:27.049 25915 25915 E AndroidRuntime: [2,889],
05-11 01:16:27.049 25915 25915 E AndroidRuntime:  ],
05-11 01:16:27.049 25915 25915 E AndroidRuntime:
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:35)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.host.exp.exponent.modules.api.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.manageChildren(ReanimatedNativeHierarchyManager.java:2)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:1)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:19)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:10)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.uimanager.UIViewOperationQueue.access$2600(UIViewOperationQueue.java:1)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:6)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        at abi45_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:1)
05-11 01:16:27.049 25915 25915 E AndroidRuntime:        ... 13 more