Instabug / Instabug-React-Native

In-app feedback and bug reporting tool for React Native
https://instabug.com/platforms/react-native
MIT License
308 stars 100 forks source link

App hang on iOS physical device when Instabug enabled specifically double tap to navigating from one screen to another screen. #1163

Closed quangcao-offerup closed 4 months ago

quangcao-offerup commented 4 months ago

Steps to Reproduce the Problem

Double tap on a one screen to navigate to another screen with instabug enabled

Expected Behavior

Navigate to another screen w/o delay or app hang

Actual Behavior

After couple of double tap, there is app hang would cause the app delay in debug build. in prod build, we can see it crash due to apphang taking too long.

Instabug integration code

import type InstabugType from 'instabug-reactnative';
import type { WelcomeMessageMode, InvocationEvent } from 'instabug-reactnative';

type InternalInstabugType = typeof InstabugType & {
  WelcomeMessageMode: typeof WelcomeMessageMode;
  InvocationEvent: typeof InvocationEvent;
};

let InternalInstabug: InternalInstabugType | null = null;
const RNInstabug = require('instabug-reactnative').default as InternalInstabugType;

InternalInstabug = RNInstabug;

InternalInstabug.WelcomeMessageMode = require('instabug-reactnative')
  .WelcomeMessageMode as InternalInstabugType['WelcomeMessageMode'];

InternalInstabug.InvocationEvent = require('instabug-reactnative')
  .InvocationEvent as InternalInstabugType['InvocationEvent'];

const Instabug = InternalInstabug;

export const useCrashReporting = () => {
  useEffect(() => {
        Instabug.init({
          token: Config.INSTABUG_APP_TOKEN,
          invocationEvents: [Instabug.InvocationEvent.shake],
        });
  }, []);
};

SDK Version

"instabug-reactnative": "12.4",

React Native, iOS and Android Versions

"react-native": "0.70.13", "@react-navigation/native": "6.1.6", "@react-navigation/stack": "6.3.16",

Device Model

Iphone 14 Pro. iOS 17.3.1.

Iphone 13 pro iOS 16.1.1

trace

Screenshot 2024-03-05 at 11 24 13 AM
sofian-sunny commented 4 months ago

Also facing crash on iOS devices SessionReplaySyncManager.sync() SIGSEGV: Crash due to signal: SIGSEGV(SEGV_ACCERR) at 8000000000000008

ahmedAlaaInstabug commented 4 months ago

hello @quangcao-offerup 👋 , Thanks for reporting this issue, Can you please provide Instabug integration code since the attached code is for sentry ?

quangcao-offerup commented 4 months ago

@ahmedAlaaInstabug corrected. Thanks.

ahmedAlaaInstabug commented 4 months ago

hi @quangcao-offerup 👋 , this issue has been fixed in version 12.6, can you please try the latest version v12.8, and let us know if it fixes your issue.

quangcao-offerup commented 4 months ago

Hi @ahmedAlaaInstabug after upgraded to 12.8, it's still able to repro consistently on my iOS 17.3.1. Iphone 14 Pro. sometimes triple tapping.

ahmedAlaaInstabug commented 4 months ago

hi @quangcao-offerup, can you please share a snippet of the double tap implementation that you use? Since I can't reproduce the issue

quangcao-offerup commented 4 months ago

Hi @ahmedAlaaInstabug after double checking, it turns out issue from our legacy implementation, not instabug issue. Taking that legacy piece out would fix the issue. I'm closing this now. Thanks