pusher / pusher-channels-flutter

Pusher Channels client library for Flutter targeting IOS, Android, and WEB
MIT License
74 stars 133 forks source link

Repetitive crashes from Firebase Crashlytics dashboard for live app in app store #143

Open mohamedsalah414 opened 10 months ago

mohamedsalah414 commented 10 months ago

I have this repetitive error in iOS version I used pusher_channels_flutter: ^2.2.0

$s23pusher_channels_flutter32SwiftPusherChannelsFlutterPluginC14fetchAuthValue8socketID11channelName17completionHandlerySS_SSy0eD00eJ0CSgctFyypSgcfU_TA


0  libsystem_kernel.dylib         0x7198 __pthread_kill + 8
1  libsystem_pthread.dylib        0xd5f8 pthread_kill + 208
2  libsystem_c.dylib              0x1c4b8 abort + 124
3  libswiftCore.dylib             0x2f2998 swift::fatalError(unsigned int, char const*, ...) + 130
4  libswiftCore.dylib             0x2f29b4 swift::warningv(unsigned int, char const*, char*) + 26
5  libswiftCore.dylib             0x2ea6ec swift::swift_dynamicCastFailure(swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*, char const*) + 74
6  libswiftCore.dylib             0x2ea764 swift::_conformsToProtocol(swift::OpaqueValue const*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolDescriptorRef<swift::InProcess>, swift::TargetWitnessTable<swift::InProcess> const**) + 118
7  libswiftCore.dylib             0x2ee6ac swift_dynamicCastImpl(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*, swift::DynamicCastFlags) + 278
8  pusher_channels_flutter        0x9d88 $s23pusher_channels_flutter32SwiftPusherChannelsFlutterPluginC14fetchAuthValue8socketID11channelName17completionHandlerySS_SSy0eD00eJ0CSgctFyypSgcfU_TA + 156
9  pusher_channels_flutter        0x5bec $sypSgIegn_yXlSgIeyBy_TR + 84
10 Flutter                        0x5e1dd0 InternalFlutterGpuTestClass_Method + 6860
11 Flutter                        0x3e598 (Missing UUID 4c4c44da55553144a1f7c3e66c77eeff)
12 Flutter                        0x2e5d68 (Missing UUID 4c4c44da55553144a1f7c3e66c77eeff)
13 Flutter                        0x2e94fc (Missing UUID 4c4c44da55553144a1f7c3e66c77eeff)
14 CoreFoundation                 0xc1bb0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
15 CoreFoundation                 0x82de4 __CFRunLoopDoTimer + 884
16 CoreFoundation                 0x2c0fc __CFRunLoopDoTimers + 284
17 CoreFoundation                 0x755bc __CFRunLoopRun + 1940
18 CoreFoundation                 0x79d20 CFRunLoopRunSpecific + 584
19 GraphicsServices               0x1998 GSEventRunModal + 160
20 UIKitCore                      0x37180c -[UIApplication _run] + 868
21 UIKitCore                      0x371484 UIApplicationMain + 312
22 Runner                         0x8d54 main + 6 (AppDelegate.swift:6)
23 ???                            0x1bc6f4344 (Missing)```
benw-pusher commented 10 months ago

Could you share the code in use for this, along with an overview of when this error is encountered? For example, does it happen when connecting to Channels / receiving events?

mohamedsalah414 commented 10 months ago

I don't know when and how it happens, I have this repetitive crashes daily in firebase crashlytics

saurabhunify commented 10 months ago

Hi @benw-pusher. I am facing this issue of app crashing as well on a test flight build on my client's iphone. But I have figured the app crashes only when the iphone is running on latest ios version 17, as the app works fine on my iphone 13 pro max with ios 16. I have been using the same code for the app provided in the example app and its working as well. So I don't need to provide you any example code because app crashes with same code on ios 17 but works fine on earlier versions. I am using latest available version 2,2,0 of the package. Kindly help us resolve the issue as our team is stuck for release this app to the app store. Thanks is advance.

benw-pusher commented 9 months ago

I have tested the example app on an iOS 17 device and no crashes are observed. Do you know when this issue occurs? For example, subscribing to a particular channel type / receiving an event?

kadersaka commented 8 months ago

Hi @benw-pusher. I am facing this issue of app crashing as well on a test flight build on my client's iphone. But I have figured the app crashes only when the iphone is running on latest ios version 17, as the app works fine on my iphone 13 pro max with ios 16. I have been using the same code for the app provided in the example app and its working as well. So I don't need to provide you any example code because app crashes with same code on ios 17 but works fine on earlier versions. I am using latest available version 2,2,0 of the package. Kindly help us resolve the issue as our team is stuck for release this app to the app store. Thanks is advance.

Hi @saurabhunify I am facing the same issue. did. u find any solution?

kadersaka commented 8 months ago

the crash was caused by the onAuthorizer passed when initiating pusher. it was not returning expected type of response that was casted in the library code