cometchat / cometchat-uikit-react-native

Ready-to-use Chat UI Components for React Native
https://www.cometchat.com
Other
40 stars 25 forks source link

Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). #59

Closed ChiragAtharva closed 8 months ago

ChiragAtharva commented 8 months ago

Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication).

We are getting below error Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. ERROR Error: Requiring module "node_modules/@cometchat/chat-uikit-react-native/src/index.ts", which threw an exception: Invariant Violation: Invalid prop color supplied to StyleSheet titleStyle: rgba(20, 20, 20) Valid color formats are

  • '#f0f' (#rgb)
  • '#f0fc' (#rgba)
  • '#ff00ff' (#rrggbb)
  • '#ff00ff00' (#rrggbbaa)
  • 'rgb(255, 255, 255)'
  • 'rgba(255, 255, 255, 1.0)'
  • 'hsl(360, 100%, 100%)'
  • 'hsla(360, 100%, 100%, 1.0)'
  • 'transparent'
  • 'red'
  • 0xff00ff00 (0xrrggbbaa) StyleSheet titleStyle: { "opacity": 1, "color": "rgba(20, 20, 20)", "fontStyle": "normal", "letterSpacing": -0.1, "textAlign": "left", "lineHeight": 18 } WARN Attempted to register RCTBridgeModule class RCTVideoManager for the name 'VideoManager', but name was already registered by class CometChatVideoManager ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. ERROR TypeError: undefined is not an object (evaluating 'S.CometChat.appSettings.shouldAutoEstablishSocketConnection') ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. LOG Unable to symbolicate stack trace: The stack is null LOG Unable to symbolicate stack trace: The stack is null Error: Unable to resolve module ./Libraries/Components/AccessibilityInfo/AccessibilityInfo from /Users/chiragp/Desktop/Projects/platformmarketplacejp-345732-react-native/src/node_modules/react-native/index.js:
Screenshot 2024-02-21 at 3 11 13 PM

App is crashing

After init library and setting it, app should run properly.

Reproduction

Environment

System: OS: macOS 14.3.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 17.75 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm Watchman: Not Found Managers: CocoaPods: 1.12.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2 Android SDK: Not Found IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9619390 Xcode: 15.2/15C500b - /usr/bin/xcodebuild Languages: Java: 15.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: file:./packages/blocks/core/node_modules/react-native => 0.64.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Other react-native versions and libraries

"@cometchat/chat-sdk-react-native": "4.0.4", "@cometchat/chat-uikit-react-native": "4.0.2", "@types/node": "18.11.19" "@types/react": "17.0.2", "@types/react-native": "0.66.1", "react-native": "0.64.4",

And Please let us know the minimum requirement of all version that can run the '@cometchat/chat-uikit-react-native' library

We don't want to upgrade react-native version and want to go with "react-native": "0.64.4"

cometchat-helpcenter-bot commented 8 months ago

Rosanne Fernando (CometChat Team) replied:

Hey Chirag,

Thanks for reaching out! I am Rosanne from the Support team. 🙂

Please allow me some time while I check this internally with the team and circle back to you with more information.

Appreciate your patience.

Rosanne Fernando CometChat

cometchat-helpcenter-bot commented 8 months ago

Rosanne Fernando (CometChat Team) replied:

Hello Chirag,

Can you please upgrade to the latest version of the SDK - 4.0.5 and UI kit - 4.2.0 and check if you are facing the same issue?

Regards.

Rosanne Fernando CometChat

ChiragAtharva commented 8 months ago

Rosanne Fernando (CometChat Team) replied:

Hello Chirag,

Can you please upgrade to the latest version of the SDK - 4.0.5 and UI kit - 4.2.0 and check if you are facing the same issue?

Regards.

Rosanne Fernando CometChat

Hi Rosanne Fernando, CometChat I have tried with version update as you suggested

"@cometchat/chat-sdk-react-native": "4.0.5", "@cometchat/chat-uikit-react-native": "4.2.0",

but still getting same error as screenshot shared earlier

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. ERROR Error: Requiring module "node_modules/@cometchat/chat-uikit-react-native/src/index.ts", which threw an exception: Invariant Violation: Invalid prop color supplied to StyleSheet titleStyle: rgba(20, 20, 20) Valid color formats are

StyleSheet titleStyle: { "opacity": 1, "color": "rgba(20, 20, 20)", "fontStyle": "normal", "letterSpacing": -0.1, "textAlign": "left", "lineHeight": 18 } WARN Attempted to register RCTBridgeModule class RCTVideoManager for the name 'VideoManager', but name was already registered by class CometChatVideoManager ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. ERROR TypeError: undefined is not an object (evaluating 'S.CometChat.appSettings.shouldAutoEstablishSocketConnection') ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. LOG Unable to symbolicate stack trace: The stack is null LOG Unable to symbolicate stack trace: The stack is null Error: Unable to resolve module ./Libraries/Components/AccessibilityInfo/AccessibilityInfo from /Users/chiragp/Desktop/Projects/platformmarketplacejp-345732-react-native/src/node_modules/react-native/index.js:

For reminding we are using react-native:0.64.4

ChiragAtharva commented 8 months ago

Hi CometChat team,

Please provide your suggestions to use the minimum versions for all supporting libraries, so we can work further.

cometchat-helpcenter-bot commented 8 months ago

Keagan (CometChat Team) replied:

Hello Chirag,

I believe the Issue has been fixed in the version shared with you earlier. Can you please update to the latest version of the SDK - 4.0.5 and UI kit - 4.2.0 and let us know if this fixes the Issue you are facing.

Regards

Keagan Ellis CometChat

ChiragAtharva commented 8 months ago

Rosanne Fernando (CometChat Team) replied: Hello Chirag, Can you please upgrade to the latest version of the SDK - 4.0.5 and UI kit - 4.2.0 and check if you are facing the same issue? Regards. Rosanne Fernando CometChat

Hi Rosanne Fernando, CometChat I have tried with version update as you suggested

"@cometchat/chat-sdk-react-native": "4.0.5", "@cometchat/chat-uikit-react-native": "4.2.0",

but still getting same error as screenshot shared earlier

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. ERROR Error: Requiring module "node_modules/@cometchat/chat-uikit-react-native/src/index.ts", which threw an exception: Invariant Violation: Invalid prop color supplied to StyleSheet titleStyle: rgba(20, 20, 20) Valid color formats are

* '#f0f' (#rgb)

* '#f0fc' (#rgba)

* '#ff00ff' (#rrggbb)

* '#ff00ff00' (#rrggbbaa)

* 'rgb(255, 255, 255)'

* 'rgba(255, 255, 255, 1.0)'

* 'hsl(360, 100%, 100%)'

* 'hsla(360, 100%, 100%, 1.0)'

* 'transparent'

* 'red'

* 0xff00ff00 (0xrrggbbaa)

StyleSheet titleStyle: { "opacity": 1, "color": "rgba(20, 20, 20)", "fontStyle": "normal", "letterSpacing": -0.1, "textAlign": "left", "lineHeight": 18 } WARN Attempted to register RCTBridgeModule class RCTVideoManager for the name 'VideoManager', but name was already registered by class CometChatVideoManager ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. ERROR TypeError: undefined is not an object (evaluating 'S.CometChat.appSettings.shouldAutoEstablishSocketConnection') ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. LOG Unable to symbolicate stack trace: The stack is null LOG Unable to symbolicate stack trace: The stack is null Error: Unable to resolve module ./Libraries/Components/AccessibilityInfo/AccessibilityInfo from /Users/chiragp/Desktop/Projects/platformmarketplacejp-345732-react-native/src/node_modules/react-native/index.js:

For reminding we are using react-native:0.64.4

Please check my this reply, the issues is not resolved with version that you suggested.

ChiragAtharva commented 8 months ago

Hello CometChat Team, We are still waiting for your reply on this issue

cometchat-helpcenter-bot commented 8 months ago

Keagan (CometChat Team) replied:

Hello Chirag,

My apologies for any inconvenience caused. We seem to have had some trouble accessing your previous response.

We kindly ask for your patience as we delve deeper into this matter and we will loop back to you with further details.

Regards

Keagan Ellis CometChat

cometchat-helpcenter-bot commented 8 months ago

Ritik (CometChat Team) replied:

Hi Chirag,

Can you please tell us if Is there a reason you are using the V3 Ui kit. We recommend using v4 Ui kit for optimal performance and features.

Ritik Kaushik CometChat

ChiragAtharva commented 8 months ago

Ritik (CometChat Team) replied:

Hi Chirag,

Can you please tell us if Is there a reason you are using the V3 Ui kit. We recommend using v4 Ui kit for optimal performance and features.

Ritik Kaushik CometChat

Hi Ritik Kaushik We are using react-native 0.64.4 version and currently finding the best match version of CometChatUI Kit library but with all versions listed in your library - https://www.npmjs.com/package/@cometchat/chat-uikit-react-native?activeTab=versions are not working and giving error like screenshot attached

Screenshot1

so can you please tell/send us the version of those libraries of cometchat and UI kit that can support these below all "@types/node": "18.11.19" "@types/react": "17.0.2", "@types/react-native": "0.66.1", "react-native": "0.64.4",

NOTE - we can not upgrade these of version as per companies norms.

cometchat-helpcenter-bot commented 8 months ago

Ritik (CometChat Team) replied:

Hi Chirag,

Our React Native V4 UI Kit should work with the versions you have mentioned. Please refer to our documentation for further guidance.

Ritik Kaushik CometChat

ChiragAtharva commented 8 months ago

Ritik (CometChat Team) replied:

Hi Chirag,

Our React Native V4 UI Kit should work with the versions you have mentioned. Please refer to our documentation for further guidance.

Ritik Kaushik CometChat

Hi Ritik Kaushik

I have checked with >0.64 react native version for your UI kit library But it only works with > 0.70 and not working < 0.69

Please check your side once with react native lower than 0.70 and let us know the working status.