diff --git a/packages/react-native-sdk/docusaurus/docs/reactnative/common-content/setup/installation/EventTargetShimWorkaround.jsx b/packages/react-native-sdk/docusaurus/docs/reactnative/common-content/setup/installation/EventTargetShimWorkaround.jsx deleted file mode 100644 index 32dd765046..0000000000 --- a/packages/react-native-sdk/docusaurus/docs/reactnative/common-content/setup/installation/EventTargetShimWorkaround.jsx +++ /dev/null @@ -1,94 +0,0 @@ -import React from 'react'; -import CodeBlock from '@theme/CodeBlock'; - -const forExpo = `const {getDefaultConfig} = require('expo/metro-config'); -const resolveFrom = require("resolve-from"); - -const config = getDefaultConfig(__dirname); - -config.resolver.resolveRequest = (context, moduleName, platform) => { - if ( - // If the bundle is resolving "event-target-shim" from a module that is part of "react-native-webrtc". - moduleName.startsWith("event-target-shim") && - context.originModulePath.includes("react-native-webrtc") - ) { - // Resolve event-target-shim relative to the react-native-webrtc package to use v6. - // React Native requires v5 which is not compatible with react-native-webrtc. - const eventTargetShimPath = resolveFrom( - context.originModulePath, - moduleName - ); - - return { - filePath: eventTargetShimPath, - type: "sourceFile", - }; - } - - // Ensure you call the default resolver. - return context.resolveRequest(context, moduleName, platform); -}; - -module.exports = config; -`; - -const forVanilla = `const {getDefaultConfig} = require('@react-native/metro-config'); -const resolveFrom = require("resolve-from"); - -const config = getDefaultConfig(__dirname); - -config.resolver.resolveRequest = (context, moduleName, platform) => { - if ( - // If the bundle is resolving "event-target-shim" from a module that is part of "react-native-webrtc". - moduleName.startsWith("event-target-shim") && - context.originModulePath.includes("react-native-webrtc") - ) { - // Resolve event-target-shim relative to the react-native-webrtc package to use v6. - // React Native requires v5 which is not compatible with react-native-webrtc. - const eventTargetShimPath = resolveFrom( - context.originModulePath, - moduleName - ); - - return { - filePath: eventTargetShimPath, - type: "sourceFile", - }; - } - - // Ensure you call the default resolver. - return context.resolveRequest(context, moduleName, platform); -}; - -module.exports = config; -`; - -export default function Workaround({ isExpo }) { - if (isExpo) { - return ( - <> -

- This occurs on Expo 50+. React Native uses{' '} - event-target-shim@5 which is not compatible with{' '} - react-native-webrtc's dependency on{' '} - event-target-shim@6. To fix this, you may need to add a{' '} - redirection in your metro.config.js file: -

- {forExpo} - - ); - } - - return ( - <> -

- This occurs on RN 0.73+. React Native uses{' '} - event-target-shim@5 which is not compatible with{' '} - react-native-webrtc's dependency on{' '} - event-target-shim@6. To fix this, you may need to add a{' '} - redirection in your metro.config.js file: -

- {forVanilla} - - ); -} diff --git a/packages/react-native-sdk/docusaurus/docs/reactnative/common-content/setup/installation/troubleshooting.mdx b/packages/react-native-sdk/docusaurus/docs/reactnative/common-content/setup/installation/troubleshooting.mdx index 2f0316fbdd..182ed4dd73 100644 --- a/packages/react-native-sdk/docusaurus/docs/reactnative/common-content/setup/installation/troubleshooting.mdx +++ b/packages/react-native-sdk/docusaurus/docs/reactnative/common-content/setup/installation/troubleshooting.mdx @@ -1,14 +1,13 @@ import NotifeeWorkaround from "./NotifeeWorkaround" -import EventTargetShimWorkaround from "./EventTargetShimWorkaround" ### Troubleshooting #### Error: Super expression must either be null or a function - +This was a [known issue](https://github.com/react-native-webrtc/react-native-webrtc/issues/1503) in `@stream-io/react-native-webrtc` library. -**Reference**: https://github.com/react-native-webrtc/react-native-webrtc/issues/1503 +It has been fixed on version `118.1.0` of the `@stream-io/react-native-webrtc` library. #### Android Only Error: Could not find any matches for app.notifee:core:+ as no versions of app.notifee:core are available. @@ -18,6 +17,6 @@ import EventTargetShimWorkaround from "./EventTargetShimWorkaround" #### Android Only Error: One of receiver_exported or receiver_not_exported -This occurs due to having `targetSdk 34` in Android. This is a [known issue in `react-native-incall-manager`](https://github.com/react-native-webrtc/react-native-incall-manager/issues/235) library. You can temporarily workaround this by downgrading your `targetSdk` to `33` until this issue is resolved. +This was a [known issue](https://github.com/react-native-webrtc/react-native-incall-manager/issues/235) in `react-native-incall-manager` library. -**Reference**: https://github.com/GetStream/stream-video-js/issues/1263 \ No newline at end of file +It has been fixed on version `4.2.0` of the `react-native-incall-manager` library. \ No newline at end of file