firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.47k stars 1.43k forks source link

App crashes - grpc_core::ExecCtx::ExecCtx() EXC_BAD_ACCESS (KERN_INVALID_ADDRESS) #11590

Closed DahanSimon closed 11 months ago

DahanSimon commented 11 months ago

Description

App crashes almost at launch on device running on iOS 12.5.7 with production build but everything is fine with preprod build.

Reproducing the issue

No response

Firebase SDK Version

10.12.0

Xcode Version

14.3.1

Installation Method

CocoaPods

Firebase Product(s)

Analytics, App Check, App Distribution, Authentication, Crashlytics, Database, Firestore, Installations, Storage

Targeted Platforms

iOS

Relevant Log Output

grpc_core::ExecCtx::ExecCtx() EXC_BAD_ACCESS (KERN_INVALID_ADDRESS)

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
```json Replace this line with the contents of your Package.resolved. ```

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml platform :ios, '12.0' # ignore all warnings from all pods inhibit_all_warnings! # select default xcodeproj project 'XXX/XXX.xcodeproj' # ――― Sources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # source 'https://github.com/CocoaPods/Specs.git' # ――― Setup ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # post_install do |installer_representation| installer_representation.pods_project.targets.each do |target| target.build_configurations.each do |config| if config.name != 'Release' config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'DEBUG=1', 'PREPROD=1'] config.build_settings['OTHER_SWIFT_FLAGS'] = ['$(inherited)', '-DDEBUG', '-DPREPROD'] end config.build_settings.delete('CODE_SIGNING_ALLOWED') config.build_settings.delete('CODE_SIGNING_REQUIRED') end # if target.name == 'MessageKit' # target.build_configurations.each do |config| # config.build_settings['SWIFT_VERSION'] = '4.0' # end # end end end # ――― Install ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # def shared_pods use_frameworks! workspace 'leshabitues-shop' # Network pod 'AFNetworking' pod 'Alamofire' pod 'AlamofireImage' pod 'AlamofireNetworkActivityIndicator' pod 'DatadogSDKAlamofireExtension' pod 'SwiftyJSON' pod 'SDWebImage' # Facebook pod 'FacebookCore' pod 'FacebookLogin' pod 'FacebookShare' # Chat pod 'MessageKit' pod 'InputBarAccessoryView' pod 'Firebase' pod 'Firebase/Auth' pod 'Firebase/Storage' pod 'FirebaseUI/Firestore' pod 'FirebaseUI/Database' # Logs pod 'Firebase/Crashlytics' pod 'Firebase/Analytics' # Database pod 'Realm' pod 'RealmSwift' # Components pod 'FSCalendar', '= 2.7.9' # Stats pod 'Charts', '= 4.1.0' # Utilities pod 'Extra/UIKit' pod 'IQKeyboardManagerSwift' pod 'JEKScrollableSectionCollectionViewLayout' pod 'PhoneNumberKit' pod 'Reusable/View' pod 'SwiftGen' pod 'SwiftLint' pod 'SwiftMessages' pod 'SwifterSwift' pod 'lottie-ios' pod 'youtube-ios-player-helper' pod 'Instructions' pod 'AssetChecker', :git => 'https://github.com/freshOS/AssetChecker.git' end def testing_pods pod 'KIF' pod 'Quick' pod 'Nimble' end target 'XXX' do platform :ios, '12.0' shared_pods end target 'XXX-Preprod' do platform :ios, '12.0' shared_pods end target 'XXXTests' do platform :ios, '12.0' shared_pods testing_pods end ```
google-oss-bot commented 11 months ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

hermuxo commented 11 months ago

More examples: https://github.com/firebase/flutterfire/issues/11216

DahanSimon commented 11 months ago

@hermuxo Thanks for your comment but the app one this link https://github.com/firebase/flutterfire/issues/11216 is developed using flutter so the version numbers are not corresponding to the iOS SDK I fixed it by switching from cocoapods to Swift Package Manager

hermuxo commented 11 months ago

@DahanSimon totally just wanted to confirm it's not just you 👍
Another issue: https://github.com/firebase/firebase-ios-sdk/issues/11509

rizafran commented 11 months ago

Thanks for reporting, @DahanSimon. First off, could you provide the full stack trace of your issue to investigate?

DahanSimon commented 11 months ago

@rizafran The stack trace :

Crashed: com.google.firebase.firestore 0 grpcpp 0x5358 grpc_core::ExecCtx::ExecCtx() + 112 1 grpcpp 0x2b5e8 grpc::SecureChannelCredentials::~SecureChannelCredentials() + 28 2 grpcpp 0x2b72c std::1::shared_ptr_pointer<grpc::SecureChannelCredentials, std::1::shared_ptr::__shared_ptr_default_delete<grpc::ChannelCredentials, grpc::SecureChannelCredentials>, std::1::allocator >::on_zero_shared() + 20 3 FirebaseFirestore 0x8f3ac firebase::firestore::remote::GrpcConnection::CreateChannel() const + 424 4 FirebaseFirestore 0x8f114 firebase::firestore::remote::GrpcConnection::EnsureActiveStub() + 128 5 FirebaseFirestore 0x8f858 firebase::firestore::remote::GrpcConnection::CreateStream(absl::lts_20220623::string_view, firebase::firestore::credentials::AuthToken const&, std::1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, firebase::firestore::remote::GrpcStreamObserver) + 60 6 FirebaseFirestore 0x133aa0 firebase::firestore::remote::Stream::ResumeStartWithCredentials(firebase::firestore::util::StatusOr const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) + 132 7 FirebaseFirestore 0x135164 std::1::function::func<firebase::firestore::remote::Stream::RequestCredentials()::$_0::operator()(absl::lts_20220623::optional<firebase::firestore::util::StatusOr > const&, absl::lts_20220623::optional<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > > const&) const::'lambda'(), std::1::allocator<firebase::firestore::remote::Stream::RequestCredentials()::$_0::operator()(absl::lts_20220623::optional<firebase::firestore::util::StatusOr > const&, absl::lts_20220623::optional<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > > const&) const::'lambda'()>, void ()>::operator()() + 72 8 FirebaseFirestore 0x82b4 firebase::firestore::util::AsyncQueue::ExecuteBlocking(std::__1::function<void ()> const&) + 68 9 FirebaseFirestore 0x14575c firebase::firestore::util::Task::ExecuteAndRelease() + 184 10 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16 11 libdispatch.dylib 0x9324 _dispatch_lane_serial_drain$VARIANT$mp + 592 12 libdispatch.dylib 0x9e40 _dispatch_lane_invoke$VARIANT$mp + 428 13 libdispatch.dylib 0x124ac _dispatch_workloop_worker_thread + 596 14 libsystem_pthread.dylib 0xc114 _pthread_wqthread + 304 15 libsystem_pthread.dylib 0xecd4 start_wqthread + 4

paulb777 commented 11 months ago

Closing as a duplicate of #11509. Let's keep the discussion centralized there.