I am still new to the flutter & firebase project so forgive me if the problem I have seems a noobie problem.
So I created a Flutter Counseling booking app, a month ago everything was still working properly but suddenly 2 weeks ago, running the main dart I can't seem to pass the login page for both patients and the Counsellor. I have tried everything I've learned reading from here, but still can't get past the login page
here's the error
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
Note: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-3.7.0\android\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\location-4.4.0\android\src\main\java\com\lyokone\location\FlutterLocation.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
D/FlutterLocationService( 5127): Creating service.
D/FlutterLocationService( 5127): Binding to location service.
Debug service listening on ws://127.0.0.1:54200/0lbAJVSc1ck=/ws
Syncing files to device AOSP on IA Emulator...
D/EGL_emulation( 5127): eglMakeCurrent: 0xe56ef860: ver 2 0 (tinfo 0xcec2e5f0)
D/eglCodecCommon( 5127): setVertexArrayObject: set vao to 0 (0) 1 0
W/ActivityThread( 5127): handleWindowVisibility: no activity for token android.os.BinderProxy@c749585
D/EGL_emulation( 5127): eglMakeCurrent: 0xe56ef860: ver 2 0 (tinfo 0xcec2e5f0)
D/EGL_emulation( 5127): eglMakeCurrent: 0xe56ef860: ver 2 0 (tinfo 0xcec2e5f0)
W/xample.enasiha( 5127): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
D/NetworkSecurityConfig( 5127): No Network Security Config specified, using platform default
W/System ( 5127): Ignoring header X-Firebase-Locale because its value was null.
I've already enabled both email/password and google sign in method on my Firebase, I use this as my security rule as I am still develop the App
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
I really don't know what to do anymore so i hope that you guys can shed some light what i did wrong and what i need to do in order to get through my login page
here I include my build.gradle, app\build.gradle, pubspec.yaml, flutter doctor and ./gradlew build --warning-mode all
build.gradle
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.13'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app\build gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdk 31
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.enasihat"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 19
targetSdk 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
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.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3'
}
apply plugin: 'com.google.gms.google-services'
pubspec.yaml
name: enasihat
description: An app for common people to help them know about different diseases/symptoms and there medications.
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
simple_animations: 4.2.0
page_transition: ^2.0.9
cupertino_icons: ^1.0.5
google_fonts: ^3.0.1
toast: ^0.3.0
cloud_firestore:
google_sign_in: ^5.4.1
firebase_auth: ^3.4.1
url_launcher: ^6.1.4
location: ^4.4.0
firebase_core: ^1.19.1
booking_calendar: ^1.1.4
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/
- android/build.gradle
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.19043.1949], locale en-MY)
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.8.3)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.70.2)
[√] Connected device (3 available)
[√] HTTP Host Availability
./gradlew build --warning-mode all
PS C:\Users\Karasu\AndroidStudioProjects\enasihat\android> ./gradlew build --warning-mode all
> Configure project :app
The AbstractArchiveTask.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the destinationDirectory property in
stead. See https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:destinationDi
r for more details.
at FlutterPlugin$_addFlutterTasks_closure21$_closure47.doCall(C:\development\flutter\packages\flutter_tools\gradle\flutter.gradle:917)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The AbstractArchiveTask.archiveName property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the archiveFileName property instead. S
ee https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:archiveName for more
details.
at FlutterPlugin$_addFlutterTasks_closure21$_closure47.doCall(C:\development\flutter\packages\flutter_tools\gradle\flutter.gradle:918)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
IncrementalTaskInputs has been deprecated. This is scheduled to be removed in Gradle 8.0. On method 'IncrementalTask.taskAction$gradle_core' use 'org.gradle.work.I
nputChanges' instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.5.1/userguide/upgrading_version_7.html#incremental_task_inputs
_deprecation
at FlutterPlugin$_addFlutterTasks_closure21$_closure49.doCall(C:\development\flutter\packages\flutter_tools\gradle\flutter.gradle:955)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
> Task :firebase_auth:compileDebugJavaWithJavac
Note: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-3.7.0\android\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugi
n.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :app:compressDebugAssets
Execution optimizations have been disabled for task ':app:compressDebugAssets' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'C:\Users\Karasu\AndroidStudioProjects\enasihat\build\app\intermediates\assets\debug\mergeDebugAssets'.
Reason: Task ':app:compressDebugAssets' uses this output of task ':app:copyFlutterAssetsDebug' without declaring an explicit or implicit dependency. This can lead
to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.ht
ml#implicit_dependency for more details about this problem.
Gradle detected a problem with the following location: 'C:\Users\Karasu\AndroidStudioProjects\enasihat\build\app\intermediates\assets\debug\mergeDebugAssets'. Reas
on: Task ':app:compressDebugAssets' uses this output of task ':app:copyFlutterAssetsDebug' without declaring an explicit or implicit dependency. This can lead to i
ncorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#i
mplicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimizations ar
e disabled to ensure correctness. See https://docs.gradle.org/7.5.1/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.
> Task :location:compileDebugKotlin
w: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\location-4.4.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (259, 125): Unnec
essary non-null assertion (!!) on a non-null receiver of type Array<out String>
w: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\location-4.4.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (261, 29): Unnece
ssary non-null assertion (!!) on a non-null receiver of type IntArray
> Task :location:compileDebugJavaWithJavac
Note: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\location-4.4.0\android\src\main\java\com\lyokone\location\FlutterLocation.java uses or overrides a
deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :app:stripDebugDebugSymbols
Unable to strip the following libraries, packaging them as they are: libflutter.so.
> Task :app:compressProfileAssets
Execution optimizations have been disabled for task ':app:compressProfileAssets' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'C:\Users\Karasu\AndroidStudioProjects\enasihat\build\app\intermediates\assets\profile\mergeProfileAsset
s'. Reason: Task ':app:compressProfileAssets' uses this output of task ':app:copyFlutterAssetsProfile' without declaring an explicit or implicit dependency. This c
an lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_pro
blems.html#implicit_dependency for more details about this problem.
Gradle detected a problem with the following location: 'C:\Users\Karasu\AndroidStudioProjects\enasihat\build\app\intermediates\assets\profile\mergeProfileAssets'.
Reason: Task ':app:compressProfileAssets' uses this output of task ':app:copyFlutterAssetsProfile' without declaring an explicit or implicit dependency. This can l
ead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problem
s.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimiza
tions are disabled to ensure correctness. See https://docs.gradle.org/7.5.1/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.
> Task :app:compressReleaseAssets
Execution optimizations have been disabled for task ':app:compressReleaseAssets' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'C:\Users\Karasu\AndroidStudioProjects\enasihat\build\app\intermediates\assets\release\mergeReleaseAsset
s'. Reason: Task ':app:compressReleaseAssets' uses this output of task ':app:copyFlutterAssetsRelease' without declaring an explicit or implicit dependency. This c
an lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_pro
blems.html#implicit_dependency for more details about this problem.
Gradle detected a problem with the following location: 'C:\Users\Karasu\AndroidStudioProjects\enasihat\build\app\intermediates\assets\release\mergeReleaseAssets'.
Reason: Task ':app:compressReleaseAssets' uses this output of task ':app:copyFlutterAssetsRelease' without declaring an explicit or implicit dependency. This can l
ead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problem
s.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimiza
tions are disabled to ensure correctness. See https://docs.gradle.org/7.5.1/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.
> Task :firebase_core:lintReportDebug
Wrote HTML report to file:///C:/Users/Karasu/AndroidStudioProjects/enasihat/build/firebase_core/reports/lint-results-debug.html
> Task :google_sign_in_android:lintReportDebug
Wrote HTML report to file:///C:/Users/Karasu/AndroidStudioProjects/enasihat/build/google_sign_in_android/reports/lint-results-debug.html
> Task :google_sign_in_android:compileDebugUnitTestJavaWithJavac
Note: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in_android-6.1.0\android\src\test\java\io\flutter\plugins\googlesignin\GoogleSignInTest
.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :google_sign_in_android:testDebugUnitTest
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
> Task :google_sign_in_android:compileProfileUnitTestJavaWithJavac
Note: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in_android-6.1.0\android\src\test\java\io\flutter\plugins\googlesignin\GoogleSignInTest
.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :google_sign_in_android:testProfileUnitTest
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
> Task :google_sign_in_android:compileReleaseUnitTestJavaWithJavac
Note: C:\development\flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in_android-6.1.0\android\src\test\java\io\flutter\plugins\googlesignin\GoogleSignInTest
.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :google_sign_in_android:testReleaseUnitTest
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
> Task :location:lintReportDebug
Wrote HTML report to file:///C:/Users/Karasu/AndroidStudioProjects/enasihat/build/location/reports/lint-results-debug.html
> Task :path_provider_android:lintReportDebug
Wrote HTML report to file:///C:/Users/Karasu/AndroidStudioProjects/enasihat/build/path_provider_android/reports/lint-results-debug.html
> Task :path_provider_android:testDebugUnitTest
> Task :url_launcher_android:lintReportDebug
Wrote HTML report to file:///C:/Users/Karasu/AndroidStudioProjects/enasihat/build/url_launcher_android/reports/lint-results-debug.html
> Task :url_launcher_android:testDebugUnitTest
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > stopListening_doesNothingWhenUnset STANDARD_OUT
Downloading from maven
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > stopListening_doesNothingWhenUnset STANDARD_ERROR
Downloading: org/robolectric/android-all/4.1.2_r1-robolectric-r1/android-all-4.1.2_r1-robolectric-r1.pom from repository sonatype at https://oss.sonatype.org/c
ontent/groups/public/
Transferring 2K from sonatype
Downloading: org/sonatype/oss/oss-parent/9/oss-parent-9.pom from repository sonatype at https://oss.sonatype.org/content/groups/public/
Transferring 6K from sonatype
Downloading: org/robolectric/android-all/4.1.2_r1-robolectric-r1/android-all-4.1.2_r1-robolectric-r1.jar from repository sonatype at https://oss.sonatype.org/c
ontent/groups/public/
Transferring 41879K from sonatype
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > stopListening_doesNothingWhenUnset FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > stopListening_unregistersExistingChannel FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > startListening_unregistersExistingChannel FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > onMethodCall_closeWebView FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > onMethodCall_canLaunchReturnsFalse FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > onMethodCall_launchReturnsNoActivityError FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > startListening_registersChannel FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > onMethodCall_launchReturnsTrue FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > onMethodCall_launchReturnsActivityNotFoundError FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.MethodCallHandlerImplTest > onMethodCall_canLaunchReturnsTrue FAILED
java.lang.RuntimeException at Sandbox.java:43
Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:137
Caused by: java.lang.RuntimeException at ReflectionHelpers.java:259
Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354
io.flutter.plugins.urllauncher.WebViewActivityTest > extractHeaders_returnsEmptyMapWhenHeadersBundleNull PASSED
11 tests completed, 10 failed
> Task :url_launcher_android:testDebugUnitTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':url_launcher_android:testDebugUnitTest'.
> There were failing tests. See the report at: file:///C:/Users/Karasu/AndroidStudioProjects/enasihat/build/url_launcher_android/reports/tests/testDebugUnitTest/in
dex.html
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Execution optimizations have been disabled for 3 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
BUILD FAILED in 7m 9s
936 actionable tasks: 322 executed, 614 up-to-date
I have deleted a few line of the PASSED test as I have reached the words limit