Pushwoosh / pushwoosh-react-native-plugin

Other
57 stars 43 forks source link

[Bug]: RN 0.73.1 IOS [PushwooshPlugin window]: unrecognized selector sent to instance #161

Closed mbeck556 closed 6 months ago

mbeck556 commented 6 months ago

Documentation

Description

When I launch my app on IOS in Relesae Mode it crashes with the exception: [PushwooshPlugin window]: unrecognized selector sent to instance. Sometimes it will launch to the first screen but if I exit and then enter the app again it will crash. This issue doesn't happen in Debug Mode.

Bug severity

High

Steps to Reproduce

  1. Change the Build Configuration to Release
  2. Make sure Pushwoosh.init({ ... }) is called somewhere in the code. I have mine in App.tsx
  3. Open app
  4. Observe crash. You may need to leave and return to the app to get it to crash.

Your Pushwoosh React Native Plugin version

6.1.28

Last worked Pushwoosh React Native Plugin version (if any)

No response

Affected platforms

Affected OS versions and/or devices

RN 0.73.1 iOS 17+

Workaround

No response

Relevant log output

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PushwooshPlugin window]: unrecognized selector sent to instance 0x600001771400'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000180491128 __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x000000018008412c objc_exception_throw + 56
    2   CoreFoundation                      0x00000001804a5f78 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
    3   CoreFoundation                      0x0000000180495054 ___forwarding___ + 732
    4   CoreFoundation                      0x000000018049759c _CF_forwarding_prep_0 + 92
    5   LoopMobile                          0x0000000100a42f7c -[RCTDeviceInfo _interfaceOrientationDidChange] + 88
    6   LoopMobile                          0x0000000100a42f00 __46-[RCTDeviceInfo interfaceOrientationDidChange]_block_invoke + 28
    7   LoopMobile                          0x0000000100a27d7c RCTExecuteOnMainQueue + 44
    8   LoopMobile                          0x0000000100a42ea8 -[RCTDeviceInfo interfaceOrientationDidChange] + 100
    9   CoreFoundation                      0x00000001803c1878 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 140
    10  CoreFoundation                      0x00000001803c179c ___CFXRegistrationPost_block_invoke + 84
    11  CoreFoundation                      0x00000001803c0c8c _CFXRegistrationPost + 404
    12  CoreFoundation                      0x00000001803c0668 _CFXNotificationPost + 688
    13  Foundation                          0x0000000180d84cb4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
    14  UIKitCore                           0x00000001852ebd34 -[UIApplication _stopDeactivatingForReason:] + 1192
    15  UIKitCore                           0x00000001849a0ca4 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 272
    16  UIKitCore                           0x00000001849a0f4c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 576
    17  UIKitCore                           0x00000001849a0950 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 244
    18  UIKitCore                           0x00000001849aac24 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_blo  19  UIKitCore                           0x0000000184db957c +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 656
    20  UIKitCore                           0x0000000184ece7a0 _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 196
    21  UIKitCore                           0x00000001849aa930 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 288
    22  UIKitCore                           0x0000000184808338 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.198 + 608
    23  UIKitCore                           0x00000001848070e8 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 208
    24  UIKitCore                           0x0000000184807fbc -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 220
    25  UIKitCore                           0x0000000184de0ffc -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 308
    26  FrontBoardServices                  0x0000000186e0455c -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 600
    27  FrontBoardServices                  0x0000000186e2dd4c __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 124
    28  FrontBoardServices                  0x0000000186e0fd6c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 160
    29  FrontBoardServices                  0x0000000186e2dc98 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 312
    30  libdispatch.dylib                   0x000000010252593c _dispatch_client_callout + 16
    31  libdispatch.dylib                   0x0000000102529534 _dispatch_block_invoke_direct + 392
    32  FrontBoardServices                  0x0000000186e4fb24 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 44
    33  FrontBoardServices                  0x0000000186e4fa00 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 196
    34  FrontBoardServices                  0x0000000186e4fb58 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 24
    35  CoreFoundation                      0x00000001803f1f18 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
    36  CoreFoundation                      0x00000001803f1e60 __CFRunLoopDoSource0 + 172
    37  CoreFoundation                      0x00000001803f15d0 __CFRunLoopDoSources0 + 232
    38  CoreFoundation                      0x00000001803ebcb8 __CFRunLoopRun + 768
    39  CoreFoundation                      0x00000001803eb5a4 CFRunLoopRunSpecific + 572
    40  GraphicsServices                    0x000000018e9fbae4 GSEventRunModal + 160
    41  UIKitCore                           0x00000001852f02e4 -[UIApplication _run] + 868
    42  UIKitCore                           0x00000001852f3f5c UIApplicationMain + 124
    43  LoopMobile                          0x00000001008f4da0 main + 80
    44  dyld                                0x0000000101525544 start_sim + 20
    45  ???                                 0x00000001016c20e0 0x0 + 4318830816
    46  ???                                 0x027b000000000000 0x0 + 178736610211266560
)
libc++abi: terminating due to uncaught exception of type NSException
enginseer-dev commented 6 months ago

Hi @mbeck556! Thank you for reporting the issue, we are looking into it.

AlbinNewSeed commented 6 months ago

Also experiencing this one.

enginseer-dev commented 6 months ago

Hi @mbeck556 and @AlbinNewSeed! The issue should be fixed with the latest release — 6.1.30, could you please try it and let us know about the results?

mbeck556 commented 6 months ago

@enginseer-dev 6.1.30 fixed the crash. Thank you!!!

enginseer-dev commented 6 months ago

@mbeck556 thank you for the update!