问:
Flutter problem: Lost connection to device
This error keeps coming up don't know why or how to solve it. Other times it just says: Error connecting to service protocol or fatal exception: java.lang.NoSuchMethodError: No static method getMainExecutor. I've tried different android emulators, flutter clean, and every other solutions found online, but no results yet. The projects builds with no error but doesn't seem to install or connect on the android emulators.

flutter run --verbose:

```[+7942 ms] √  Built build\app\outputs\flutter-apk\app-debug.apk.
[ +193 ms] executing: C:\Users\DELL\AppData\Local\Android\sdk\build-tools\32.1.0-rc1\aapt dump xmltree
C:\Users\DELL\OneDrive\Bureaublad\taxi_app\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[ +240 ms] Exit code 0 from: C:\Users\DELL\AppData\Local\Android\sdk\build-tools\32.1.0-rc1\aapt dump xmltree
C:\Users\DELL\OneDrive\Bureaublad\taxi_app\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[   +2 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1f
               A: android:compileSdkVersionCodename(0x01010573)="12" (Raw: "12")
               A: package="com.praveeshramroop.athena" (Raw: "com.praveeshramroop.athena")
               A: platformBuildVersionCode=(type 0x10)0x1f
               A: platformBuildVersionName=(type 0x10)0xc
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x17
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1f
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: uses-permission (line=15)
                 A: android:name(0x01010003)="android.permission.ACCESS_FINE_LOCATION" (Raw: "android.permission.ACCESS_FINE_LOCATION")
               E: uses-permission (line=16)
                 A: android:name(0x01010003)="android.permission.ACCESS_COARSE_LOCATION" (Raw: "android.permission.ACCESS_COARSE_LOCATION")
               E: meta-data (line=18)
                 A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                 A: android:value(0x01010024)=(type 0x10)0x2
               E: uses-permission (line=22)
                 A: android:name(0x01010003)="android.permission.WAKE_LOCK" (Raw: "android.permission.WAKE_LOCK")
               E: uses-permission (line=23)
                 A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
               E: uses-permission (line=24)
                 A: android:name(0x01010003)="android.permission.POST_NOTIFICATIONS" (Raw: "android.permission.POST_NOTIFICATIONS")
               E: uses-permission (line=25)
                 A: android:name(0x01010003)="com.google.android.c2dm.permission.RECEIVE" (Raw: "com.google.android.c2dm.permission.RECEIVE")
               E: uses-permission (line=26)
                 A: android:name(0x01010003)="com.google.android.gms.permission.AD_ID" (Raw: "com.google.android.gms.permission.AD_ID")
               E: uses-permission (line=27)
                 A: android:name(0x01010003)="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" (Raw:
                 "com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE")
               E: uses-feature (line=29)
                 A: android:glEsVersion(0x01010281)=(type 0x11)0x20000
                 A: android:required(0x0101028e)=(type 0x12)0xffffffff
               E: queries (line=33)
                 E: package (line=36)
                   A: android:name(0x01010003)="com.google.android.apps.maps" (Raw: "com.google.android.apps.maps")
               E: application (line=39)
                 A: android:label(0x01010001)="txapita" (Raw: "txapita")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="android.app.Application" (Raw: "android.app.Application")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:extractNativeLibs(0x010104ea)=(type 0x12)0x0
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: meta-data (line=46)
                   A: android:name(0x01010003)="com.google.android.geo.API_KEY" (Raw: "com.google.android.geo.API_KEY")
                   A: android:value(0x01010024)="AIzaSyC9Csx5p389I16yN3ar0DKLrehQbezEJ0E" (Raw: "AIzaSyC9Csx5p389I16yN3ar0DKLrehQbezEJ0E")
                 E: activity (line=50)
                   A: android:theme(0x01010000)=@0x7f0b0000
                   A: android:name(0x01010003)="com.praveeshramroop.athena.MainActivity" (Raw: "com.praveeshramroop.athena.MainActivity")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x400037b4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: intent-filter (line=66)
                     E: action (line=67)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=69)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                   E: intent-filter (line=71)
                     E: action (line=72)
                       A: android:name(0x01010003)="FLUTTER_NOTIFICATION_CLICK" (Raw: "FLUTTER_NOTIFICATION_CLICK")
                     E: category (line=74)
                       A: android:name(0x01010003)="android.intent.category.DEFAULT" (Raw: "android.intent.category.DEFAULT")
                 E: service (line=78)
                   A: android:name(0x01010003)="com.google.firebase.components.ComponentDiscoveryService" (Raw:
                   "com.google.firebase.components.ComponentDiscoveryService")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
                   E: meta-data (line=82)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestoreRegistrar"
                     (Raw: "com.google.firebase.components:io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestoreRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=85)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.auth.FlutterFirebaseAuthRegistrar" (Raw:
                     "com.google.firebase.components:io.flutter.plugins.firebase.auth.FlutterFirebaseAuthRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=88)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.messaging.FlutterFirebaseAppRegistrar" (Raw:
                     "com.google.firebase.components:io.flutter.plugins.firebase.messaging.FlutterFirebaseAppRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=91)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.core.FlutterFirebaseCoreRegistrar" (Raw:
                     "com.google.firebase.components:io.flutter.plugins.firebase.core.FlutterFirebaseCoreRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=94)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=97)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.database.DatabaseRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.database.DatabaseRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=100)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.storage.StorageRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.storage.StorageRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=103)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=106)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=109)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=112)
                     A:
                     android:name(0x01010003)="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar
                     " (Raw: "com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=115)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                 E: service (line=119)
                   A: android:name(0x01010003)="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingBackgroundService" (Raw:
                   "io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingBackgroundService")
                   A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=123)
                   A: android:name(0x01010003)="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingService" (Raw:
                   "io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingService")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   E: intent-filter (line=126)
                     E: action (line=127)
                       A: android:name(0x01010003)="com.google.firebase.MESSAGING_EVENT" (Raw: "com.google.firebase.MESSAGING_EVENT")
                 E: receiver (line=131)
                   A: android:name(0x01010003)="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingReceiver" (Raw:
                   "io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingReceiver")
                   A: android:permission(0x01010006)="com.google.android.c2dm.permission.SEND" (Raw: "com.google.android.c2dm.permission.SEND")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   E: intent-filter (line=135)
                     E: action (line=136)
                       A: android:name(0x01010003)="com.google.android.c2dm.intent.RECEIVE" (Raw: "com.google.android.c2dm.intent.RECEIVE")
                 E: provider (line=140)
                   A: android:name(0x01010003)="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingInitProvider" (Raw:
                   "io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingInitProvider")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:authorities(0x01010018)="com.praveeshramroop.athena.flutterfirebasemessaginginitprovider" (Raw:
                   "com.praveeshramroop.athena.flutterfirebasemessaginginitprovider")
                   A: android:initOrder(0x0101001a)=(type 0x10)0x63
                 E: activity (line=146)
                   A: android:theme(0x01010000)=@0x01030007
                   A: android:name(0x01010003)="io.flutter.plugins.urllauncher.WebViewActivity" (Raw: "io.flutter.plugins.urllauncher.WebViewActivity")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=151)
                   A: android:name(0x01010003)="com.lyokone.location.FlutterLocationService" (Raw: "com.lyokone.location.FlutterLocationService")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:foregroundServiceType(0x01010599)=(type 0x11)0x8
                 E: activity (line=157)
                   A: android:theme(0x01010000)=@0x01030010
                   A: android:name(0x01010003)="com.google.firebase.auth.internal.GenericIdpActivity" (Raw:
                   "com.google.firebase.auth.internal.GenericIdpActivity")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:excludeFromRecents(0x01010017)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x2
                   E: intent-filter (line=163)
                     E: action (line=164)
                       A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
                     E: category (line=166)
                       A: android:name(0x01010003)="android.intent.category.DEFAULT" (Raw: "android.intent.category.DEFAULT")
                     E: category (line=167)
                       A: android:name(0x01010003)="android.intent.category.BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
                     E: data (line=169)
                       A: android:scheme(0x01010027)="genericidp" (Raw: "genericidp")
                       A: android:host(0x01010028)="firebase.auth" (Raw: "firebase.auth")
                       A: android:path(0x0101002a)="/" (Raw: "/")
                 E: activity (line=175)
                   A: android:theme(0x01010000)=@0x01030010
                   A: android:name(0x01010003)="com.google.firebase.auth.internal.RecaptchaActivity" (Raw:
                   "com.google.firebase.auth.internal.RecaptchaActivity")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:excludeFromRecents(0x01010017)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x2
                   E: intent-filter (line=181)
                     E: action (line=182)
                       A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
                     E: category (line=184)
                       A: android:name(0x01010003)="android.intent.category.DEFAULT" (Raw: "android.intent.category.DEFAULT")
                     E: category (line=185)
                       A: android:name(0x01010003)="android.intent.category.BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
                     E: data (line=187)
                       A: android:scheme(0x01010027)="recaptcha" (Raw: "recaptcha")
                       A: android:host(0x01010028)="firebase.auth" (Raw: "firebase.auth")
                       A: android:path(0x0101002a)="/" (Raw: "/")
                 E: uses-library (line=194)
                   A: android:name(0x01010003)="androidx.window.extensions" (Raw: "androidx.window.extensions")
                   A: android:required(0x0101028e)=(type 0x12)0x0
                 E: uses-library (line=197)
                   A: android:name(0x01010003)="androidx.window.sidecar" (Raw: "androidx.window.sidecar")
                   A: android:required(0x0101028e)=(type 0x12)0x0
                 E: receiver (line=201)
                   A: android:name(0x01010003)="com.google.firebase.iid.FirebaseInstanceIdReceiver" (Raw:
                   "com.google.firebase.iid.FirebaseInstanceIdReceiver")
                   A: android:permission(0x01010006)="com.google.android.c2dm.permission.SEND" (Raw: "com.google.android.c2dm.permission.SEND")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   E: intent-filter (line=205)
                     E: action (line=206)
                       A: android:name(0x01010003)="com.google.android.c2dm.intent.RECEIVE" (Raw: "com.google.android.c2dm.intent.RECEIVE")
                 E: service (line=213)
                   A: android:name(0x01010003)="com.google.firebase.messaging.FirebaseMessagingService" (Raw:
                   "com.google.firebase.messaging.FirebaseMessagingService")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
                   E: intent-filter (line=217)
                     A: android:priority(0x0101001c)=(type 0x10)0xfffffe0c
                     E: action (line=218)
                       A: android:name(0x01010003)="com.google.firebase.MESSAGING_EVENT" (Raw: "com.google.firebase.MESSAGING_EVENT")
                 E: provider (line=222)
                   A: android:name(0x01010003)="com.google.firebase.provider.FirebaseInitProvider" (Raw:
                   "com.google.firebase.provider.FirebaseInitProvider")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:authorities(0x01010018)="com.praveeshramroop.athena.firebaseinitprovider" (Raw:
                   "com.praveeshramroop.athena.firebaseinitprovider")
                   A: android:initOrder(0x0101001a)=(type 0x10)0x64
                   A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
                 E: receiver (line=229)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementReceiver" (Raw:
                   "com.google.android.gms.measurement.AppMeasurementReceiver")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=235)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementService" (Raw:
                   "com.google.android.gms.measurement.AppMeasurementService")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=239)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementJobService" (Raw:
                   "com.google.android.gms.measurement.AppMeasurementJobService")
                   A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: uses-library (line=244)
                   A: android:name(0x01010003)="org.apache.http.legacy" (Raw: "org.apache.http.legacy")
                   A: android:required(0x0101028e)=(type 0x12)0x0
                 E: activity (line=248)
                   A: android:theme(0x01010000)=@0x01030010
                   A: android:name(0x01010003)="com.google.android.gms.common.api.GoogleApiActivity" (Raw:
                   "com.google.android.gms.common.api.GoogleApiActivity")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: meta-data (line=253)
                   A: android:name(0x01010003)="com.google.android.gms.version" (Raw: "com.google.android.gms.version")
                   A: android:value(0x01010024)=@0x7f060000
                 E: service (line=257)
                   A: android:name(0x01010003)="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery" (Raw:
                   "com.google.android.datatransport.runtime.backends.TransportBackendDiscovery")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   E: meta-data (line=260)
                     A: android:name(0x01010003)="backend:com.google.android.datatransport.cct.CctBackendFactory" (Raw:
[  +48 ms] executing: C:\Users\DELL\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:41253
[ +562 ms] 63706
[   +2 ms] Forwarded host port 63706 to device port 41253 for Observatory
[ +139 ms] Caching compiled dill
[ +413 ms] Connecting to service protocol: http://127.0.0.1:63706/zD4fjyFFW_s=/
[ +961 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:63706/zD4fjyFFW_s=/.
[+1089 ms] DDS is listening at http://127.0.0.1:63714/hGA51_XOf6Q=/.
[ +649 ms] Successfully connected to service protocol: http://127.0.0.1:63706/zD4fjyFFW_s=/
[+8314 ms] D/FlutterLocationService( 6516): Creating service.
[  +80 ms] D/FlutterLocationService( 6516): Binding to location service.
[+10590 ms] Service protocol connection closed.
[ +391 ms] Lost connection to device.
```
<p><strong>flutter doctor:</strong></p>
```[√] Flutter (Channel unknown, 3.0.5, on Microsoft Windows [Version 10.0.22000.1335], locale en-US)
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.1)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.73.1)
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!
```
<p><strong>pubspec.yaml</strong> file:</p>
```version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cloud_firestore:
  cupertino_icons: null
  firebase_auth:
  firebase_core:
  firebase_messaging:
  flutter_google_places: null
  flutter_spinkit: ^5.1.0
  geocoder:
  geoflutterfire:
  geolocator: ^7.7.0
  google_maps_flutter: null
  google_maps_webservice: null
  http: null
  location: ^4.4.0
  modal_bottom_sheet: ^2.0.1
  percent_indicator: ^4.2.1
  provider: null
  rxdart: any
  shared_preferences: ^2.0.15
  uuid: null
  url_launcher: ^6.0.5
  get_it: ^7.2.0
  plugin_platform_interface:
  geolocator_platform_interface:
  geocoding: 2.0.5
  google_api_availability:
  google_api_headers: ^1.1.1
  mockito: ^5.2.0

```
<p><strong>main.dart</strong> page:</p>
```import 'package:flutter/material.dart';
import 'package:athena/providers/app_state.dart';
import 'package:athena/providers/user.dart';
import 'package:athena/screens/login.dart';
import 'package:athena/screens/splash.dart';
import 'locators/service_locator.dart';
import 'screens/home.dart';
import 'package:provider/provider.dart';
import 'package:firebase_core/firebase_core.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  setupLocator();
  return runApp(MultiProvider(
    providers: [
      ChangeNotifierProvider<AppStateProvider>.value(
        value: AppStateProvider(),
      ),
      ChangeNotifierProvider<UserProvider>.value(
        value: UserProvider.initialize(),
      ),
    ],
    child: MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Athena',
      theme: ThemeData(
        primarySwatch: Colors.red,
      ),
      home: MyApp(),
    ),
  ));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    UserProvider auth = Provider.of<UserProvider>(context);
    switch (auth.status) {
      case Status.Uninitialized:
        return Splash();
      case Status.Unauthenticated:
      case Status.Authenticating:
        return LoginScreen();
      case Status.Authenticated:
        return MyHomePage();
      default:
        return LoginScreen();
    }
  }
}
```

Body:
This error keeps coming up don't know why or how to solve it. Other times it just says: Error connecting to service protocol or fatal exception: java.lang.NoSuchMethodError: No static method getMainExecutor. I've tried different android emulators, flutter clean, and every other solutions found online, but no results yet. The projects builds with no error but doesn't seem to install or connect on the android emulators.

flutter run --verbose:

[+7942 ms] √  Built build\app\outputs\flutter-apk\app-debug.apk.
[ +193 ms] executing: C:\Users\DELL\AppData\Local\Android\sdk\build-tools\32.1.0-rc1\aapt dump xmltree
C:\Users\DELL\OneDrive\Bureaublad\taxi_app\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[ +240 ms] Exit code 0 from: C:\Users\DELL\AppData\Local\Android\sdk\build-tools\32.1.0-rc1\aapt dump xmltree
C:\Users\DELL\OneDrive\Bureaublad\taxi_app\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[   +2 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1f
               A: android:compileSdkVersionCodename(0x01010573)="12" (Raw: "12")
               A: package="com.praveeshramroop.athena" (Raw: "com.praveeshramroop.athena")
               A: platformBuildVersionCode=(type 0x10)0x1f
               A: platformBuildVersionName=(type 0x10)0xc
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x17
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1f
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: uses-permission (line=15)
                 A: android:name(0x01010003)="android.permission.ACCESS_FINE_LOCATION" (Raw: "android.permission.ACCESS_FINE_LOCATION")
               E: uses-permission (line=16)
                 A: android:name(0x01010003)="android.permission.ACCESS_COARSE_LOCATION" (Raw: "android.permission.ACCESS_COARSE_LOCATION")
               E: meta-data (line=18)
                 A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                 A: android:value(0x01010024)=(type 0x10)0x2
               E: uses-permission (line=22)
                 A: android:name(0x01010003)="android.permission.WAKE_LOCK" (Raw: "android.permission.WAKE_LOCK")
               E: uses-permission (line=23)
                 A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
               E: uses-permission (line=24)
                 A: android:name(0x01010003)="android.permission.POST_NOTIFICATIONS" (Raw: "android.permission.POST_NOTIFICATIONS")
               E: uses-permission (line=25)
                 A: android:name(0x01010003)="com.google.android.c2dm.permission.RECEIVE" (Raw: "com.google.android.c2dm.permission.RECEIVE")
               E: uses-permission (line=26)
                 A: android:name(0x01010003)="com.google.android.gms.permission.AD_ID" (Raw: "com.google.android.gms.permission.AD_ID")
               E: uses-permission (line=27)
                 A: android:name(0x01010003)="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" (Raw:
                 "com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE")
               E: uses-feature (line=29)
                 A: android:glEsVersion(0x01010281)=(type 0x11)0x20000
                 A: android:required(0x0101028e)=(type 0x12)0xffffffff
               E: queries (line=33)
                 E: package (line=36)
                   A: android:name(0x01010003)="com.google.android.apps.maps" (Raw: "com.google.android.apps.maps")
               E: application (line=39)
                 A: android:label(0x01010001)="txapita" (Raw: "txapita")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="android.app.Application" (Raw: "android.app.Application")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:extractNativeLibs(0x010104ea)=(type 0x12)0x0
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: meta-data (line=46)
                   A: android:name(0x01010003)="com.google.android.geo.API_KEY" (Raw: "com.google.android.geo.API_KEY")
                   A: android:value(0x01010024)="AIzaSyC9Csx5p389I16yN3ar0DKLrehQbezEJ0E" (Raw: "AIzaSyC9Csx5p389I16yN3ar0DKLrehQbezEJ0E")
                 E: activity (line=50)
                   A: android:theme(0x01010000)=@0x7f0b0000
                   A: android:name(0x01010003)="com.praveeshramroop.athena.MainActivity" (Raw: "com.praveeshramroop.athena.MainActivity")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x400037b4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: intent-filter (line=66)
                     E: action (line=67)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=69)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                   E: intent-filter (line=71)
                     E: action (line=72)
                       A: android:name(0x01010003)="FLUTTER_NOTIFICATION_CLICK" (Raw: "FLUTTER_NOTIFICATION_CLICK")
                     E: category (line=74)
                       A: android:name(0x01010003)="android.intent.category.DEFAULT" (Raw: "android.intent.category.DEFAULT")
                 E: service (line=78)
                   A: android:name(0x01010003)="com.google.firebase.components.ComponentDiscoveryService" (Raw:
                   "com.google.firebase.components.ComponentDiscoveryService")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
                   E: meta-data (line=82)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestoreRegistrar"
                     (Raw: "com.google.firebase.components:io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestoreRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=85)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.auth.FlutterFirebaseAuthRegistrar" (Raw:
                     "com.google.firebase.components:io.flutter.plugins.firebase.auth.FlutterFirebaseAuthRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=88)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.messaging.FlutterFirebaseAppRegistrar" (Raw:
                     "com.google.firebase.components:io.flutter.plugins.firebase.messaging.FlutterFirebaseAppRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=91)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.core.FlutterFirebaseCoreRegistrar" (Raw:
                     "com.google.firebase.components:io.flutter.plugins.firebase.core.FlutterFirebaseCoreRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=94)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=97)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.database.DatabaseRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.database.DatabaseRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=100)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.storage.StorageRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.storage.StorageRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=103)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=106)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=109)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=112)
                     A:
                     android:name(0x01010003)="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar
                     " (Raw: "com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=115)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar" (Raw:
                     "com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw:
                     "com.google.firebase.components.ComponentRegistrar")
                 E: service (line=119)
                   A: android:name(0x01010003)="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingBackgroundService" (Raw:
                   "io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingBackgroundService")
                   A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=123)
                   A: android:name(0x01010003)="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingService" (Raw:
                   "io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingService")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   E: intent-filter (line=126)
                     E: action (line=127)
                       A: android:name(0x01010003)="com.google.firebase.MESSAGING_EVENT" (Raw: "com.google.firebase.MESSAGING_EVENT")
                 E: receiver (line=131)
                   A: android:name(0x01010003)="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingReceiver" (Raw:
                   "io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingReceiver")
                   A: android:permission(0x01010006)="com.google.android.c2dm.permission.SEND" (Raw: "com.google.android.c2dm.permission.SEND")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   E: intent-filter (line=135)
                     E: action (line=136)
                       A: android:name(0x01010003)="com.google.android.c2dm.intent.RECEIVE" (Raw: "com.google.android.c2dm.intent.RECEIVE")
                 E: provider (line=140)
                   A: android:name(0x01010003)="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingInitProvider" (Raw:
                   "io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingInitProvider")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:authorities(0x01010018)="com.praveeshramroop.athena.flutterfirebasemessaginginitprovider" (Raw:
                   "com.praveeshramroop.athena.flutterfirebasemessaginginitprovider")
                   A: android:initOrder(0x0101001a)=(type 0x10)0x63
                 E: activity (line=146)
                   A: android:theme(0x01010000)=@0x01030007
                   A: android:name(0x01010003)="io.flutter.plugins.urllauncher.WebViewActivity" (Raw: "io.flutter.plugins.urllauncher.WebViewActivity")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=151)
                   A: android:name(0x01010003)="com.lyokone.location.FlutterLocationService" (Raw: "com.lyokone.location.FlutterLocationService")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:foregroundServiceType(0x01010599)=(type 0x11)0x8
                 E: activity (line=157)
                   A: android:theme(0x01010000)=@0x01030010
                   A: android:name(0x01010003)="com.google.firebase.auth.internal.GenericIdpActivity" (Raw:
                   "com.google.firebase.auth.internal.GenericIdpActivity")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:excludeFromRecents(0x01010017)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x2
                   E: intent-filter (line=163)
                     E: action (line=164)
                       A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
                     E: category (line=166)
                       A: android:name(0x01010003)="android.intent.category.DEFAULT" (Raw: "android.intent.category.DEFAULT")
                     E: category (line=167)
                       A: android:name(0x01010003)="android.intent.category.BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
                     E: data (line=169)
                       A: android:scheme(0x01010027)="genericidp" (Raw: "genericidp")
                       A: android:host(0x01010028)="firebase.auth" (Raw: "firebase.auth")
                       A: android:path(0x0101002a)="/" (Raw: "/")
                 E: activity (line=175)
                   A: android:theme(0x01010000)=@0x01030010
                   A: android:name(0x01010003)="com.google.firebase.auth.internal.RecaptchaActivity" (Raw:
                   "com.google.firebase.auth.internal.RecaptchaActivity")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:excludeFromRecents(0x01010017)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x2
                   E: intent-filter (line=181)
                     E: action (line=182)
                       A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
                     E: category (line=184)
                       A: android:name(0x01010003)="android.intent.category.DEFAULT" (Raw: "android.intent.category.DEFAULT")
                     E: category (line=185)
                       A: android:name(0x01010003)="android.intent.category.BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
                     E: data (line=187)
                       A: android:scheme(0x01010027)="recaptcha" (Raw: "recaptcha")
                       A: android:host(0x01010028)="firebase.auth" (Raw: "firebase.auth")
                       A: android:path(0x0101002a)="/" (Raw: "/")
                 E: uses-library (line=194)
                   A: android:name(0x01010003)="androidx.window.extensions" (Raw: "androidx.window.extensions")
                   A: android:required(0x0101028e)=(type 0x12)0x0
                 E: uses-library (line=197)
                   A: android:name(0x01010003)="androidx.window.sidecar" (Raw: "androidx.window.sidecar")
                   A: android:required(0x0101028e)=(type 0x12)0x0
                 E: receiver (line=201)
                   A: android:name(0x01010003)="com.google.firebase.iid.FirebaseInstanceIdReceiver" (Raw:
                   "com.google.firebase.iid.FirebaseInstanceIdReceiver")
                   A: android:permission(0x01010006)="com.google.android.c2dm.permission.SEND" (Raw: "com.google.android.c2dm.permission.SEND")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   E: intent-filter (line=205)
                     E: action (line=206)
                       A: android:name(0x01010003)="com.google.android.c2dm.intent.RECEIVE" (Raw: "com.google.android.c2dm.intent.RECEIVE")
                 E: service (line=213)
                   A: android:name(0x01010003)="com.google.firebase.messaging.FirebaseMessagingService" (Raw:
                   "com.google.firebase.messaging.FirebaseMessagingService")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
                   E: intent-filter (line=217)
                     A: android:priority(0x0101001c)=(type 0x10)0xfffffe0c
                     E: action (line=218)
                       A: android:name(0x01010003)="com.google.firebase.MESSAGING_EVENT" (Raw: "com.google.firebase.MESSAGING_EVENT")
                 E: provider (line=222)
                   A: android:name(0x01010003)="com.google.firebase.provider.FirebaseInitProvider" (Raw:
                   "com.google.firebase.provider.FirebaseInitProvider")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:authorities(0x01010018)="com.praveeshramroop.athena.firebaseinitprovider" (Raw:
                   "com.praveeshramroop.athena.firebaseinitprovider")
                   A: android:initOrder(0x0101001a)=(type 0x10)0x64
                   A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
                 E: receiver (line=229)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementReceiver" (Raw:
                   "com.google.android.gms.measurement.AppMeasurementReceiver")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=235)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementService" (Raw:
                   "com.google.android.gms.measurement.AppMeasurementService")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=239)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementJobService" (Raw:
                   "com.google.android.gms.measurement.AppMeasurementJobService")
                   A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: uses-library (line=244)
                   A: android:name(0x01010003)="org.apache.http.legacy" (Raw: "org.apache.http.legacy")
                   A: android:required(0x0101028e)=(type 0x12)0x0
                 E: activity (line=248)
                   A: android:theme(0x01010000)=@0x01030010
                   A: android:name(0x01010003)="com.google.android.gms.common.api.GoogleApiActivity" (Raw:
                   "com.google.android.gms.common.api.GoogleApiActivity")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: meta-data (line=253)
                   A: android:name(0x01010003)="com.google.android.gms.version" (Raw: "com.google.android.gms.version")
                   A: android:value(0x01010024)=@0x7f060000
                 E: service (line=257)
                   A: android:name(0x01010003)="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery" (Raw:
                   "com.google.android.datatransport.runtime.backends.TransportBackendDiscovery")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   E: meta-data (line=260)
                     A: android:name(0x01010003)="backend:com.google.android.datatransport.cct.CctBackendFactory" (Raw:
[  +48 ms] executing: C:\Users\DELL\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:41253
[ +562 ms] 63706
[   +2 ms] Forwarded host port 63706 to device port 41253 for Observatory
[ +139 ms] Caching compiled dill
[ +413 ms] Connecting to service protocol: http://127.0.0.1:63706/zD4fjyFFW_s=/
[ +961 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:63706/zD4fjyFFW_s=/.
[+1089 ms] DDS is listening at http://127.0.0.1:63714/hGA51_XOf6Q=/.
[ +649 ms] Successfully connected to service protocol: http://127.0.0.1:63706/zD4fjyFFW_s=/
[+8314 ms] D/FlutterLocationService( 6516): Creating service.
[  +80 ms] D/FlutterLocationService( 6516): Binding to location service.
[+10590 ms] Service protocol connection closed.
[ +391 ms] Lost connection to device.

flutter doctor:

[√] Flutter (Channel unknown, 3.0.5, on Microsoft Windows [Version 10.0.22000.1335], locale en-US)
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.1)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.73.1)
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!

pubspec.yaml file:

version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cloud_firestore:
  cupertino_icons: null
  firebase_auth:
  firebase_core:
  firebase_messaging:
  flutter_google_places: null
  flutter_spinkit: ^5.1.0
  geocoder:
  geoflutterfire:
  geolocator: ^7.7.0
  google_maps_flutter: null
  google_maps_webservice: null
  http: null
  location: ^4.4.0
  modal_bottom_sheet: ^2.0.1
  percent_indicator: ^4.2.1
  provider: null
  rxdart: any
  shared_preferences: ^2.0.15
  uuid: null
  url_launcher: ^6.0.5
  get_it: ^7.2.0
  plugin_platform_interface:
  geolocator_platform_interface:
  geocoding: 2.0.5
  google_api_availability:
  google_api_headers: ^1.1.1
  mockito: ^5.2.0

main.dart page:

import 'package:flutter/material.dart';
import 'package:athena/providers/app_state.dart';
import 'package:athena/providers/user.dart';
import 'package:athena/screens/login.dart';
import 'package:athena/screens/splash.dart';
import 'locators/service_locator.dart';
import 'screens/home.dart';
import 'package:provider/provider.dart';
import 'package:firebase_core/firebase_core.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  setupLocator();
  return runApp(MultiProvider(
    providers: [
      ChangeNotifierProvider<AppStateProvider>.value(
        value: AppStateProvider(),
      ),
      ChangeNotifierProvider<UserProvider>.value(
        value: UserProvider.initialize(),
      ),
    ],
    child: MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Athena',
      theme: ThemeData(
        primarySwatch: Colors.red,
      ),
      home: MyApp(),
    ),
  ));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    UserProvider auth = Provider.of<UserProvider>(context);
    switch (auth.status) {
      case Status.Uninitialized:
        return Splash();
      case Status.Unauthenticated:
      case Status.Authenticating:
        return LoginScreen();
      case Status.Authenticated:
        return MyHomePage();
      default:
        return LoginScreen();
    }
  }
}


来源: stackexchange

问:
ChangeNotifier inaccessible in grandchildren widget of where it was provided
I am trying to use flutter provider in order to carry my state down a widget sub-tree/route, and while it works for the direct child of the widget that provided the change notifier class, it does not for the next one in line.
As far as I understand, the change notifier class should be passed down. To be more specific, I am trying to access it through context.read() in a function being called in its initState function.
Am I doing something wrong?

The code below illustrates my code.
Where it class notifier is provided:

```<code>onTap: () {
  // Select body area
  context.read<Patient>().selectBodyArea(areas[index]);

  // Open complaint list
  FlowRepresentation flow = context.read<Patient>().getFlow();
  Navigator.push(
      context,
      MaterialPageRoute(builder: (context) =>
          ChangeNotifierProvider.value(
              value: flow,
              child: const ChiefComplaintList()
          )
      )
  );
}
</code>```

Navigation to the problem widget in ChiefComplaintList:

```<code>onTap: () {
  // Select complaint
  context.read<FlowRepresentation>().selectComplaint(ccs[index]);

  // Show factors
  Navigator.push(
      context,
      MaterialPageRoute(builder: (context) => const AttenuationFactors())
  );
}
</code>```

Where I'm having trouble accessing the change notifier class:

```<code>void getData() async {

  _nrFactors = await context.read<FlowRepresentation>().getAttenuationFactors();
  setState(() {}); // rebuild widget with data
}

@override
void initState() {
  super.initState();
  print("Initiated Attenuation Factors Lists State");
  getData();
}
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I am trying to use flutter provider in order to carry my state down a widget sub-tree/route, and while it works for the direct child of the widget that provided the change notifier class, it does not for the next one in line.
As far as I understand, the change notifier class should be passed down. To be more specific, I am trying to access it through context.read() in a function being called in its initState function.
Am I doing something wrong?

The code below illustrates my code.
Where it class notifier is provided:

onTap: () {
  // Select body area
  context.read<Patient>().selectBodyArea(areas[index]);

  // Open complaint list
  FlowRepresentation flow = context.read<Patient>().getFlow();
  Navigator.push(
      context,
      MaterialPageRoute(builder: (context) =>
          ChangeNotifierProvider.value(
              value: flow,
              child: const ChiefComplaintList()
          )
      )
  );
}

Navigation to the problem widget in ChiefComplaintList:

onTap: () {
  // Select complaint
  context.read<FlowRepresentation>().selectComplaint(ccs[index]);

  // Show factors
  Navigator.push(
      context,
      MaterialPageRoute(builder: (context) => const AttenuationFactors())
  );
}

Where I'm having trouble accessing the change notifier class:

void getData() async {

  _nrFactors = await context.read<FlowRepresentation>().getAttenuationFactors();
  setState(() {}); // rebuild widget with data
}

@override
void initState() {
  super.initState();
  print("Initiated Attenuation Factors Lists State");
  getData();
}


问:
How can I animate movements while orbit controls?
I am working on a project of elbow and I need to use movement of parts(.obj) file on click. For help here is URL of my project on glitch - “https://glitch.com/edit/#!/bead-big-purchase”

I am expecting that when I click the object while using orbit control and movements it should work normally but it’s not.


问:
In C++, how can I return a modified copy of the object without double copying it when overloading an operator?
For a school project, I am writing a class to store arbitrary length integers. I have an operator- for it like this:

```<code>BigInt BigInt::operator-() const {
    BigInt newNum { *this };
    newNum.m_positive = !newNum.m_positive;
    return newNum;
}
</code>```

The problem with this code is that the current object gets copied twice (at line 2 and line 4). Is there any way I can avoid this?

Things that don't work:

Simply returning a reference to newNum: UB

Allocating memory with new and returning a reference to it: memory leak

Allocating memory and returning a (smart) pointer: Not the desired behavior for the - operator

Changing this and have it copied by the return statement: Can't undo the changes to this

Body:
For a school project, I am writing a class to store arbitrary length integers. I have an operator- for it like this:

BigInt BigInt::operator-() const {
    BigInt newNum { *this };
    newNum.m_positive = !newNum.m_positive;
    return newNum;
}

The problem with this code is that the current object gets copied twice (at line 2 and line 4). Is there any way I can avoid this?

Things that don't work:

Simply returning a reference to newNum: UB

Allocating memory with new and returning a reference to it: memory leak

Allocating memory and returning a (smart) pointer: Not the desired behavior for the - operator

Changing this and have it copied by the return statement: Can't undo the changes to this


问:
Launch Azurite with command line from Visual Studio 2022
VS 2022 has a "Connected Services" feature that allows adding Azurite and launching it. When adding Azurite NPM installation to VS connected services, it doesn't give you the option to specify any command line.

I am only interested in launching Azurite in HTTPS mode, so I am interested in something like this:

"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator\azurite.exe" --cert C:/programdata/Cert/127.0.0.1.pem --key C:/programdata/Cert/127.0.0.1-key.pem

Where or how can I modify the command line launcher in VS to include specific parameters?


问:
How to check who spent the most robux?
so basically i wanted to do a dummy which shows the player that spents the most robux, but i have no idea how to get the player who spent the most robux on a product / gamepass purchase. Can someone help?

So this is my dummy code that changes the character when someone new spawns:
`

```<code>game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local dummy = script.Parent
                character.archivable = true
        wait(1)
        local newdummy = character:Clone()
        newdummy.HumanoidRootPart.CFrame = dummy.HumanoidRootPart.CFrame
        dummy:Destroy()
        newdummy.Name = "Dummy"
        newdummy.Parent = game.Workspace
    end)
end)
</code>```

`

but how can i insert here a check when someone spents robux who spent the most? Thanks for answeres.

Title: How to check who spent the most robux?

Body:
so basically i wanted to do a dummy which shows the player that spents the most robux, but i have no idea how to get the player who spent the most robux on a product / gamepass purchase. Can someone help?

So this is my dummy code that changes the character when someone new spawns:
`

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local dummy = script.Parent
                character.archivable = true
        wait(1)
        local newdummy = character:Clone()
        newdummy.HumanoidRootPart.CFrame = dummy.HumanoidRootPart.CFrame
        dummy:Destroy()
        newdummy.Name = "Dummy"
        newdummy.Parent = game.Workspace
    end)
end)

`

but how can i insert here a check when someone spents robux who spent the most? Thanks for answeres.


问:
NodeJs with Express route hosted application getting restarted. Is there any solution for it?
I have made api using nodeJs, express and mongodb and hosted it on cyclic.sh
On every get request it's getting restarted again and logs
"Server is running on http://localhost:3000
connected to mongoDB!"

Response is taking almost 5 sec to load.

Please do not mind that localhost line, I wrote that in server.js

See there is two get requests

user/getdata

user/getblog

For both request it logs "connected to mongoDB"
Is there any issue here or any solution for this?


问:
Writing code, generating object file, and linking assembly code on Mac (x86_64 intel)
I am trying to get a simple assembly program running on my Mac; however, deeding on what commands I use to generate the object file whenever I try to link it I get different errors.

If tried a bunch of different tags for NASM (elf64 and 32, macho64 etc) whenever I try the command ld -o <file> <file.o>" I get different errors depending on what nasm command I used.

The most common are:

ld: warning: alignment (1) of atom '_main' is too small and may result in unaligned pointers
ld: dynamic executables or dylibs must link with libSystem.dylib for architecture x86_64

I get these above errors so I add "align 16" before main and the get these errors:

ld: warning: disabling chained fixups because of unaligned pointers
ld: dynamic executables or dylibs must link with libSystem.dylib for architecture x86_64

If I nasm with elf64 I get these errors

```<code>ld: warning: platform not specified
ld: warning: -arch not specified
ld: warning: No platform min-version specified on command line
ld: warning: ignoring file addint.o, building for -unknown but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )
Undefined symbols for architecture unknown:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture unknown
</code>```

when I dump the object file I get this:

```<code>addint.o:   file format elf64-x86-64

Disassembly of section .text:

0000000000000000 <_main>:
       0: bf 01 00 00 00                movl    $1, %edi
       5: 48 be 00 00 00 00 00 00 00 00 movabsq $0, %rsi
       f: ba 0e 00 00 00                movl    $14, %edx
      14: b8 00 00 00 00                movl    $0, %eax
      19: 0f 05                         syscall
      1b: bf 00 00 00 00                movl    $0, %edi
      20: b8 00 00 00 00                movl    $0, %eax
      25: 0f 05                         syscall
</code>```
```<code></code>```

Body:
I am trying to get a simple assembly program running on my Mac; however, deeding on what commands I use to generate the object file whenever I try to link it I get different errors.

If tried a bunch of different tags for NASM (elf64 and 32, macho64 etc) whenever I try the command ld -o <file> <file.o>" I get different errors depending on what nasm command I used.

The most common are:

ld: warning: alignment (1) of atom '_main' is too small and may result in unaligned pointers
ld: dynamic executables or dylibs must link with libSystem.dylib for architecture x86_64

I get these above errors so I add "align 16" before main and the get these errors:

ld: warning: disabling chained fixups because of unaligned pointers
ld: dynamic executables or dylibs must link with libSystem.dylib for architecture x86_64

If I nasm with elf64 I get these errors

ld: warning: platform not specified
ld: warning: -arch not specified
ld: warning: No platform min-version specified on command line
ld: warning: ignoring file addint.o, building for -unknown but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )
Undefined symbols for architecture unknown:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture unknown

when I dump the object file I get this:

addint.o:   file format elf64-x86-64

Disassembly of section .text:

0000000000000000 <_main>:
       0: bf 01 00 00 00                movl    $1, %edi
       5: 48 be 00 00 00 00 00 00 00 00 movabsq $0, %rsi
       f: ba 0e 00 00 00                movl    $14, %edx
      14: b8 00 00 00 00                movl    $0, %eax
      19: 0f 05                         syscall
      1b: bf 00 00 00 00                movl    $0, %edi
      20: b8 00 00 00 00                movl    $0, %eax
      25: 0f 05                         syscall


问:
How do I display a stream of base64 strings as a video on a web app (React, Express)
I'm trying to create a webapp that takes user webcam video input from the client and sends the data to a server that returns the data as a base64 encoded image and then that would be displayed on the clients page after getting processed/going thorough  by the server.

(After I solve this I want to manipulate the webcam footage on express with openCV)

Currently my server works, it receives a stream of video data and emits the input as output base64 to the client.

Express Server Code

```<code>const express = require('express');
const app = express();
const server = require('http').createServer(app);
const io = require('socket.io')(server, {  cors: {
  origin: "http://localhost:3000",
  methods: ["GET", "POST"]
}});

const cv = require('opencv4nodejs');
const cors = require('cors');

app.use(cors());

io.on('connection', socket => {

  // console.log('Connected to client');

  socket.on('stream', data => {

      socket.emit('output', data);

  });
});

server.listen(2000, () => {
  console.log('Server listening on port 2000');
});

</code>```

Problem I am facing now is that I am unable to display the results, the data comes in too fast for the browser to render, I tried all sorts of a window.animation and changing the video element to a image and setting the SRC to the baseUrl (works but is very very slow and delayed)

React Code

```<code>
import React, { useEffect, useRef, useState } from "react";
import io from 'socket.io-client';

const socket = io('http://localhost:2000/')

const Camera = () => {

  const [videoOutput, setVideoOutput] = useState()
  const getFrame = (videoStream) => {
    // create a canvas element to draw the video frame on
    const canvas = document.createElement('canvas');
    // get the canvas context
    const ctx = canvas.getContext('2d');
    // set the canvas width and height to match the video dimensions
    canvas.width = videoStream.videoWidth;
    canvas.height = videoStream.videoHeight;

    // draw the current video frame onto the canvas
    ctx.drawImage(videoStream, 0, 0, canvas.width, canvas.height);
    // get the image data from the canvas
    const imageData = canvas.toDataURL('image/jpeg');

    return imageData;
  };

  const inputRef = useRef(null);
  const outputRef = useRef(null)

  const getVideo = () => {
    socket.connect()
    navigator.mediaDevices
      .getUserMedia({ video: { width:  720} })
      .then(stream => {

        let video = inputRef.current;
        video.srcObject = stream;
        video.play();
        // socket.emit('stream', stream);

        const sendFrame = () => {
          // get a single frame from the video stream
          const frame = getFrame(video);
          // send the frame over the socket connection

          socket.emit('stream', frame);
          window.requestAnimationFrame(sendFrame);

        };
        sendFrame();

      })
      .catch(err => {
        console.error("error:", err);
      });
    socket.on('output', (data) => {

      setVideoOutput(data)})

  };

    useEffect(() => {
    getVideo();
  }, [inputRef]);

  useEffect(() => {
    let output = outputRef.current;
    const updateOutput = () => {

      if(videoOutput != null) {  output.src = videoOutput;}

      window.requestAnimationFrame(updateOutput);
    };
    updateOutput();
  }, [videoOutput]);

  return (
    <div>
      <div>

        <video ref={inputRef} />
        <h1> Server </h1>
        <img alt='sever' ref={outputRef} />
      </div>
    </div>
  );

};

export default Camera;
</code>```

I'm not sure if my approach is correct, using base64 or maybe the server should return something else?

Body:
I'm trying to create a webapp that takes user webcam video input from the client and sends the data to a server that returns the data as a base64 encoded image and then that would be displayed on the clients page after getting processed/going thorough  by the server.

(After I solve this I want to manipulate the webcam footage on express with openCV)

Currently my server works, it receives a stream of video data and emits the input as output base64 to the client.

Express Server Code

const express = require('express');
const app = express();
const server = require('http').createServer(app);
const io = require('socket.io')(server, {  cors: {
  origin: "http://localhost:3000",
  methods: ["GET", "POST"]
}});

const cv = require('opencv4nodejs');
const cors = require('cors');

app.use(cors());

io.on('connection', socket => {

  // console.log('Connected to client');

  socket.on('stream', data => {

      socket.emit('output', data);

  });
});

server.listen(2000, () => {
  console.log('Server listening on port 2000');
});

Problem I am facing now is that I am unable to display the results, the data comes in too fast for the browser to render, I tried all sorts of a window.animation and changing the video element to a image and setting the SRC to the baseUrl (works but is very very slow and delayed)

React Code

import React, { useEffect, useRef, useState } from "react";
import io from 'socket.io-client';

const socket = io('http://localhost:2000/')

const Camera = () => {

  const [videoOutput, setVideoOutput] = useState()
  const getFrame = (videoStream) => {
    // create a canvas element to draw the video frame on
    const canvas = document.createElement('canvas');
    // get the canvas context
    const ctx = canvas.getContext('2d');
    // set the canvas width and height to match the video dimensions
    canvas.width = videoStream.videoWidth;
    canvas.height = videoStream.videoHeight;

    // draw the current video frame onto the canvas
    ctx.drawImage(videoStream, 0, 0, canvas.width, canvas.height);
    // get the image data from the canvas
    const imageData = canvas.toDataURL('image/jpeg');

    return imageData;
  };

  const inputRef = useRef(null);
  const outputRef = useRef(null)

  const getVideo = () => {
    socket.connect()
    navigator.mediaDevices
      .getUserMedia({ video: { width:  720} })
      .then(stream => {

        let video = inputRef.current;
        video.srcObject = stream;
        video.play();
        // socket.emit('stream', stream);

        const sendFrame = () => {
          // get a single frame from the video stream
          const frame = getFrame(video);
          // send the frame over the socket connection

          socket.emit('stream', frame);
          window.requestAnimationFrame(sendFrame);

        };
        sendFrame();

      })
      .catch(err => {
        console.error("error:", err);
      });
    socket.on('output', (data) => {

      setVideoOutput(data)})

  };

    useEffect(() => {
    getVideo();
  }, [inputRef]);

  useEffect(() => {
    let output = outputRef.current;
    const updateOutput = () => {

      if(videoOutput != null) {  output.src = videoOutput;}

      window.requestAnimationFrame(updateOutput);
    };
    updateOutput();
  }, [videoOutput]);

  return (

        <video ref={inputRef} />

 Server

  );

};

export default Camera;

I'm not sure if my approach is correct, using base64 or maybe the server should return something else?


问:
HTML, JS, SEO, Googlebot - Should I translate meta description of my page?
I am translating the content of my traditional landing page when it is loaded:

import { DOMTranslator } from "../lib/languages";

//
// Translate the DOM nodes
//

const translator = new DOMTranslator("data-key");

translator.process();

```
<p>For example, <strong>the title of the page is translated when the page is loaded</strong>, because it has the <code>data-key</code> prop:</p>
<pre class="lang-html prettyprint-override"><code><head>
    <title data-key="home-title">
      My Company Name | Some Representative Text
    </title>
</head>
</code>```

Should I do the same with my meta description? Will the crawler index the correct description?

    <meta
      name="description"
      data-key="home-description"
      content="Some representative description in English"
    />

```

Body:
I am translating the content of my traditional landing page when it is loaded:

import { DOMTranslator } from "../lib/languages";

//
// Translate the DOM nodes
//

const translator = new DOMTranslator("data-key");

translator.process();

For example, the title of the page is translated when the page is loaded, because it has the data-key prop:

    <title data-key="home-title">
      My Company Name | Some Representative Text
    </title>

Should I do the same with my meta description? Will the crawler index the correct description?

    <meta
      name="description"
      data-key="home-description"
      content="Some representative description in English"
    />


问:
EvalML Library - time series multivariate forecasting allowed?
I'm approaching to EvalML Library, I was wondering if it supports multivariate time series forecasting, allowing multiple different features in input to forecast one target variable.

Actual time series example :
https://evalml.alteryx.com/en/stable/user_guide/timeseries.html#
is referred to univariate forecast when past values of target variable are used to forecast future ones.


问:
docker-compose build flask, docker. aws ecs course
Output:

docker-compose up
[+] Running 3/0

Container flask-react-aws-api-db-1  Running                                                                                0.0s

Container flask-react-aws-api-1     Created                                                                                0.0s

Container flask-react-aws-client-1  Running                                                                                0.0s
Attaching to flask-react-aws-api-1, flask-react-aws-api-db-1, flask-react-aws-client-1
flask-react-aws-api-1     | exec /usr/src/app/entrypoint.sh: no such file or directory
flask-react-aws-api-1 exited with code 1

I'm not able to access  http://localhost:5004/ping  couse the container is not able to start and run.

Anyone can help? I don't understand why is not working.

Thanks in advance.

I try execute this command:

```<code>chmod +x services/users/entrypoint.sh
</code>```

but still not working. after rebuilding the containers.

Body:
Output:

docker-compose up
[+] Running 3/0

Container flask-react-aws-api-db-1  Running                                                                                0.0s

Container flask-react-aws-api-1     Created                                                                                0.0s

Container flask-react-aws-client-1  Running                                                                                0.0s
Attaching to flask-react-aws-api-1, flask-react-aws-api-db-1, flask-react-aws-client-1
flask-react-aws-api-1     | exec /usr/src/app/entrypoint.sh: no such file or directory
flask-react-aws-api-1 exited with code 1

I'm not able to access  http://localhost:5004/ping  couse the container is not able to start and run.

Anyone can help? I don't understand why is not working.

Thanks in advance.

I try execute this command:

chmod +x services/users/entrypoint.sh

but still not working. after rebuilding the containers.


问:
Chakra UI framer motion animation doesnt work when put inside custom component
I have Chakra-UI GridItems inside Grid

this works

```<code><Grid>
<GridItem
     as={motion.div}
     layout
     gridArea={activeStat === "review" ? "1 / 1 / span 2 / span 2" : "1 / 2 / span 1 / span 1"}
     zIndex={activeStat === "review" ? 2 : 0}
     className="item"
     id="review"
     onClick={handleClick}
   >
...
</GridItem>
</Grid>
</code>```

But if I make a custom GridItem component

```<code>const GridItemAnimation = ({ activeStat, id, children }) => {
return (
<GridItem
      as={motion.div}
      layout
      gridArea={activeStat === id ? "1 / 1 / span 2 / span 2" : "1 / 1 / span 1 / span 1"}
      zIndex={activeStat === id ? 2 : 0}
      className="item"
      id={id}
      onClick={handleClick}
>
    {children}
</GridItem>
)
</code>```

and put this inside the Grid

```<code><Grid>
<GridItemAnimation
     id="user"
     activeStat={activeStat}
>
       ...
</GridItemAnimation>
</Grid>
</code>```

there is no animation whatsoever.
Why is that?

Body:
I have Chakra-UI GridItems inside Grid

this works

<Grid>
<GridItem
     as={motion.div}
     layout
     gridArea={activeStat === "review" ? "1 / 1 / span 2 / span 2" : "1 / 2 / span 1 / span 1"}
     zIndex={activeStat === "review" ? 2 : 0}
     className="item"
     id="review"
     onClick={handleClick}
   >
...
</GridItem>
</Grid>

But if I make a custom GridItem component

const GridItemAnimation = ({ activeStat, id, children }) => {
return (
<GridItem
      as={motion.div}
      layout
      gridArea={activeStat === id ? "1 / 1 / span 2 / span 2" : "1 / 1 / span 1 / span 1"}
      zIndex={activeStat === id ? 2 : 0}
      className="item"
      id={id}
      onClick={handleClick}
>
    {children}
</GridItem>
)

and put this inside the Grid

<Grid>
<GridItemAnimation
     id="user"
     activeStat={activeStat}
>
       ...
</GridItemAnimation>
</Grid>

there is no animation whatsoever.
Why is that?


问:
Bloomberg xbbg and download historical option data
When I tried to download historical option price using xbbg there is a problem:

in the excel, I use =BDS("SPY US Equity", "opt_chain","single_date_override",text(20191010,"YYYYMMDD") ), I can get the option chain for SPY on 20191010, but in the xbbg (in the juypter notebook), it says "bds() takes from 2 to 3 positional arguments but 4 were given".

does any one know how can I solve this?

Also, did someone has written a python script before, which can download historical option data for any ticker, including daily OHLCV and open interest, for both bid and ask?

Very appreciated.

Best


问:
How to cancel git remote set-url?
As described in the accepted answer of this SO question, we should use

git remote set-url origin new.git.url/here
```
<p>Personally, I used the <code>-v</code> option as well, i.e.</p>
```git remote -v set-url origin https://gitlab.com/<user_name>/<new_name>
```
<p>However, when I now do</p>
```git push origin main
```

I'm being asked for git username and password and my credentials don't get accepted. So I want to abort the above command of setting the remote url, how do I do this? (Usually, I'm not being asked for my git username and password when I do git push, only for the password of the private key.)

Title: How to cancel git remote set-url?

Body:
As described in the accepted answer of this SO question, we should use

git remote set-url origin new.git.url/here

Personally, I used the -v option as well, i.e.

git remote -v set-url origin https://gitlab.com/<user_name>/<new_name>

However, when I now do

git push origin main

I'm being asked for git username and password and my credentials don't get accepted. So I want to abort the above command of setting the remote url, how do I do this? (Usually, I'm not being asked for my git username and password when I do git push, only for the password of the private key.)


问:
Function not returning the desired value in the Flutter, firebase application
I have a code below where I am trying to display a value returned by the totalAmount() function.

The totalAmount() function is mentioned below. The code is working and I can print the value of amt variable in the console. However, the function is not returning the value. The value being displayed in the app is '0'

Request if anyone can suggest what is the issue in this code.

```<code>Row(
  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  children: [
    SizedBox(
      width: 200,
      height: 48,
      child: ElevatedButton(
        onPressed: (){},
        style: ElevatedButton.styleFrom(
            primary: primaryColor,
            shape: const StadiumBorder()),
        child: const Text("Proceed for Payment"),
      ),
    ),
    Text("\$" + totalAmount(),
          style: TextStyle(
            fontWeight: FontWeight.bold,
            fontSize: 16,
            color: Colors.black
          ),
      ),
  ],
)
</code>```
```<code>int amt = 0;
List<num> prodPrice = [];

String totalAmount() {
  FirebaseFirestore.instance.collection("users-cart-items")
      .doc(FirebaseAuth.instance.currentUser?.email)
      .collection("items")
      .get()
      .then((ds) {
    for(int i = 0; i<=ds.docs.length; i++){
      prodPrice.add(ds.docs[i]["price"]);
      amt = (amt + prodPrice[i]).toInt();
      print(amt);
    }
  },
    onError: (e) => print("Error getting document: $e"),
  );
  return amt.toString();
}
</code>```

I tried to wrap the function totalAmount() with Future and Async, but that didn't work either

Body:
I have a code below where I am trying to display a value returned by the totalAmount() function.

The totalAmount() function is mentioned below. The code is working and I can print the value of amt variable in the console. However, the function is not returning the value. The value being displayed in the app is '0'

Request if anyone can suggest what is the issue in this code.

Row(
  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  children: [
    SizedBox(
      width: 200,
      height: 48,
      child: ElevatedButton(
        onPressed: (){},
        style: ElevatedButton.styleFrom(
            primary: primaryColor,
            shape: const StadiumBorder()),
        child: const Text("Proceed for Payment"),
      ),
    ),
    Text("\$" + totalAmount(),
          style: TextStyle(
            fontWeight: FontWeight.bold,
            fontSize: 16,
            color: Colors.black
          ),
      ),
  ],
)

int amt = 0;
List<num> prodPrice = [];

String totalAmount() {
  FirebaseFirestore.instance.collection("users-cart-items")
      .doc(FirebaseAuth.instance.currentUser?.email)
      .collection("items")
      .get()
      .then((ds) {
    for(int i = 0; i<=ds.docs.length; i++){
      prodPrice.add(ds.docs[i]["price"]);
      amt = (amt + prodPrice[i]).toInt();
      print(amt);
    }
  },
    onError: (e) => print("Error getting document: $e"),
  );
  return amt.toString();
}

I tried to wrap the function totalAmount() with Future and Async, but that didn't work either


问:
Next.JS use fs module in a component that is not directly rendered
My goal is to display code beautifully using prismjs on a next.js application.
My code is stored in a data folder locally.
I use react-syntax-highlighter and fs-extra npm packages.
fs cannot be used directly because it doesn't work in the browser but the fs-extra npm package allows us to use it as a promise.

The following code works:

```<code>import { promises as fs } from "fs-extra";

export async function getStaticProps() {
  const code1 = await fs.readFile("./data/code1.js", "utf8");

  return {
    props: {
      code1,
    },
  };
}
</code>```

and then i use code 1 and can display it as wished.

HOWEVER, I currently want to fetch the data of a dynamic route and thus my component does not render directly and i have the following error "Error: Module not found: Can't resolve 'fs'"

I changed my next config and added the following:

```<code>webpack5: true,
   webpack: (config) => {
     config.resolve.fallback = { fs: false }
     return config
   }
</code>```

After it, the error changed to :
TypeError: fs.realpath is undefined

What can I do?

PS: It's my first post, I hope it is not messed up

Body:
My goal is to display code beautifully using prismjs on a next.js application.
My code is stored in a data folder locally.
I use react-syntax-highlighter and fs-extra npm packages.
fs cannot be used directly because it doesn't work in the browser but the fs-extra npm package allows us to use it as a promise.

The following code works:

import { promises as fs } from "fs-extra";

export async function getStaticProps() {
  const code1 = await fs.readFile("./data/code1.js", "utf8");

  return {
    props: {
      code1,
    },
  };
}

and then i use code 1 and can display it as wished.

HOWEVER, I currently want to fetch the data of a dynamic route and thus my component does not render directly and i have the following error "Error: Module not found: Can't resolve 'fs'"

I changed my next config and added the following:

webpack5: true,
   webpack: (config) => {
     config.resolve.fallback = { fs: false }
     return config
   }

After it, the error changed to :
TypeError: fs.realpath is undefined

What can I do?

PS: It's my first post, I hope it is not messed up


问:
Dynamic operations can only be performed in homogenous AppDomain
I have written a program with .net framework 4.8, ef.6.4 in Windows 11, and I have no problems when debugging, but when I release the program and run it on Windows 7 (x86), I encounter the following error when initializing the database. I will I have also put the stack of it, please help me:

Error -> Dynamic operations can only be performed in homogenous AppDomain.

stack :

```<code>at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args)
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
   at System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.<GenerateStatements>b__10_0(Object o)
   at System.Data.Entity.SqlServer.Utilities.IEnumerableExtensions.Each[T](IEnumerable`1 ts, Action`1 action)
   at System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.GenerateStatements(IEnumerable`1 migrationOperations)
   at System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.Generate(IEnumerable`1 migrationOperations, String providerManifestToken)
   at System.Data.Entity.Migrations.DbMigrator.GenerateStatements(IList`1 operations, String migrationId)
   at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, VersionedModel targetModel, IEnumerable`1 operations, IEnumerable`1 systemOperations, Boolean downgrading, Boolean auto)
   at System.Data.Entity.Migrations.DbMigrator.AutoMigrate(String migrationId, VersionedModel sourceModel, VersionedModel targetModel, Boolean downgrading)
   at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
   at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
   at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClass42_0.<Update>b__0()
   at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
   at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
   at System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext)
   at System.Data.Entity.Internal.InternalContext.CreateDatabase(ObjectContext objectContext, DatabaseExistenceState existenceState)
   at System.Data.Entity.Database.Create(DatabaseExistenceState existenceState)
   at System.Data.Entity.DropCreateDatabaseIfModelChanges`1.InitializeDatabase(TContext context)
   at System.Data.Entity.Internal.InternalContext.<>c__DisplayClass66_0`1.<CreateInitializationAction>b__0()
   at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
   at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
   at System.Data.Entity.Database.Initialize(Boolean force)
   at EventsPortal.Managers.ConnectionManager.Connect(Boolean force)
</code>```

When I was searching for a solution, the only solution I found was to disable <trust legacyCasModel="true" level="Full" /> in web.config, which I don't have such settings in my program.

Body:
I have written a program with .net framework 4.8, ef.6.4 in Windows 11, and I have no problems when debugging, but when I release the program and run it on Windows 7 (x86), I encounter the following error when initializing the database. I will I have also put the stack of it, please help me:

Error -> Dynamic operations can only be performed in homogenous AppDomain.

stack :

at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args)
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
   at System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.<GenerateStatements>b__10_0(Object o)
   at System.Data.Entity.SqlServer.Utilities.IEnumerableExtensions.Each[T](IEnumerable`1 ts, Action`1 action)
   at System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.GenerateStatements(IEnumerable`1 migrationOperations)
   at System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.Generate(IEnumerable`1 migrationOperations, String providerManifestToken)
   at System.Data.Entity.Migrations.DbMigrator.GenerateStatements(IList`1 operations, String migrationId)
   at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, VersionedModel targetModel, IEnumerable`1 operations, IEnumerable`1 systemOperations, Boolean downgrading, Boolean auto)
   at System.Data.Entity.Migrations.DbMigrator.AutoMigrate(String migrationId, VersionedModel sourceModel, VersionedModel targetModel, Boolean downgrading)
   at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
   at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
   at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClass42_0.<Update>b__0()
   at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
   at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
   at System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext)
   at System.Data.Entity.Internal.InternalContext.CreateDatabase(ObjectContext objectContext, DatabaseExistenceState existenceState)
   at System.Data.Entity.Database.Create(DatabaseExistenceState existenceState)
   at System.Data.Entity.DropCreateDatabaseIfModelChanges`1.InitializeDatabase(TContext context)
   at System.Data.Entity.Internal.InternalContext.<>c__DisplayClass66_0`1.<CreateInitializationAction>b__0()
   at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
   at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
   at System.Data.Entity.Database.Initialize(Boolean force)
   at EventsPortal.Managers.ConnectionManager.Connect(Boolean force)

When I was searching for a solution, the only solution I found was to disable <trust legacyCasModel="true" level="Full" /> in web.config, which I don't have such settings in my program.


问:
Diffusion models - Generate image using base image and caption
I am looking for implementation (or/and papers) of a diffusion (or something else) network that could generate an image with more objects, starting from another image and some description
e.g. image of an empty room, text "two people talking"  -> generate an image of the same room, adding two people talking.

Do you know if something like that exists? Is there a pre-trained model that I could play with?


问:
Nextjs Component BG image
How to add background image from index.js to a component in next.js

I tried,
From index.js

<Card
  username="Name 1"
  bacimg={images.BaseCard}
  userimage={images.Avatar}
/>
```
<p>This userimage is not assingning to the Component</p>
<pre class="lang-js prettyprint-override"><code><div className="cards" style={{ backgroundImage: `url(${bacimg})` }}>
</code>```

on Card.jsx

Next.js answers to solve

Title: Nextjs Component BG image

Body:
How to add background image from index.js to a component in next.js

I tried,
From index.js

<Card
  username="Name 1"
  bacimg={images.BaseCard}
  userimage={images.Avatar}
/>

This userimage is not assingning to the Component

<div className="cards" style={{ backgroundImage: `url(${bacimg})` }}>

on Card.jsx

Next.js answers to solve


问:
Argument of type 'string' is not assignable to parameter of type 'never'
I am working on a dog adoption project. I have a function that receives two parameters: first is an array of numbers or a string, and the second one is a string. The function suppose to return an object the contains all the keys  that we will filter by to a dog service. The function in the dog service will return a new array of dogs containing the filtered dogs.

```<code>const filterBy = useRef<FilterBy>({ sex: [], ageRange: [], sizeAndWeight: [], breed: [], otherAnimalsInTheHousehold: [] })

const setFilterAnswer = (answer: string | number[], filterTopic: string) => {
        const filterSubjectsReplika = [...filterSubjects]
        const relevantSubject = filterSubjectsReplika.find(subject => subject.topic === filterTopic)!
        console.log(relevantSubject);
        const { filterTitle }: { filterTitle: FilterTopics } = relevantSubject
        if (typeof answer === 'string') {
            filterBy.current[filterTitle].push(answer)
        } else {
            filterBy.current[filterTitle] = answer
        }
        const filteredDogs=getFilteredDogs(filterBy.current)
setDogs(filteredDogs)

setFilter(filterBy.current)

    }
</code>```

setFilter is a useState function that is transferd from the parent component.

I receive this error :

```<code>Argument of type 'string' is not assignable to parameter of type 'never'.
</code>```

and this error :

```<code>Type 'number[]' is not assignable to type 'string[] & number[]'.
Type 'number[]' is not assignable to type 'string[]'.
Type 'number' is not assignable to type 'string'.
</code>```

any help anyone?

I've tried putting type guards

I've tried changing the the filterBy type.

Body:
I am working on a dog adoption project. I have a function that receives two parameters: first is an array of numbers or a string, and the second one is a string. The function suppose to return an object the contains all the keys  that we will filter by to a dog service. The function in the dog service will return a new array of dogs containing the filtered dogs.

const filterBy = useRef<FilterBy>({ sex: [], ageRange: [], sizeAndWeight: [], breed: [], otherAnimalsInTheHousehold: [] })

const setFilterAnswer = (answer: string | number[], filterTopic: string) => {
        const filterSubjectsReplika = [...filterSubjects]
        const relevantSubject = filterSubjectsReplika.find(subject => subject.topic === filterTopic)!
        console.log(relevantSubject);
        const { filterTitle }: { filterTitle: FilterTopics } = relevantSubject
        if (typeof answer === 'string') {
            filterBy.current[filterTitle].push(answer)
        } else {
            filterBy.current[filterTitle] = answer
        }
        const filteredDogs=getFilteredDogs(filterBy.current)
setDogs(filteredDogs)

setFilter(filterBy.current)

    }

setFilter is a useState function that is transferd from the parent component.

I receive this error :

Argument of type 'string' is not assignable to parameter of type 'never'.

and this error :

Type 'number[]' is not assignable to type 'string[] & number[]'.
Type 'number[]' is not assignable to type 'string[]'.
Type 'number' is not assignable to type 'string'.

any help anyone?

I've tried putting type guards

I've tried changing the the filterBy type.