AppsFlyerSDK / appsflyer-flutter-plugin

Flutter Plugin for AppsFlyer SDK
MIT License
143 stars 112 forks source link

Failed assertion: line 85 pos 14: 'exp.hasMatch(appID)': is not true. #138

Closed tegarnugroho closed 3 years ago

tegarnugroho commented 3 years ago

I get this error when run on ios Device on InitSDK. I am using appsflyer_sdk version: ^6.3.2-nullsafety.0

flutter: ----------------FIREBASE CRASHLYTICS---------------- flutter: 'package:appsflyer_sdk/src/appsflyer_sdk.dart': Failed assertion: line 85 pos 14: 'exp.hasMatch(appID)': is not true. flutter:

0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)

1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)

2 AppsflyerSdk._validateAFOptions (package:appsflyer_sdk/src/appsflyer_sdk.dart:85:14)

3 AppsflyerSdk.initSdk. (package:appsflyer_sdk/src/appsflyer_sdk.dart:252:28)

4 _rootRunUnary (dart:async/zone.dart:1362:47)

5 _CustomZone.runUnary (dart:async/zone.dart:1265:19)

flutter: ----------------------------------------------------
GM-appsflyer commented 3 years ago

Hey @skripsimu,

It seems an exception is being thrown because of the app ID in the AppsFlyerOptions object. Did you make sure to provide the app ID for the iOS app (located in the dashboard) in a string format?

Example:

final AppsFlyerOptions options = AppsFlyerOptions(
    afDevKey: devKey,
    appId: "1234567890",
    showDebug: true,
    ); 

_appsflyerSdk = AppsflyerSdk(options);
tegarnugroho commented 3 years ago

Hi @GM-appsflyer i can make sure the appid i input is in string format. for github

Alabhya268 commented 6 months ago

@GM-appsflyer , I'm also facing the same issue, when "appsflyerSdk.initSdk" is called. AppFlyer version: ^6.12.2 Pls help resolve this issue.

Here are all the logs:-

` [AppFlyer bug] 'package:appsflyer_sdk/src/appsflyer_sdk.dart': Failed assertion: line 83 pos 14: 'exp.hasMatch(appID)': is not true. [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:appsflyer_sdk/src/appsflyer_sdk.dart': Failed assertion: line 83 pos 14: 'exp.hasMatch(appID)': is not true.

0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)

1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)

2 AppsflyerSdk._validateAFOptions (package:appsflyer_sdk/src/appsflyer_sdk.dart:83:14)

3 AppsflyerSdk.initSdk. (package:appsflyer_sdk/src/appsflyer_sdk.dart:162:28)

#4 AppViewModel.initAppFlyer (package:star_advantage/providers/app_providers.dart:154:7) ` Here is output Flutter doc -v ` [✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale en-IN) • Flutter version 3.16.0 on channel stable at /Users/alabhyasingh/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision db7ef5bf9f (5 weeks ago), 2023-11-15 11:25:44 -0800 • Engine revision 74d16627b9 • Dart version 3.2.0 • DevTools version 2.28.2 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /Users/alabhyasingh/Library/Android/sdk • Platform android-33, build-tools 33.0.1 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C65 • CocoaPods version 1.13.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.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 17.0.7+0-17.0.7b1000.6-10550314) [✓] VS Code (version 1.85.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.78.0 [✓] Connected device (3 available) • iPhone 15 Pro (mobile) • C206CD98-DEA3-49AD-923A-81D0853B1831 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.1.1 23B81 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 114.0.5735.133 ! Error: Browsing on the local area network for Alabhya’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources • All expected network resources are available. • No issues found! `
jamesjara commented 3 months ago

im deleting the AppsFlyerSDK a lot of errors like this, very dump flow, AppsflyerSdk , initsdk, pass options, etc... very tired of weird unsolved issues like this thread

EshetuLucas commented 2 months ago

Just remove the "id" part and you are good to go.