GetStream / stream-chat-react-native

💬 React-Native Chat SDK ➜ Stream Chat. Includes a tutorial on building your own chat app experience using React-Native, React-Navigation and Stream
https://getstream.io/chat/sdk/react-native/
Other
981 stars 325 forks source link

🔥[🐛] react-native-reanimated warning when clicking on image #2184

Closed dannyBies closed 1 year ago

dannyBies commented 1 year ago

Issue

When clicking on an image you get the following warnings in your console. image https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/animations#animations-in-inline-styles


Steps to reproduce

Steps to reproduce the behavior:

  1. Use the latest Expo SDK
  2. Send an image in chat
  3. Click on image
  4. Notice the warning in the console

Expected behavior

No warning


Project Related Information

Customization

Click To Expand

```typescript jsx # N/A ```


Offline support


Environment

Click To Expand

#### `package.json`: ```json { "name": "", "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { }, "dependencies": { "@expo/config": "~8.1.2", "@expo/config-plugins": "~7.2.5", "@expo/config-types": "^49.0.0", "@fawazahmed/react-native-read-more": "^3.0.3", "@microsoft/applicationinsights-react-native": "^3.0.2", "@microsoft/applicationinsights-web": "^2.8.11", "@microsoft/signalr": "^7.0.9", "@react-native-async-storage/async-storage": "^1.19.0", "@react-native-community/netinfo": "^9.4.1", "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13", "@reduxjs/toolkit": "^1.9.5", "@shopify/flash-list": "^1.5.0", "buffer": "^6.0.3", "expo": "^49.0.3", "expo-application": "~5.3.0", "expo-av": "~13.4.1", "expo-blur": "~12.4.1", "expo-build-properties": "~0.8.3", "expo-clipboard": "~4.3.0", "expo-constants": "~14.4.2", "expo-dev-client": "~2.4.6", "expo-device": "~5.4.0", "expo-document-picker": "~11.5.3", "expo-file-system": "~15.4.2", "expo-font": "~11.4.0", "expo-haptics": "~12.4.0", "expo-image": "~1.3.2", "expo-image-manipulator": "~11.3.0", "expo-image-picker": "~14.3.1", "expo-linear-gradient": "~12.3.0", "expo-linking": "~5.0.2", "expo-localization": "~14.3.0", "expo-media-library": "~15.4.0", "expo-navigation-bar": "~2.3.0", "expo-notifications": "~0.20.1", "expo-sharing": "~11.5.0", "expo-splash-screen": "~0.20.4", "expo-status-bar": "~1.6.0", "expo-task-manager": "~11.3.0", "expo-updates": "~0.18.10", "expo-web-browser": "~12.3.2", "i18next": "^23.2.11", "intl-pluralrules": "^2.0.1", "jwt-decode": "^3.1.2", "lottie-react-native": "5.1.6", "luxon": "^3.3.0", "react": "18.2.0", "react-i18next": "^13.0.2", "react-native": "0.72.3", "react-native-auth0": "2.17.4", "react-native-gesture-handler": "~2.12.0", "react-native-image-colors": "^2.3.0", "react-native-logs": "^5.0.1", "react-native-reanimated": "~3.3.0", "react-native-render-html": "^6.3.4", "react-native-safe-area-context": "4.7.1", "react-native-screens": "~3.22.1", "react-native-shadow-2": "^7.0.8", "react-native-share": "^9.2.3", "react-native-svg": "^13.10.0", "react-native-url-polyfill": "^1.3.0", "react-native-uuid": "^2.0.1", "react-redux": "^8.1.1", "redux-flipper": "^2.0.2", "stream-chat-expo": "^5.15.2" }, "devDependencies": { "@babel/core": "^7.22.9", "@jest/console": "^29.6.1", "@jest/globals": "^29.6.1", "@react-navigation/devtools": "^6.0.19", "@rtk-query/codegen-openapi": "^1.0.0", "@testing-library/jest-native": "^5.4.2", "@testing-library/react-native": "^12.1.2", "@total-typescript/ts-reset": "^0.4.2", "@types/jest": "^29.5.3", "@types/luxon": "^3.3.0", "@types/react": "~18.2.15", "@types/react-test-renderer": "^18.0.0", "concurrently": "^8.2.0", "cross-fetch": "^4.0.0", "jest": "^29.6.1", "jest-expo": "^49.0.0", "jest-fail-on-console": "^3.1.1", "jest-junit": "^16.0.0", "msw": "^1.2.2", "patch-package": "^7.0.2", "postinstall-postinstall": "^2.1.0", "react-native-flipper": "^0.205.0", "stream-chat-react-native-devtools": "^1.1.0", "typescript": "^5.1.6" }, "private": true } ``` **`react-native info` output:** ``` System: OS: Windows 10 10.0.22621 CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz Memory: 16.49 GB / 31.87 GB Binaries: Node: version: 18.16.1 path: C:\Program Files\nodejs\node.EXE Yarn: version: 1.22.19 path: ~\AppData\Roaming\npm\yarn.CMD npm: version: 9.5.1 path: C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled AllowAllTrustedApps: Enabled IDEs: Android Studio: Not Found Visual Studio: - 17.7.33906.173 (Visual Studio Community 2022) Languages: Java: version: 11.0.16.1 path: C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin\javac.EXE Ruby: Not Found npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.72.3 wanted: 0.72.3 react-native-windows: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: Not found newArchEnabled: Not found iOS: hermesEnabled: Not found newArchEnabled: Not found ``` - **Platform that you're experiencing the issue on**: - [X] iOS - [X ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [X ] Both - **`stream-chat-react-native` version you're using that has this issue:** - `e.g. 5.4.3` - Device/Emulator info: - [X ] I am using a physical device - OS version: `e.g. Android 10` - Device/Emulator: `e.g. iPhone 11`


Additional context


Screenshots

Click To Expand


dannyBies commented 1 year ago

I've also noticed the UI being broken in some cases which might be related to this? For example when clicking on the edit message button I sometimes suddenly have the edit message UI split visible at the top of the chat instead of it being fixed at the bottom.

Unfortunately I didn't take any screenshots and I can't get it to consistently reproduce. I'll update this issue if I find out more

dannyBies commented 1 year ago

Another warning (only seen this on iOS) that pops up when you click on "Send a message" and it opens the keyboard view to type your message.

image

vishalnarkhede commented 1 year ago

Yeah I think its due to reanimated v3. Currently SDK components are built with reanimated v2 in mind. Even though reanimated v3 works with SDK pretty well, we have to make some updates to fix these warnings.

stream-ci-bot commented 1 year ago

:tada: This issue has been resolved in version 5.22.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: