sentry-react-native
                                
                                 sentry-react-native copied to clipboard
                                
                                    sentry-react-native copied to clipboard
                            
                            
                            
                        Malformed calls from JS when image upload fails
OS:
- [ ] Windows
- [X] MacOS
- [ ] Linux
Platform:
- [ ] iOS
- [X] Android
SDK:
- [X]  @sentry/react-native(>= 1.0.0)
- [ ]  react-native-sentry(<= 0.43.2)
SDK version: 0.0.0 5.15.1
react-native version: 0.0.0
0.71.14
Are you using Expo?
- [ ] Yes
- [X] No
Are you using sentry.io or on-premise?
- [X] sentry.io (SaaS)
- [ ] on-premise
If you are using sentry.io, please post a link to your issue so we can take a look: No Sentry link as the app crashed.
Configuration:
(@sentry/react-native)
Sentry.init({
  dsn: 'XXXX',
  environment: "production",
});
I have the following issue:
This is related to #3421 and #2744, and we are still seeing the crash after updating to 5.15.1.
App crashed with
Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.
[[10,25,25,10,33,3],[0,0,1,0,5,2],[[{"level":"info","category":"xhr","type":"http","data":{"status_code":0,"url":"https://chat.stream-io-api.com/channels/XXXXXXXX,"method":"POST"},"timestamp":1703179505.696}],[1129,2000,1703179505696,false],[1129],["{\"type\":\"log\",\"level\":\"log\",\"mode\":\"BRIDGE\",\"data\":[\"[AxiosError: Network Error]\"]}",1],[5625,"RNSVGPath",11,{"d":"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-7v2h2v-2h-2zm0-2V7h2v6h-2z","propList":["fill","fillRule"],"clipRule":0,"fillRule":0,"fill":{"payload":-51390,"type":0}}]],7589]
This error is located at:
    in RNSVGPath (created by Path)
    in Path (created by RootPath)
    in RootPath (created by Error)
    in RNSVGGroup (created by G)
    in G (created by Svg)
    in RNSVGSvgViewAndroid (created by Svg)
    in Svg (created by RootSvg)
    in RootSvg (created by Error)
    in Error (created by MessageError)
    in RCTView (created by View)
    in View (created by MessageError)
    in RCTView (created by View)
    in View (created by MessageError)
    in MessageError (created by MessageContentWithContext)
    in RCTView (created by View)
    in View (created by MessageContentWithContext)
    in RCTView (created by View)
    in View (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by TouchableOpacity)
    in TouchableOpacity (created by TouchableOpacity)
    in TouchableOpacity (created by MessageContentWithContext)
    in MessageContentWithContext
    in MessageContent{messageSimple{content}} (created by MessageSimpleWithContext)
    in RCTView (created by View)
    in View (created by MessageSimpleWithContext)
    in MessageSimpleWithContext
    in MessageSimple{messageSimple{container}} (created by MessageWithContext)
    in MessageProvider (created by MessageWithContext)
    in RCTView (created by View)
    in View (created by MessageWithContext)
    in RCTView (created by View)
    in View (created by MessageWithContext)
    in RCTView (created by View)
    in View (created by MessageWithContext)
    in MessageWithContext
    in Message (created by CellRenderer)
    in RCTView (created by View)
    in View (created by CellRenderer)
    in RCTView (created by View)
    in View (created by InvertedCellRendererComponent)
    in InvertedCellRendererComponent (created by CellRenderer)
    in VirtualizedListCellContextProvider (created by CellRenderer)
    in CellRenderer (created by VirtualizedList)
    in RCTView (created by View)
    in View (created by ScrollView)
    in RCTScrollView (created by ScrollView)
    in ScrollView (created by ScrollView)
    in ScrollView (created by VirtualizedList)
    in VirtualizedListContextProvider (created by VirtualizedList)
    in VirtualizedList (created by FlatList)
    in FlatList
    in Unknown (created by MessageListWithContext)
    in RCTView (created by View)
    in View (created by MessageListWithContext)
    in MessageListWithContext (created by MessageList)
    in MessageList (created by ChatScreen)
    in RCTView (created by View)
    in View (created by ChannelWithContext)
    in MessageInputProvider (created by ChannelWithContext)
    in SuggestionsProvider (created by ChannelWithContext)
    in ThreadProvider (created by ChannelWithContext)
    in MessagesProvider (created by ChannelWithContext)
    in PaginatedMessageListProvider (created by ChannelWithContext)
    in TypingProvider (created by ChannelWithContext)
    in OwnCapabilitiesProvider (created by ChannelWithContext)
    in ChannelProvider (created by ChannelWithContext)
    in RCTView (created by View)
    in View (created by KeyboardCompatibleView)
    in RCTView (created by View)
    in View (created by KeyboardCompatibleView)
    in KeyboardProvider (created by KeyboardCompatibleView)
    in KeyboardCompatibleView (created by ChannelWithContext)
    in ChannelWithContext (created by Channel)
    in Channel (created by ChatScreen)
    in RCTView (created by View)
    in View (created by ChatScreen)
    in ActiveChannelsProvider (created by ChannelsStateProvider)
    in ChannelsStateProvider (created by ChatWithContext)
    in ThemeProvider (created by ChatWithContext)
    in TranslationProvider (created by ChatWithContext)
    in ChatProvider (created by ChatWithContext)
    in ChatWithContext (created by Chat)
    in Chat (created by ChatScreen)
    in ChatScreen (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by CardContainer)
    in RCTView (created by View)
    in View (created by CardContainer)
    in RCTView (created by View)
    in View (created by CardContainer)
    in RCTView (created by View)
    in View
    in CardSheet (created by Card)
    in RCTView (created by View)
    in View (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by PanGestureHandler)
    in PanGestureHandler (created by PanGestureHandler)
    in PanGestureHandler (created by Card)
    in RCTView (created by View)
    in View (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by Card)
    in RCTView (created by View)
    in View (created by Card)
    in Card (created by CardContainer)
    in CardContainer (created by CardStack)
    in RNSScreen (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by InnerScreen)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by InnerScreen)
    in InnerScreen (created by Screen)
    in Screen (created by MaybeScreen)
    in MaybeScreen (created by CardStack)
    in RNSScreenContainer (created by ScreenContainer)
    in ScreenContainer (created by MaybeScreenContainer)
    in MaybeScreenContainer (created by CardStack)
    in RCTView (created by View)
    in View (created by Background)
    in Background (created by CardStack)
    in CardStack (created by HeaderShownContext)
    in RCTView (created by View)
    in View (created by SafeAreaInsetsContext)
    in SafeAreaProviderCompat (created by StackView)
    in RNGestureHandlerRootView (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by StackView)
    in StackView (created by StackNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by StackNavigator)
    in StackNavigator (created by NavStacks)
    in NavStacks (created by ChatEnabledNavStacks)
    in ImageGalleryProvider (created by OverlayProvider)
    in AttachmentPickerProvider (created by OverlayProvider)
    in MessageOverlayProvider (created by OverlayProvider)
    in TranslationProvider (created by OverlayProvider)
    in OverlayProvider (created by ChatEnabledNavStacks)
    in ChatEnabledNavStacks (created by App)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by App)
    in RNGestureHandlerRootView (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by App)
    in PunchSubmissionProvider (created by App)
    in ShiftsProvider (created by App)
    in UserLocaleProvider (created by App)
    in AuthProvider (created by App)
    in RCTView (created by View)
    in View (created by ModalPanel)
    in ModalPanel (created by ApplicationProvider)
    in ThemeProvider (created by StyleProvider)
    in MappingProvider (created by StyleProvider)
    in StyleProvider (created by ApplicationProvider)
    in ApplicationProvider (created by App)
    in PermissionProvider (created by App)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by App)
    in RCTView (created by View)
    in View (created by __Sentry.TouchEventBoundary)
    in __Sentry.TouchEventBoundary (created by App)
    in ErrorBoundary (created by App)
    in App (created by RootApp)
    in ReactNativeProfiler (created by RootApp)
    in RCTView (created by View)
    in View (created by __Sentry.TouchEventBoundary)
    in __Sentry.TouchEventBoundary (created by RootApp)
    in RootApp
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in BrightGoProject(RootComponent), js engine: hermes
[Description]
Steps to reproduce: This is reproducible consistently for us in a particular user flow of sending images while offline. Same as https://github.com/getsentry/sentry-react-native/issues/3421 but only for Android. This is consistently reproducible on dev build and I haven't been able to try things on release build yet.
Actual result: App crashed with the error above.
Expected result:
There shouldn't be a crash.
One thing to note is that when reproducing this issue, the crash only happens when I was sending a second photo. IIRC, this wasn't the case earlier, where the crash would happen when I sent any photo.
Not sure how useful this information is, but just want to share it here.
Hi, thank you for the message, based on https://github.com/getsentry/sentry-react-native/issues/2744 this will only happen in development.
If I understand it correctly the error happens only when you try to send a photo from the RN app to a server and the phone is offline/the server returns 500?
This might be related to the size of the image and breadcrumbs, are you logging the row data to console?
Could you add debug: true to your config and share with us what happens before the crash?
Sentry.init({
  debug: true,
  dsn: 'XXXX',
  environment: "production",
});
are you logging the row data to console?
We are not logging anything ourselves, but we are using a bunch of open source libraries so some of them could be logging stuff..
Here is the additional stuff after we turned on debug:
[[10,25,25,10,33,33,3],[0,0,1,0,5,5,2],[[{"level":"info","category":"xhr","type":"http","data":{"status_code":0,"url":"https://chat.stream-io-api.com/channels/messaging/hr_brightgo_254/image?user_id=254&connection_id=655648dc-0a1d-2b4d-0000-000003e7b7f7&api_key=qex7wa2sj6md","method":"POST"},"timestamp":1704757847.369}],[2949,2000,1704757847370,false],[2949],["{\"type\":\"log\",\"level\":\"error\",\"mode\":\"BRIDGE\",\"data\":[\"Sentry Logger [error]:\",\"Error while triggering instrumentation handler.\\nType: console\\nName: _consoleBreadcrumb\\nError:\",\"[Invariant Violation: [{\\\"timestamp\\\":1704757847.37,\\\"category\\\":\\\"console\\\",\\\"data\\\":{\\\"arguments\\\":[{\\\"message\\\":\\\"Network Error\\\",\\\"name\\\":\\\"AxiosError\\\",\\\"stack\\\":\\\"AxiosError: Network Error\\\\n    at handleError (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:276229:39)\\\\n    at call (native)\\\\n    at dispatchEvent (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:27641:31)\\\\n    at setReadyState (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:26911:33)\\\\n    at __didCompleteResponse (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:26722:29)\\\\n    at apply (native)\\\\n    at anonymous (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:26847:52)\\\\n    at apply (native)\\\\n    at emit (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:1758:40)\\\\n    at apply (native)\\\\n    at __callFunction (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:2443:36)\\\\n    at anonymous (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:2204:31)\\\\n    at __guard (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:2394:15)\\\\n    at callFunctionReturnFlushedQueue (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:2203:21)\\\",\\\"config\\\":{\\\"transitional\\\":{\\\"silentJSONParsing\\\":true,\\\"forcedJSONParsing\\\":true,\\\"clarifyTimeoutError\\\":false},\\\"adapter\\\":[\\\"xhr\\\",\\\"http\\\"],\\\"transformRequest\\\":[\\\"[Function: transformRequest]\\\"],\\\"transformResponse\\\":[\\\"[Function: transformResponse]\\\"],\\\"timeout\\\":0,\\\"xsrfCookieName\\\":\\\"XSRF-TOKEN\\\",\\\"xsrfHeaderName\\\":\\\"X-XSRF-TOKEN\\\",\\\"maxContentLength\\\":\\\"<<Infinity>>\\\",\\\"maxBodyLength\\\":\\\"<<Infinity>>\\\",\\\"env\\\":{\\\"FormData\\\":\\\"[Function: FormData]\\\",\\\"Blob\\\":\\\"[Function: Blob]\\\"},\\\"validateStatus\\\":\\\"[Function: validateStatus]\\\",\\\"headers\\\":{\\\"Accept\\\":\\\"application/json, text/plain, */*\\\",\\\"Content-Type\\\":\\\"multipart/form-data\\\",\\\"Authorization\\\":\\\"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMjU0In0.C8VwDhET99Ru7y_iN0sEcGnRDGvnjjafN5CuHsA7eIU\\\",\\\"stream-auth-type\\\":\\\"jwt\\\",\\\"X-Stream-Client\\\":\\\"stream-chat-react-native-android-5.22.1\\\",\\\"x-client-request-id\\\":\\\"2623c623-f73a-4028-8773-ff44195e1cc1\\\"},\\\"withCredentials\\\":false,\\\"warmUp\\\":false,\\\"recoverStateOnReconnect\\\":true,\\\"paramsSerializer\\\":{\\\"serialize\\\":\\\"[Function: axiosParamsSerializer]\\\"},\\\"params\\\":{\\\"user_id\\\":\\\"254\\\",\\\"connection_id\\\":\\\"655648dc-0a1d-2b4d-0000-000003e7b7f7\\\",\\\"api_key\\\":\\\"qex7wa2sj6md\\\"},\\\"method\\\":\\\"post\\\",\\\"url\\\":\\\"https://chat.stream-io-api.com/channels/messaging/hr_brightgo_254/image\\\",\\\"data\\\":{\\\"_parts\\\":[[\\\"file\\\",{\\\"uri\\\":\\\"file:///data/user/0/com.brightgoproject/cache/8153e225-d092-4250-b912-c154e5033378.JPEG\\\",\\\"name\\\":\\\"ac4dbc86-faca-4014-bfc8-2eac558fba1b.jpg\\\",\\\"contentType\\\":\\\"image/jpeg\\\",\\\"type\\\":\\\"image/jpeg\\\"}]]}},\\\"code\\\":\\\"ERR_NETWORK\\\",\\\"status\\\":null}],\\\"logger\\\":\\\"console\\\"},\\\"level\\\":\\\"debug\\\",\\\"message\\\":\\\"AxiosError: Network Error\\\"}] is not usable as a native method argument]\"]}",1],["{\"type\":\"log\",\"level\":\"log\",\"mode\":\"BRIDGE\",\"data\":[\"[AxiosError: Network Error]\"]}",1],[14585,"RNSVGPath",11,{"d":"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-7v2h2v-2h-2zm0-2V7h2v6h-2z","propList":["fill","fillRule"],"clipRule":0,"fillRule":0,"fill":{"payload":-51390,"type":0}}]],17901]
This error is located at:
    in RNSVGPath (created by Path)
    in Path (created by RootPath)
    in RootPath (created by Error)
    in RNSVGGroup (created by G)
    in G (created by Svg)
    in RNSVGSvgViewAndroid (created by Svg)
    in Svg (created by RootSvg)
    in RootSvg (created by Error)
    in Error (created by MessageError)
    in RCTView (created by View)
    in View (created by MessageError)
    in RCTView (created by View)
    in View (created by MessageError)
    in MessageError (created by MessageContentWithContext)
    in RCTView (created by View)
    in View (created by MessageContentWithContext)
    in RCTView (created by View)
    in View (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by TouchableOpacity)
    in TouchableOpacity (created by TouchableOpacity)
    in TouchableOpacity (created by MessageContentWithContext)
    in MessageContentWithContext
    in MessageContent{messageSimple{content}} (created by MessageSimpleWithContext)
    in RCTView (created by View)
    in View (created by MessageSimpleWithContext)
    in MessageSimpleWithContext
    in MessageSimple{messageSimple{container}} (created by MessageWithContext)
    in MessageProvider (created by MessageWithContext)
    in RCTView (created by View)
    in View (created by MessageWithContext)
    in RCTView (created by View)
    in View (created by MessageWithContext)
    in RCTView (created by View)
    in View (created by MessageWithContext)
    in MessageWithContext
    in Message (created by CellRenderer)
    in RCTView (created by View)
    in View (created by CellRenderer)
    in RCTView (created by View)
    in View (created by InvertedCellRendererComponent)
    in InvertedCellRendererComponent (created by CellRenderer)
    in VirtualizedListCellContextProvider (created by CellRenderer)
    in CellRenderer (created by VirtualizedList)
    in RCTView (created by View)
    in View (created by ScrollView)
    in RCTScrollView (created by ScrollView)
    in ScrollView (created by ScrollView)
    in ScrollView (created by VirtualizedList)
    in VirtualizedListContextProvider (created by VirtualizedList)
    in VirtualizedList (created by FlatList)
    in FlatList
    in Unknown (created by MessageListWithContext)
    in RCTView (created by View)
    in View (created by MessageListWithContext)
    in MessageListWithContext (created by MessageList)
    in MessageList (created by ChatScreen)
    in RCTView (created by View)
    in View (created by ChannelWithContext)
    in MessageInputProvider (created by ChannelWithContext)
    in SuggestionsProvider (created by ChannelWithContext)
    in ThreadProvider (created by ChannelWithContext)
    in MessagesProvider (created by ChannelWithContext)
    in PaginatedMessageListProvider (created by ChannelWithContext)
    in TypingProvider (created by ChannelWithContext)
    in OwnCapabilitiesProvider (created by ChannelWithContext)
    in ChannelProvider (created by ChannelWithContext)
    in RCTView (created by View)
    in View (created by KeyboardCompatibleView)
    in RCTView (created by View)
    in View (created by KeyboardCompatibleView)
    in KeyboardProvider (created by KeyboardCompatibleView)
    in KeyboardCompatibleView (created by ChannelWithContext)
    in ChannelWithContext (created by Channel)
    in Channel (created by ChatScreen)
    in RCTView (created by View)
    in View (created by ChatScreen)
    in ActiveChannelsProvider (created by ChannelsStateProvider)
    in ChannelsStateProvider (created by ChatWithContext)
    in ThemeProvider (created by ChatWithContext)
    in TranslationProvider (created by ChatWithContext)
    in ChatProvider (created by ChatWithContext)
    in ChatWithContext (created by Chat)
    in Chat (created by ChatScreen)
    in ChatScreen (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by CardContainer)
    in RCTView (created by View)
    in View (created by CardContainer)
    in RCTView (created by View)
    in View (created by CardContainer)
    in RCTView (created by View)
    in View
    in CardSheet (created by Card)
    in RCTView (created by View)
    in View (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by PanGestureHandler)
    in PanGestureHandler (created by PanGestureHandler)
    in PanGestureHandler (created by Card)
    in RCTView (created by View)
    in View (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by Card)
    in RCTView (created by View)
    in View (created by Card)
    in Card (created by CardContainer)
    in CardContainer (created by CardStack)
    in RNSScreen (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by InnerScreen)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by InnerScreen)
    in InnerScreen (created by Screen)
    in Screen (created by MaybeScreen)
    in MaybeScreen (created by CardStack)
    in RNSScreenContainer (created by ScreenContainer)
    in ScreenContainer (created by MaybeScreenContainer)
    in MaybeScreenContainer (created by CardStack)
    in RCTView (created by View)
    in View (created by Background)
    in Background (created by CardStack)
    in CardStack (created by HeaderShownContext)
    in RCTView (created by View)
    in View (created by SafeAreaInsetsContext)
    in SafeAreaProviderCompat (created by StackView)
    in RNGestureHandlerRootView (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by StackView)
    in StackView (created by StackNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by StackNavigator)
    in StackNavigator (created by NavStacks)
    in NavStacks (created by ChatEnabledNavStacks)
    in ImageGalleryProvider (created by OverlayProvider)
    in AttachmentPickerProvider (created by OverlayProvider)
    in MessageOverlayProvider (created by OverlayProvider)
    in TranslationProvider (created by OverlayProvider)
    in OverlayProvider (created by ChatEnabledNavStacks)
    in ChatEnabledNavStacks (created by App)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by App)
    in RNGestureHandlerRootView (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by App)
    in PunchSubmissionProvider (created by App)
    in ShiftsProvider (created by App)
    in UserLocaleProvider (created by App)
    in AuthProvider (created by App)
    in RCTView (created by View)
    in View (created by ModalPanel)
    in ModalPanel (created by ApplicationProvider)
    in ThemeProvider (created by StyleProvider)
    in MappingProvider (created by StyleProvider)
    in StyleProvider (created by ApplicationProvider)
    in ApplicationProvider (created by App)
    in PermissionProvider (created by App)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by App)
    in RCTView (created by View)
    in View (created by __Sentry.TouchEventBoundary)
    in __Sentry.TouchEventBoundary (created by App)
    in ErrorBoundary (created by App)
    in App (created by RootApp)
    in ReactNativeProfiler (created by RootApp)
    in RCTView (created by View)
    in View (created by __Sentry.TouchEventBoundary)
    in __Sentry.TouchEventBoundary (created by RootApp)
    in RootApp
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in BrightGoProject(RootComponent), js engine: hermes
@tao-qian Got it. Am I mistaken or is the log after the debug: true the same, are there any Sentry logs before the error?
Yeah that's the only thing we got.
Note that there is actually more stuff at the end of the first line, compared to the log I shared earlier, you just need to scroll all the way to the right... I am copying that first line below as well
[[10,25,25,10,33,33,3],[0,0,1,0,5,5,2],[[{"level":"info","category":"xhr","type":"http","data":{"status_code":0,"url":"https://chat.stream-io-api.com/channels/messaging/hr_brightgo_254/image?user_id=254&connection_id=655648dc-0a1d-2b4d-0000-000003e7b7f7&api_key=qex7wa2sj6md","method":"POST"},"timestamp":1704757847.369}],[2949,2000,1704757847370,false],[2949],["{"type":"log","level":"error","mode":"BRIDGE","data":["Sentry Logger [error]:","Error while triggering instrumentation handler.\nType: console\nName: _consoleBreadcrumb\nError:","[Invariant Violation: [{\"timestamp\":1704757847.37,\"category\":\"console\",\"data\":{\"arguments\":[{\"message\":\"Network Error\",\"name\":\"AxiosError\",\"stack\":\"AxiosError: Network Error\\n at handleError (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:276229:39)\\n at call (native)\\n at dispatchEvent (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:27641:31)\\n at setReadyState (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:26911:33)\\n at __didCompleteResponse (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:26722:29)\\n at apply (native)\\n at anonymous (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:26847:52)\\n at apply (native)\\n at emit (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:1758:40)\\n at apply (native)\\n at __callFunction (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:2443:36)\\n at anonymous (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:2204:31)\\n at __guard (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:2394:15)\\n at callFunctionReturnFlushedQueue (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.brightgoproject&modulesOnly=false&runModule=true:2203:21)\",\"config\":{\"transitional\":{\"silentJSONParsing\":true,\"forcedJSONParsing\":true,\"clarifyTimeoutError\":false},\"adapter\":[\"xhr\",\"http\"],\"transformRequest\":[\"[Function: transformRequest]\"],\"transformResponse\":[\"[Function: transformResponse]\"],\"timeout\":0,\"xsrfCookieName\":\"XSRF-TOKEN\",\"xsrfHeaderName\":\"X-XSRF-TOKEN\",\"maxContentLength\":\"<<Infinity>>\",\"maxBodyLength\":\"<<Infinity>>\",\"env\":{\"FormData\":\"[Function: FormData]\",\"Blob\":\"[Function: Blob]\"},\"validateStatus\":\"[Function: validateStatus]\",\"headers\":{\"Accept\":\"application/json, text/plain, /\",\"Content-Type\":\"multipart/form-data\",\"Authorization\":\"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMjU0In0.C8VwDhET99Ru7y_iN0sEcGnRDGvnjjafN5CuHsA7eIU\",\"stream-auth-type\":\"jwt\",\"X-Stream-Client\":\"stream-chat-react-native-android-5.22.1\",\"x-client-request-id\":\"2623c623-f73a-4028-8773-ff44195e1cc1\"},\"withCredentials\":false,\"warmUp\":false,\"recoverStateOnReconnect\":true,\"paramsSerializer\":{\"serialize\":\"[Function: axiosParamsSerializer]\"},\"params\":{\"user_id\":\"254\",\"connection_id\":\"655648dc-0a1d-2b4d-0000-000003e7b7f7\",\"api_key\":\"qex7wa2sj6md\"},\"method\":\"post\",\"url\":\"https://chat.stream-io-api.com/channels/messaging/hr_brightgo_254/image\",\"data\":{\"_parts\":[[\"file\",{\"uri\":\"file:///data/user/0/com.brightgoproject/cache/8153e225-d092-4250-b912-c154e5033378.JPEG\",\"name\":\"ac4dbc86-faca-4014-bfc8-2eac558fba1b.jpg\",\"contentType\":\"image/jpeg\",\"type\":\"image/jpeg\"}]]}},\"code\":\"ERR_NETWORK\",\"status\":null}],\"logger\":\"console\"},\"level\":\"debug\",\"message\":\"AxiosError: Network Error\"}] is not usable as a native method argument]"]}",1],["{"type":"log","level":"log","mode":"BRIDGE","data":["[AxiosError: Network Error]"]}",1],[14585,"RNSVGPath",11,{"d":"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-7v2h2v-2h-2zm0-2V7h2v6h-2z","propList":["fill","fillRule"],"clipRule":0,"fillRule":0,"fill":{"payload":-51390,"type":0}}]],17901]
@tao-qian Thank you for pointing that out.
Let's test this with an artificially created large breadcrumbs (generated data/picture).
I wasn't able to reproduce any errors with large breadcrumbs, there are two cases that I saw happening:
- JavaScript SDK removes the breadcrumb by being too large.
- Event dropped by having a large breadcrumb
@tao-qian Have you encountered this error on a physical device or an emulator? Could you please check if the issue is resolved with the latest version of the SDK?
@lucas-zimerman I'm looking at the last comment https://github.com/getsentry/sentry-react-native/issues/3485#issuecomment-2167142393 this breadcrumbs have not serialized correctly and so over the RN bridge was transafered only the error message, which is small, so it would not trigger the malformed call error.
Related js code https://github.com/getsentry/sentry-javascript/blob/874df8e5b28e2f0f530b0e651067cdd2aa3e5cf7/packages/utils/src/normalize.ts#L41
We tested with breadcrumbs under 196607 key and it did not reproduce the issue.
Hello this is happening when you have Infinity anywhere on the breadcrumb on Android.
Version: "@sentry/react-native": "^5.29.0" Example:
Sentry.addBreadcrumb({ category: 'redux.action', type: 'info', data: { x: Infinity }});