Ауль телефона Firebase возвращает: произошла внутренняя ошибка. [Код ошибки: 39]Android

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Ауль телефона Firebase возвращает: произошла внутренняя ошибка. [Код ошибки: 39]

Сообщение Anonymous »

Это не дублированный вопрос, и форумы не имеют четкого ответа! Код: 39 I /Flutter (
9898): произошла внутренняя ошибка. [Код ошибки: 39] < /p>
< /blockquote>
Что я сделал: < /p>

[*] Внесло SHA (1-256) Ключи к консоли Firebase < /li>
Antabled and Google In Method In Sight-in. и googleservice-info.plist в iOS/Runner
[*] Добавлена ​​(Auto) Firebase.json в основное местоположение проекта
Включить целостность воспроизведения в приложении для консоли Firebas /> Включен Google Play Api целостности в Google Cloud Console < /li>
Загрузка для воспроизведения в качестве внутреннего тестирования < /li>
ждал 1 день, чтобы избежать превышения квот и позволить конфигурациям принимать эффекты < /li>
< /ol>
my pubspec.yaml: < /p>
< /ol>
my pubspec.yaml: < /li>
< /ol>
my pubspec.yaml: < /li>
< /ol>
.dependencies:
flutter:
sdk: flutter

flutter_localizations:
sdk: flutter
intl: ^0.19.0
shared_preferences: ^2.3.1
firebase_core: ^3.3.0
firebase_auth: ^5.1.4
flutter_bloc: ^8.1.6
fluttertoast: ^8.2.8
cloud_firestore: ^5.2.1
image_picker: ^1.1.2
firebase_storage: ^12.1.3
mobile_scanner: ^5.1.1
omni_datetime_picker: ^2.0.3
pdf: ^3.11.1
printing: ^5.13.1
flutter_email_sender: ^6.0.3
pretty_qr_code: ^3.3.0
url_launcher: ^6.3.0
firebase_app_check: ^0.3.0+4
< /code>
my Project build.gradle: < /p>
buildscript {
ext.kotlin_version = '1.9.0'
repositories {
google()
mavenCentral()
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.gms:google-services:4.4.2"
}
}

rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
< /code>
my App build.gradle: < /p>
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
id "com.google.gms.google-services"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
localProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
namespace "com.---.----" //I hide this here
compileSdkVersion 34
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/bu ... on-id.html).
applicationId "com.---.----" //I hide this here
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/and ... figuration.
minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

signingConfigs {
release {
keyAlias localProperties['keyAlias']
keyPassword localProperties['keyPassword']
storeFile localProperties['storeFile'] ? file(localProperties['storeFile']) : null
storePassword localProperties['storePassword']
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
}
}
}

flutter {
source '../..'
}

dependencies {
implementation platform('com.google.firebase:firebase-bom:33.1.2')
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-appcheck-playintegrity'
}
< /code>
meain.dart: < /p>
void main() async {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
systemNavigationBarColor: Colors.white, // navigation bar color
statusBarColor: Colors.white, // status bar color
statusBarIconBrightness: Brightness.dark, // status bar icons' color
systemNavigationBarIconBrightness:
Brightness.light, //navigation bar icons' color
));
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await FirebaseAppCheck.instance.activate();
runApp(const MyApp());
}
< /code>
Мой код для проверки: < /p>
void _verifyPhone(AuthVerifyPhoneEvent event, emit) async {
await FirebaseAuth.instance.setSettings(appVerificationDisabledForTesting: false);
await FirebaseAuth.instance.verifyPhoneNumber(
phoneNumber: event.phone,
verificationCompleted: (PhoneAuthCredential credential) async {
await FirebaseAuth.instance.signInWithCredential(credential);
_onVerificationComplete();
},
verificationFailed: (FirebaseAuthException e) {
if (e.code == 'invalid-phone-number') {
add(AuthEmitStateEvent(
state: state.copyWith(error: "invalidPhoneNumber")));
} else {
------ I get this to work ------
print("---error:${e.message}");
add(AuthEmitStateEvent(state: state.copyWith(error: e.message)));
}
},
codeSent: (String verificationId, int? resendToken) {
this.verificationId = verificationId;
add(AuthEmitStateEvent(state: state.copyWith(pages: Pages.Code)));
},
codeAutoRetrievalTimeout: (String verificationId) {
this.verificationId = verificationId;
},
);
}
< /code>
Flutter Doctor: < /p>
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 13.6.7 22G720 darwin-x64, locale en-KG)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.92.1)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!


Подробнее здесь: https://stackoverflow.com/questions/788 ... ror-code39
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»