QuickBlox / quickblox-react-native-sdk

quickblox-react-native-sdk
Other
4 stars 1 forks source link

iOS App Crashed while retrieving chat messages #42

Closed ashwanihundwani closed 1 year ago

ashwanihundwani commented 2 years ago

Quickblox iOS code is crashing while parsing some data:

Code Snippet in which code crashed

Code Snippet

Crash log:

Quickbox crash log

Data Object which is susceptibly causing it: { "_id" = xxxxxxxxxxxxxxxxxx; "all_read" = 0; attachments = "[{type=image, id=xxxx}]"; body = "[attachment]"; "chat_dialog_id" = xxxxxx; "created_at" = "xxxxx"; "date_sent" = xxxxxx; "delivered_ids" = ( xxxx, xxxx ); }

Here, I believe the iOS code is expecting the "attachments" key to be having Array type values always. But some cases, "String" type value is received. This works fine in Android and we can see the image. May be developers of your Android SDK are handling this. Please let us know how are you planning to fix this in iOS SDK or your backend? As the app is crashing in some of the chat groups we have.

ghost commented 2 years ago

@ashwanihundwani Hello,

This is Nikolay from QuickBlox support.

In order to investigate the issue, please provide us with more detailed information about the messages that cause the issue and steps to reproduce it. You may also send examples of attachments.

Additionally, we need the following points:

  1. Version of QuickBlox React Native SDK.
  2. Version of the platform (e.g. iOS 13)
  3. Devices in use (e.g. iPhone 12).
  4. React Native version.
  5. Information from react-native info.
  6. Information from npm list.
ashwanihundwani commented 2 years ago

Below are the types of messages for which the app is crashing, here you can see the "attachments" key has value of type String. For the messages where "attachments" key has value of type Array the data is being parsed successfully. For some of the chat groups the app is crashing but for others the app is running fine. I believe, It is between your backend and iOS development team. Let me know what else you need from me. { "_id" = xxxxxxxxxxxxxxxxxx; "all_read" = 0; attachments = "[{type=image, id=xxxx}]"; body = "[attachment]"; "chat_dialog_id" = xxxxxx; "created_at" = "xxxxx"; "date_sent" = xxxxxx; "delivered_ids" = ( xxxx, xxxx ); }

Version of QuickBlox React Native SDK. 0.5.12-beta

Version of the platform (e.g. iOS 13) 14.4.2

Devices in use (e.g. iPhone 12). iPhone SE

React Native version. 0.63.4

Information from react-native info.

Fetching system and libraries information... System: OS: macOS 10.15.7 CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz Memory: 313.84 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.15.3 - /usr/local/bin/node Yarn: Not Found npm: 7.15.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1 Android SDK: API Levels: 23, 25, 26, 27, 28, 29, 30, 31 Build Tools: 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.1, 30.0.2, 30.0.3, 31.0.0 System Images: android-24 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom Android NDK: 21.1.6352462 IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7784292 Xcode: 12.2/12B45b - /usr/bin/xcodebuild Languages: Java: 1.8.0_191 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: ~0.63.4 => 0.63.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Information from npm list. ├── @apollo/client@3.3.21 ├── @babel/core@7.13.10 ├── @babel/runtime@7.13.10 ├── @gregfrench/react-native-wheel-picker@1.2.15 ├── @haskkor/react-native-pincode@1.22.6 ├── @react-native-community/async-storage@1.12.1 ├── @react-native-community/datetimepicker@3.5.2 ├── @react-native-community/eslint-config@1.1.0 ├── @react-native-community/netinfo@6.0.0 ├── @react-native-community/push-notification-ios@1.8.0 ├── @react-native-picker/picker@1.16.4 ├── @types/jest@26.0.24 ├── @types/react-native@0.63.52 ├── @types/react-test-renderer@17.0.1 ├── @types/react@17.0.15 ├── @typescript-eslint/eslint-plugin-tslint@4.28.4 ├── @typescript-eslint/eslint-plugin@4.28.4 ├── @typescript-eslint/parser@4.28.4 ├── amazon-cognito-identity-js@4.6.3 ├── appcenter-analytics@4.1.0 ├── appcenter-crashes@4.1.0 ├── appcenter@4.1.0 ├── aws-amplify-react-native@4.3.3 ├── aws-amplify@3.4.3 ├── babel-jest@25.5.1 ├── datejs@1.0.0-rc3 ├── eslint-plugin-import@2.23.4 ├── eslint-plugin-jsdoc@32.3.4 ├── eslint-plugin-prefer-arrow@1.2.3 ├── eslint-plugin-react@7.24.0 ├── eslint@7.31.0 ├── fsevents@2.3.2 ├── graphql@14.7.0 ├── i18next@20.3.5 ├── jest@26.6.3 ├── kumulos-react-native@5.4.1 ├── lodash.debounce@4.0.8 ├── metro-react-native-babel-preset@0.59.0 ├── moment@2.29.1 ├── quickblox-react-native-sdk@0.5.12-beta ├── react-i18next@11.11.3 ├── react-native-btr@2.1.2 ├── react-native-cli-bump-version@1.3.0 ├── react-native-config@1.4.3 ├── react-native-confirmation-code-field@7.1.0 ├── react-native-customized-image-picker@1.2.2 ├── react-native-date-picker@3.3.2 ├── react-native-file-viewer@2.1.4 ├── react-native-fs@2.18.0 ├── react-native-gesture-handler@1.10.3 ├── react-native-image-picker@4.0.6 ├── react-native-incall-manager@3.3.0 ├── react-native-keychain@6.2.0 ├── react-native-linear-gradient@2.5.6 ├── react-native-popover-view@4.0.1 ├── react-native-push-notification@7.4.0 ├── react-native-radial-gradient@1.0.8 ├── react-native-reanimated@1.13.3 ├── react-native-router-flux@4.3.1 ├── react-native-safe-area-context@3.2.0 ├── react-native-screens@3.4.0 ├── react-native-sms-retriever@1.1.1 ├── react-native-splash-screen@3.2.0 ├── react-native-svg-charts@5.4.0 ├── react-native-svg@12.1.1 ├── react-native-touch-id@4.4.1 ├── react-native-webview@11.6.5 ├── react-native@0.63.4 ├── react-test-renderer@16.13.1 ├── react@16.13.1 ├── rn-fetch-blob@0.12.0 ├── ts-jest@26.5.6 ├── tslint-react@5.0.0 ├── tslint@6.1.3 └── typescript@4.3.5

ghost commented 2 years ago

@ashwanihundwani Thank you,

I created an internal ticket and forwarded it to our developers.

They requested more detailed information:

  1. Is the bug reproduced on the QuickBlox React Native Chat sample or on your application?
  2. Please provide me with a log of messages you sent and a message log received before the crash.