Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Crachtytics Says Connectivity_Plus #1991

Closed
7 tasks done
mariam-wahba opened this issue Jul 30, 2023 · 3 comments
Closed
7 tasks done

[Bug]: Crachtytics Says Connectivity_Plus #1991

mariam-wahba opened this issue Jul 30, 2023 · 3 comments
Labels
bug Something isn't working triage

Comments

@mariam-wahba
Copy link

Platform

IOS

Plugin

connectivity_plus

Version

4.0.1

Flutter SDK

3.10.3

Steps to reproduce

I have a flutter project that runs on android studio and xcode very well but when i upload the app on Testflight and install it then open the app, I'm stuck in the white screen !!!

here is my info.plst

info.plist

BGTaskSchedulerPermittedIdentifiers $(PRODUCT_BUNDLE_IDENTIFIER) CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName premium CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIcons CFBundleIcons~ipad CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleLocalizations en ar fr CFBundleName premium CFBundlePackageType APPL CFBundleShortVersionString $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion $(CURRENT_PROJECT_VERSION) FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED YES FIREBASE_ANALYTICS_COLLECTION_ENABLED NO FirebaseAppDelegateProxyEnabled FirebaseCrashlyticsCollectionEnabled FirebaseScreenReportingEnabled LSApplicationQueriesSchemes https http LSRequiresIPhoneOS LSSupportsOpeningDocumentsInPlace NSAppTransportSecurity NSAllowsArbitraryLoads NSCameraUsageDescription This app requires access to the camera. NSLocationWhenInUseUsageDescription The app needs location permission NSPhotoLibraryAddUsageDescription This app requires read and write access to the photo library. NSPhotoLibraryUsageDescription This app requires access to the photo library. UIApplicationSupportsIndirectInputEvents UIBackgroundModes audio fetch processing remote-notification UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiresFullScreen UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIViewControllerBasedStatusBarAppearance here is my AppDelagate.swift

AppDelegate.swift
import UIKit
import Flutter
import GoogleMaps
import Firebase

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GMSServices.provideAPIKey("AIzaSyBcFDUVujJr94z8mGjpEk47MOmKE7IJUrg") // Replace with your Google Maps API Key
GeneratedPluginRegistrant.register(with: self)

  if #available(iOS 10.0, *) {
      UNUserNotificationCenter.current().delegate = self
  }

  if #available(iOS 10.0, *) {
      let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
      UNUserNotificationCenter.current().requestAuthorization(
        options: authOptions,
        completionHandler: { _, _ in }
      )
  } else {
      let settings: UIUserNotificationSettings =
          UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
      application.registerUserNotificationSettings(settings)
  }

  application.registerForRemoteNotifications()

  return super.application(application, didFinishLaunchingWithOptions: launchOptions)

}

override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
// Pass the device token to Firebase Cloud Messaging
Messaging.messaging().apnsToken = deviceToken
}
}

Code Sample

import 'package:connectivity_plus/connectivity_plus.dart';

class BaseRepository {
  Future<bool> hasNetwork() async {
    var connectivityResult = await (Connectivity().checkConnectivity());
    if (connectivityResult == ConnectivityResult.mobile) {
      // I am connected to a mobile network.
      return true;
    } else if (connectivityResult == ConnectivityResult.wifi) {
      // I am connected to a wifi network.
      return true;
    } else {
      return false;
    }
  }
}


  Future<User?> login(LoginRequest request) async {
    if (await hasNetwork()) {
      return _apiProvider.login(request);
    } else {
      showMessage("Offline Mode", FontAwesomeIcons.wifi);
      return null;
    }
  }

Logs

crashlytics report says this i don't know what is missing, why the white screen happens only on testflight i even downgraded connectivity_plus bec it was the only thing i changed in the whole so i thought that bec i upgraded it the crash happens but no it does not have anything to do with this crash

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

Crashlytics - Stack trace
Application: com.xlab.premium.premium
Platform: apple
Version: 1.1.5 (32)
Issue: 733b1e7eae31647f26ef311a5e51a53d
Session: e7599591a8af4ac6873654eca45cda69_DNE_0_v2
Date: Wed Jul 19 2023 14:46:02 GMT+0300 (Eastern European Summer Time)

Crashed: com.apple.main-thread
0 ??? 0x1860ffff0 (Missing)
1 connectivity_plus 0x8e04 $s17connectivity_plus27SwiftConnectivityPlusPluginC8register4withySo07FlutterF9Registrar_p_tFZ + 116
2 connectivity_plus 0x8e04 $s17connectivity_plus27SwiftConnectivityPlusPluginC8register4withySo07FlutterF9Registrar_p_tFZ + 116
3 connectivity_plus 0x91a8 $s17connectivity_plus27SwiftConnectivityPlusPluginC8register4withySo07FlutterF9Registrar_p_tFZTo + 56
4 connectivity_plus 0x6200 +[ConnectivityPlusPlugin registerWithRegistrar:] + 72
5 Runner 0x5c34 +[GeneratedPluginRegistrant registerWithRegistry:] + 144 (GeneratedPluginRegistrant.m:144)
6 Runner 0x62e8 AppDelegate.application(:didFinishLaunchingWithOptions:) + 14 (AppDelegate.swift:14)
7 Runner 0x6b3c @objc AppDelegate.application(:didFinishLaunchingWithOptions:) ()
8 ??? 0x183c5e26c (Missing)
9 ??? 0x183e32ae8 (Missing)
10 ??? 0x183e1c20c (Missing)
11 ??? 0x183c89f7c (Missing)
12 ??? 0x183af0ca0 (Missing)
13 ??? 0x183c136d4 (Missing)
14 ??? 0x183d28cb0 (Missing)
15 ??? 0x183f51184 (Missing)
16 ??? 0x183ee0ec4 (Missing)
17 ??? 0x183af19ec (Missing)
18 ??? 0x183bad5dc (Missing)
19 ??? 0x183af377c (Missing)
20 ??? 0x183bd7e2c (Missing)
21 ??? 0x18402d90c (Missing)
22 ??? 0x183b21424 (Missing)
23 ??? 0x183b631c4 (Missing)
24 ??? 0x183c8e9e4 (Missing)
25 ??? 0x183bd6248 (Missing)
26 ??? 0x19283ac50 (Missing)
27 ??? 0x19285cf98 (Missing)
28 ??? 0x19281dbdc (Missing)
29 ??? 0x19281efd4 (Missing)
30 ??? 0x18136c094 (Missing)
31 ??? 0x18130f150 (Missing)
32 ??? 0x19281f2ac (Missing)
33 ??? 0x19281e7c0 (Missing)
34 ??? 0x192822960 (Missing)
35 CoreFoundation 0xb3448 + 24
36 CoreFoundation 0xc3578 + 204
37 CoreFoundation 0x5734 + 256
38 CoreFoundation 0xae08 + 768
39 CoreFoundation 0x1e174 CFRunLoopRunSpecific + 572
40 ??? 0x1a2152988 (Missing)
41 ??? 0x183e3a7d8 (Missing)
42 ??? 0x183bd3c70 (Missing)
43 Runner 0x6cb4 main + 7 (AppDelegate.swift:7)
44 ??? 0x105b284d0 (Missing)

Thread
0 ??? 0x1bbf66014 (Missing)
1 ??? 0x1dcacce4c (Missing)
2 ??? 0x1dcacc92c (Missing)

Thread
0 ??? 0x1bbf66014 (Missing)
1 ??? 0x1dcacce4c (Missing)
2 ??? 0x1dcacc92c (Missing)

com.google.firebase.crashlytics.ios.binary-images
0 CoreFoundation 0x5c04 + 588
1 CoreFoundation 0x5a98 + 224
2 CoreFoundation 0x4e6d4 CFDictionaryGetValueIfPresent + 108
3 Foundation 0x44220 + 644
4 Foundation 0x8dc48 + 120
5 Foundation 0x3d7f4 + 164
6 Foundation 0x5c838 + 36
7 FirebaseCrashlytics 0xbdc0 FIRCLSBinaryImageRecordLibraryFrameworkInfo + 272
8 FirebaseCrashlytics 0xbc2c FIRCLSBinaryImageRecordSlice + 244
9 FirebaseCrashlytics 0xb850 FIRCLSProcessBinaryImageChange + 144
10 ??? 0x18136c094 (Missing)
11 ??? 0x18131273c (Missing)
12 ??? 0x1813131f4 (Missing)
13 ??? 0x18131cec8 (Missing)
14 ??? 0x1dcacce00 (Missing)
15 ??? 0x1dcacc92c (Missing)

com.apple.uikit.eventfetch-thread
0 ??? 0x1bbf65aac (Missing)
1 ??? 0x1bbf6607c (Missing)
2 CoreFoundation 0x6c88 + 368
3 CoreFoundation 0xaf90 + 1160
4 CoreFoundation 0x1e174 CFRunLoopRunSpecific + 572
5 Foundation 0x17eac + 232
6 Foundation 0x56fd0 + 88
7 ??? 0x183db9c44 (Missing)
8 Foundation 0x64bdc + 792
9 ??? 0x1dcace338 (Missing)
10 ??? 0x1dcacc938 (Missing)

com.apple.UIKit.KeyboardManagement
0 ??? 0x1bbf66688 (Missing)
1 ??? 0x18130cd60 (Missing)
2 ??? 0x18130cb4c (Missing)
3 ??? 0x181319bfc (Missing)
4 ??? 0x181319820 (Missing)
5 ??? 0x183ca4768 (Missing)
6 CoreFoundation 0x20cf0 + 144
7 CoreFoundation 0x3cdd8 + 300
8 Foundation 0x334d8 + 20
9 Foundation 0x53328 + 568
10 Foundation 0x2f2d8 + 208
11 ??? 0x1dcb032ec (Missing)
12 ??? 0x1dcaf7568 (Missing)
13 ??? 0x18136c10c (Missing)
14 ??? 0x181325840 (Missing)
15 ??? 0x181312610 (Missing)
16 ??? 0x181313224 (Missing)
17 ??? 0x18131cec8 (Missing)
18 ??? 0x1dcacce00 (Missing)
19 ??? 0x1dcacc92c (Missing)

Thread
0 ??? 0x1dcacc924 (Missing)

Thread
0 ??? 0x1bbf66014 (Missing)
1 ??? 0x1dcacce4c (Missing)
2 ??? 0x1dcacc92c (Missing)

Thread
0 ??? 0x1bbf66014 (Missing)
1 ??? 0x1dcacce4c (Missing)
2 ??? 0x1dcacc92c (Missing)

com.google.firebase.crashlytics.MachExceptionServer
0 FirebaseCrashlytics 0x34ca8 FIRCLSProcessGetThreadState + 308
1 FirebaseCrashlytics 0x34000 FIRCLSProcessRecordThread + 400
2 FirebaseCrashlytics 0x33d90 FIRCLSProcessRecordAllThreads + 172
3 FirebaseCrashlytics 0x24bf4 FIRCLSHandler + 64
4 FirebaseCrashlytics 0x28f78 FIRCLSMachExceptionRecord + 628
5 FirebaseCrashlytics 0x28b3c FIRCLSMachExceptionDispatchMessage + 628
6 FirebaseCrashlytics 0x2876c FIRCLSMachExceptionServer + 80
7 ??? 0x1dcace338 (Missing)
8 ??? 0x1dcacc938 (Missing)



And when i removed connectivity_plus and ran the code on xcode this happened in the console


2023-07-30 11:48:15.816483+0300 Runner[1100:32881] flutter: MissingPluginException(No implementation found for method check on channel dev.fluttercommunity.plus/connectivity)
2023-07-30 11:48:15.816668+0300 Runner[1100:32881] flutter:
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7)

#1 BaseRepository.hasNetwork (package:premium/repositories/base_repository.dart:14:30)

#2 Repository.getServerUrl (package:premium/repositories/repository.dart:85:9)

2023-07-30 11:48:15.816820+0300 Runner[1100:32881] flutter: ----------------------------------------------------
2023-07-30 11:48:15.854546+0300 Runner[1100:32881] flutter: ----------------FIREBASE CRASHLYTICS----------------
2023-07-30 11:48:15.854725+0300 Runner[1100:32881] flutter: MissingPluginException(No implementation found for method check on channel dev.fluttercommunity.plus/connectivity)
2023-07-30 11:48:15.854844+0300 Runner[1100:32881] flutter:
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7)

#1 BaseRepository.hasNetwork (package:premium/repositories/base_repository.dart:14:30)

#2 Repository.getServerUrl (package:premium/repositories/repository.dart:85:9)

#3 SplashViewModel.getUrl (package:premium/pages/viewmodel/splash_viewmodel.dart:20:9)

2023-07-30 11:48:15.854910+0300 Runner[1100:32881] flutter: ----------------------------------------------------
2023-07-30 11:48:16.490527+0300 Runner[1100:32879] 10.12.0 - [FirebaseCrashlytics][I-CLS000000] Crashlytics skipped rotating the Install ID during urgent mode because it is run on the main thread, which can't succeed. This can happen if the app crashed the last run and Crashlytics is uploading urgently.
2023-07-30 11:48:22.157803+0300 Runner[1100:32897] 10.12.0 - [FirebaseCrashlytics][I-CLS000000] Crashlytics skipped rotating the Install ID during urgent mode because it is run on the main thread, which can't succeed. This can happen if the app crashed the last run and Crashlytics is uploading urgently.

Flutter Doctor

flutter doctor -v      
[✓] Flutter (Channel stable, 3.10.3, on macOS 13.4 22F66 darwin-x64, locale en-EG)
    • Flutter version 3.10.3 on channel stable at /Users/software/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f92f44110e (8 weeks ago), 2023-06-01 18:17:33 -0500
    • Engine revision 2a3401c9bb
    • Dart version 3.0.3
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/software/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

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

[✓] Android Studio (version 2022.1)
    • 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.15+0-b2043.56-8887301)

[!] Android Studio
    • Android Studio at /Users/software/.Trash/Android Studio Preview.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
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Connected device (2 available)
    • Samer’s iPhone (mobile) • bd07ed03134ee9b3800a787efeb3fe9ea0106062 • ios        • iOS 15.7.7 19H357
    • macOS (desktop)         • macos                                    • darwin-x64 • macOS 13.4 22F66 darwin-x64

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

! Doctor found issues in 1 category.

Checklist before submitting a bug

  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@mariam-wahba mariam-wahba added bug Something isn't working triage labels Jul 30, 2023
@mariam-wahba mariam-wahba changed the title Crachtytics Says Connectivity_Plus [Bug]: Crachtytics Says Connectivity_Plus Jul 31, 2023
@vbuberen
Copy link
Collaborator

vbuberen commented Aug 3, 2023

@mariam-wahba Tagging people isn't the way to go when you want to get attention to your issue. This is a formal warning.

@vbuberen
Copy link
Collaborator

vbuberen commented Aug 3, 2023

Start with properly formatting the report, because currently it is hard to read it.

Also, would good to know more about

crashlytics report says this i don't know what is missing, why the white screen happens only on testflight i even downgraded connectivity_plus bec it was the only thing i changed in the whole so i thought that bec i upgraded it the crash happens but no it does not have anything to do with this crash

The issue appeared when you updated the connectivity_plus?

@vbuberen
Copy link
Collaborator

Closing due to no reply from the reporter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants