shakebugs / shake-react-native

Bug reporting SDK for React Native apps.
https://shakebugs.com
12 stars 1 forks source link

Android not working with Expo 52 #8

Open deelo55 opened 5 days ago

deelo55 commented 5 days ago

When running with android and expo 52 (works fine with expo 51) I get the following error:

Error: Exception in HostObject::get for prop 'RNShake': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: RNShake. Details: Module exports two methods to JavaScript with the same name: "show

import Shake from "@shakebugs/react-native-shake";
import { StatusBar } from "expo-status-bar";
import { useEffect } from "react";
import { Platform, StyleSheet, Text, View } from "react-native";
export default function App() {
  useEffect(() => {
    const initShake = async () => {
      if (Platform.OS === "ios") {
        Shake.start("xxx");
      }
      if (Platform.OS === "android") {
        Shake.start("xxx");
      }
    };
     initShake();
  }, []);

  return (
    <View style={styles.container}>
      <Text>Open up App.tsx to start working on your app!</Text>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});
mstanic-shake commented 5 days ago

In Expo 52, New architecture is enabled by default. Shake still doesn't support new architecture, we are looking forward to support it in next 2-3 weeks.

gezquinndesign commented 3 days ago

@mstanic-shake Does this mean that Shake now works on Expo? I must have missed the announcement.