GleapSDK / ReactNative-SDK

Other
13 stars 5 forks source link

App stop responding when waking up from sleep #4

Closed junaedsiam closed 2 years ago

junaedsiam commented 2 years ago

Recently I have attached Gleap SDK in my Expo application. Everything is working fine except app stop responding when waking up from sleep. I removed Gleap SDK and tried again, everything went back to normal. I have initialized gleap sdk inside index.js. If it helps, Here is the metro log-

ERROR
Your app just crashed. See the error below.

ERROR
java.lang.OutOfMemoryError

Stack trace:
  android.graphics.Bitmap.nativeCreate(Native Method)
  android.graphics.Bitmap.createBitmap(Bitmap.java:1122)
  android.graphics.Bitmap.createBitmap(Bitmap.java:1080)
  android.graphics.Bitmap.createBitmap(Bitmap.java:1030)
  android.graphics.Bitmap.createBitmap(Bitmap.java:991)
  io.gleap.ScreenshotUtil.captureView(ScreenshotUtil.java:287)
  io.gleap.ScreenshotUtil.takeScreenshot(ScreenshotUtil.java:61)
  io.gleap.ReplaysDetector$1.run(ReplaysDetector.java:61)
  android.os.Handler.handleCallback(Handler.java:938)
  android.os.Handler.dispatchMessage(Handler.java:99)
  android.os.Looper.loop(Looper.java:223)
  android.app.ActivityThread.main(ActivityThread.java:7656)
  java.lang.reflect.Method.invoke(Native Method)
  com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

PS. I have tested in multiple devices, and it happens for every device. So its not a device issue

boehlerlukas commented 2 years ago

Hey @junaedsiam ,

thanks for your bug report. Happy to take a look into this!

@niklasfessler this is something we could directly fix in v7.

Best regards, Lukas

boehlerlukas commented 2 years ago

@niklasfessler could you have another look into this tomorrow?

niklasfessler commented 2 years ago

@boehlerlukas I'm sure I can take a look and see if the problem is fixed.

niklasfessler commented 2 years ago

The issue is outdated. It was related to not stopping the replay properly when app is in background. Please use the newest RN Version:

npm i react-native-gleapsdk (7.0.3 atm)