darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
197 stars 142 forks source link

FB sdk sometimes crashes app #357

Closed MlecznyU closed 1 year ago

MlecznyU commented 1 year ago

What version are you using?

5.0.0-6.0.0

What OS and version are you using to local deploy your application?

I am using Xcode cloud

What platforms are you seeing the problem on?

iOS

pubspec.yaml

environment:
  sdk: '>=3.0.0 <4.0.0'

dependencies:
  flutter_localizations:
    sdk: flutter
  flutter:
    sdk: flutter
  firebase_core: ^2.13.1
  firebase_storage: ^11.2.2
  firebase_auth: ^4.6.2
  firebase_dynamic_links: ^5.3.2
  firebase_crashlytics: ^3.3.2
  firebase_messaging: ^14.6.2
  firebase_analytics: ^10.4.2
  firebase_remote_config: ^4.2.2
  cloud_firestore: ^4.8.0
  cloud_functions: ^4.3.2
  reorderables: ^0.6.0
  carousel_slider: ^4.2.1
  rxdart: ^0.26.0
  intl: ^0.18.0
  cached_network_image: ^3.2.3
  pedantic: ^1.11.0
  path_drawing: ^1.0.1
  audioplayers: ^5.0.0
  image_picker: ^0.8.7+5
  mime: ^1.0.0
  flutter_local_notifications: ^15.1.0+1
  flutter_svg: ^2.0.6
  flutter_cupertino_datetime_picker: 3.0.0
  sprintf: ^7.0.0
  auto_size_text: ^3.0.0
  unique_identifier: ^0.3.0
  url_launcher: ^6.1.11
  dots_indicator: ^3.0.0
  video_player: ^2.6.1
  flutter_html: ^3.0.0-beta.2
  wakelock: ^0.6.2
  connectivity_plus: 4.0.1
  google_sign_in: ^6.1.3
  flutter_facebook_auth: ^6.0.0
  package_info: ^2.0.0
  shared_preferences: ^2.1.1
  device_info_plus: ^8.2.2
  devicelocale: ^0.6.0
  share_plus: ^4.5.2
  lottie: ^1.0.1
  flutter_secure_storage: ^8.0.0
  fluttertoast: ^8.2.2
  flutter_rating_bar: ^4.0.1
  video_trimmer:
    git:
      ref: "v1.2.0_dart_v3.0"
      url: https://github.com/MlecznyU/video_trimmer.git
  rflutter_alert: ^2.0.7
  flutter_native_timezone:
    git:
      ref: "master"
      url: https://github.com/ArturAntin/flutter_native_timezone
  in_app_review: ^2.0.6
  screenshot: ^2.1.0
  social_share: ^2.3.1
  app_settings: ^4.2.0
  http: ^1.0.0
  flutter_app_badger: ^1.5.0
  advertising_id: ^2.1.1
  smooth_page_indicator: ^1.1.0
  facebook_app_events: ^0.19.0
  file_picker: ^3.0.4
  encrypt: ^5.0.1
  scrollable_positioned_list: 0.3.8
  open_mail_app: ^0.4.5
  purchases_flutter: ^4.10.2
  stream_transform: ^2.1.0
  provider: ^6.0.5
  logger: ^1.4.0
  collection: ^1.17.1
  freezed_annotation: ^2.2.0
  get_it: ^7.2.0
  injectable: ^2.1.2
  json_annotation: ^4.8.0
  auto_route: ^6.3.0
  image: ^4.0.17
  flutter_image_compress: ^2.0.3
  blurhash_dart: ^1.2.1
  chewie: ^1.5.0
  bitmap:
    git:
      ref: "master"
      url: https://github.com/MlecznyU/bitmap.git

dependency_overrides:
  analyzer: 5.12.0

dev_dependencies:
  build_runner:
  flutter_test:
    sdk: flutter
  freezed: ^2.3.2
  json_serializable: ^6.6.1
  injectable_generator: ^2.1.6
  intl_utils: 2.8.3
  auto_route_generator: ^6.2.0

Describe the Bug

Since version 5.0.0, the app crashes for a few percentage of users. The logs in crashlytics are not helpful. The crash occurs as soon as the application is launched. With version flutter_facebook_auth: ^4.4.1+1 it works fine.

Expected Behavior

App should not crash

To Reproduce

Failed to reproduce the problem on a local device

Relevant log output

Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x00000001c3e7e690
0
Foundation
static URL._unconditionallyBridgeFromObjectiveC(_:) + 152
1
FBSDKCoreKit
FBSDKAEMManager.m - Line 89
__24-[FBSDKAEMManager setup]_block_invoke.9 + 89
2
FBSDKCoreKit
FBSDKSwizzler.m - Line 141
fb_swizzledMethod_5 + 141
3
(Missing)
...
22
Runner
AppDelegate.swift - Line 16
main + 16

flutter doctor -v

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/toma/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • Tomas phone (mobile) • 00008110-00123C811A09801E • ios            • iOS 16.5.1 20F75
    • macOS (desktop)      • macos                     • darwin-arm64   • macOS 13.4.1 22F82 darwin-arm64
    • Chrome (web)         • chrome                    • web-javascript • Google Chrome 115.0.5790.114
    ! Error: Tomasz’s Apple Watch needs to connect to determine its availability. Check the connection between the device and its companion iPhone, and the connection between the iPhone and Xcode. Both devices may also need to be restarted and unlocked. (code 1)

[✓] Network resources
    • All expected network resources are available.

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

darwin-morocho commented 1 year ago

@MlecznyU seems to be a facebook sdk bug. Please open your issue here https://github.com/facebook/facebook-ios-sdk