问:
Crash with AppMeasurementDynamiteService
Hello my production app crash with no reason when user validate data. I have no idea where the problem come from

```Fatal Exception: java.lang.ExceptionInInitializerError:
       at com.google.android.gms.measurement.internal.zzip.<init>(zzip.java:34)
       at com.google.android.gms.measurement.internal.zzgk.<init>(zzgk.java:3)
       at com.google.android.gms.measurement.internal.zzgk.zzp(zzgk.java:4)
       at com.google.android.gms.measurement.internal.AppMeasurementDynamiteService.initialize(AppMeasurementDynamiteService.java:2)
       at com.google.android.gms.internal.measurement.zzcx.zza(zzcx.java:6)
       at com.google.android.gms.internal.measurement.zzdt.run(zzdt.java:12)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

Caused by java.lang.RuntimeException: java.lang.NoSuchMethodException: com.google.android.gms.measurement.internal.i.values []
       at java.lang.Enum.enumValues(Enum.java:272)
       at java.lang.Enum.-$$Nest$smenumValues(Enum.java)
       at java.lang.Enum$1.create(Enum.java:279)
       at java.lang.Enum$1.create(Enum.java:277)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
       at java.lang.Enum.getSharedConstants(Enum.java:291)
       at java.lang.Class.getEnumConstantsShared(Class.java:2461)
       at java.util.EnumMap.getKeyUniverse(EnumMap.java:754)
       at java.util.EnumMap.<init>(EnumMap.java:134)
       at com.google.android.gms.measurement.internal.zzai.<init>(zzai.java:7)
       at com.google.android.gms.measurement.internal.zzai.<clinit>(zzai.java:3)
       at com.google.android.gms.measurement.internal.zzip.<init>(zzip.java:34)
       at com.google.android.gms.measurement.internal.zzgk.<init>(zzgk.java:3)
       at com.google.android.gms.measurement.internal.zzgk.zzp(zzgk.java:4)
       at com.google.android.gms.measurement.internal.AppMeasurementDynamiteService.initialize(AppMeasurementDynamiteService.java:2)
       at com.google.android.gms.internal.measurement.zzcx.zza(zzcx.java:6)
       at com.google.android.gms.internal.measurement.zzdt.run(zzdt.java:12)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

Caused by java.lang.NoSuchMethodException: com.google.android.gms.measurement.internal.i.values []
       at java.lang.Class.getMethod(Class.java:2103)
       at java.lang.Class.getDeclaredMethod(Class.java:2081)
       at java.lang.Enum.enumValues(Enum.java:269)
       at java.lang.Enum.-$$Nest$smenumValues(Enum.java)
       at java.lang.Enum$1.create(Enum.java:279)
       at java.lang.Enum$1.create(Enum.java:277)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
       at java.lang.Enum.getSharedConstants(Enum.java:291)
       at java.lang.Class.getEnumConstantsShared(Class.java:2461)
       at java.util.EnumMap.getKeyUniverse(EnumMap.java:754)
       at java.util.EnumMap.<init>(EnumMap.java:134)
       at com.google.android.gms.measurement.internal.zzai.<init>(zzai.java:7)
       at com.google.android.gms.measurement.internal.zzai.<clinit>(zzai.java:3)
       at com.google.android.gms.measurement.internal.zzip.<init>(zzip.java:34)
       at com.google.android.gms.measurement.internal.zzgk.<init>(zzgk.java:3)
       at com.google.android.gms.measurement.internal.zzgk.zzp(zzgk.java:4)
       at com.google.android.gms.measurement.internal.AppMeasurementDynamiteService.initialize(AppMeasurementDynamiteService.java:2)
       at com.google.android.gms.internal.measurement.zzcx.zza(zzcx.java:6)
       at com.google.android.gms.internal.measurement.zzdt.run(zzdt.java:12)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

WM.task-1:
       at android.database.sqlite.SQLiteConnection.nativeFinalizeStatement(SQLiteConnection.java)
       at android.database.sqlite.SQLiteConnection.finalizePreparedStatement(SQLiteConnection.java:1114)
       at android.database.sqlite.SQLiteConnection.releasePreparedStatement(SQLiteConnection.java:1109)
       at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:825)
       at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:422)
       at android.database.sqlite.SQLiteConnection.setJournalFromConfiguration(SQLiteConnection.java:339)
       at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:268)
       at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
       at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:512)
       at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:210)
       at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:202)
       at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1085)
       at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1065)
       at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:929)
       at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:918)
       at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373)
       at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:4)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:4)
       at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:2)
       at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java)
       at androidx.work.impl.model.SystemIdInfoDao_Impl.getWorkSpecIds(SystemIdInfoDao_Impl.java:9)
       at androidx.work.impl.background.systemjob.SystemJobScheduler.reconcileJobs(SystemJobScheduler.java:20)
       at androidx.work.impl.utils.ForceStopRunnable.cleanUp(ForceStopRunnable.java:1)
       at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:31)
       at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:2)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

heartbeat-information-executor:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
       at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

flutter-worker-1:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:463)
       at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:361)
       at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:939)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

GmsDynamite:
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:442)
       at java.lang.Object.wait(Object.java:568)
       at com.google.android.gms.dynamite.zza.run(zza.java:6)

FinalizerWatchdogDaemon:
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:442)
       at java.lang.Object.wait(Object.java:568)
       at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded(Daemons.java:385)
       at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:365)
       at java.lang.Daemons$Daemon.run(Daemons.java:140)
       at java.lang.Thread.run(Thread.java:1012)

pool-8-thread-1:
       at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
       at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:730)
       at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration(SQLiteConnection.java:474)
       at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:272)
       at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
       at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:512)
       at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:210)
       at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:202)
       at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1085)
       at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1065)
       at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:929)
       at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:918)
       at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373)
       at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
       at com.google.android.datatransport.runtime.scheduling.persistence.-$$Lambda$pZuvEfO_xLfFaI7wN1aaaWpYHdo.produce(-.java:2)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.retryIfDbLocked(SQLiteEventStore.java:6)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.getDb(SQLiteEventStore.java:12)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.ensureBeginTransaction(SQLiteEventStore.java)
       at com.google.android.datatransport.runtime.scheduling.jobscheduling.WorkInitializer.lambda$ensureContextsScheduled$1(WorkInitializer.java:1)
       at com.google.android.datatransport.runtime.scheduling.jobscheduling.-$$Lambda$WorkInitializer$IZdbY5oNmKQf7_hQvjCC3nA27Mo.run(-.java:2)
       at com.google.android.datatransport.runtime.SafeLoggingExecutor$SafeLoggingRunnable.run(SafeLoggingExecutor.java:2)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

ReferenceQueueDaemon:
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:442)
       at java.lang.Object.wait(Object.java:568)
       at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:232)
       at java.lang.Daemons$Daemon.run(Daemons.java:140)
       at java.lang.Thread.run(Thread.java:1012)

Crashlytics Exception Handler1:
       at dalvik.system.VMStack.getThreadStackTrace(VMStack.java)
       at java.lang.Thread.getStackTrace(Thread.java:1841)
       at java.lang.Thread.getAllStackTraces(Thread.java:1909)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.populateThreadsList(CrashlyticsReportDataCapture.java:7)
       at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.g(SessionReportingCoordinator.java:19)
       at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.persistFatalEvent(SessionReportingCoordinator.java:32)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsController$2.call(CrashlyticsController.java:3)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsBackgroundWorker$3.then(CrashlyticsBackgroundWorker.java:2)
       at com.google.android.gms.tasks.zze.run(zze.java:8)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:2)
       at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:5)
       at java.lang.Thread.run(Thread.java:1012)

flutter-worker-0:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:463)
       at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:361)
       at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:939)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

ScionFrontendApi:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
       at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

com.google.firebase.crashlytics.startup1:
       at libcore.io.Linux.android_getaddrinfo(Linux.java)
       at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:133)
       at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:222)
       at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:133)
       at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135)
       at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
       at java.net.InetAddress.getAllByName(InetAddress.java:1152)
       at com.android.okhttp.Dns$1.lookup(Dns.java:41)
       at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178)
       at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144)
       at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86)
       at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176)
       at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
       at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
       at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
       at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
       at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
       at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
       at com.google.firebase.crashlytics.internal.network.HttpGetRequest.b(HttpGetRequest.java:95)
       at com.google.firebase.crashlytics.internal.settings.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:4)
       at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:1)
       at com.google.android.gms.tasks.zzo.run(zzo.java:12)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:2)
       at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:5)
       at java.lang.Thread.run(Thread.java:1012)

FinalizerDaemon:
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:442)
       at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:203)
       at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:224)
       at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:300)
       at java.lang.Daemons$Daemon.run(Daemons.java:140)
       at java.lang.Thread.run(Thread.java:1012)

awaitEvenIfOnMainThread task continuation executor1:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
       at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1063)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:2)
       at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:5)
       at java.lang.Thread.run(Thread.java:1012)

main:
       at android.hardware.SystemSensorManager.nativeCreate(SystemSensorManager.java)
       at android.hardware.SystemSensorManager.<init>(SystemSensorManager.java:140)
       at android.app.SystemServiceRegistry$41.createService(SystemServiceRegistry.java:626)
       at android.app.SystemServiceRegistry$41.createService(SystemServiceRegistry.java:622)
       at android.app.SystemServiceRegistry$CachedServiceFetcher.getService(SystemServiceRegistry.java:1913)
       at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:1590)
       at android.app.ContextImpl.getSystemService(ContextImpl.java:2120)
       at android.content.ContextWrapper.getSystemService(ContextWrapper.java:900)
       at dev.fluttercommunity.plus.sensors.SensorsPlugin.setupEventChannels(SensorsPlugin.java:1)
       at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.add(FlutterEngineConnectionRegistry.java:7)
       at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:32)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.google.android.material.R$style.d0(R.java:25)
       at io.flutter.embedding.android.FlutterActivity.configureFlutterEngine(FlutterActivity.java:16)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:16)
       at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:3)
       at android.app.Activity.performCreate(Activity.java:8290)
       at android.app.Activity.performCreate(Activity.java:8269)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3657)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at android.app.ActivityThread.main(ActivityThread.java:7898)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

firebase-installations-executor-1:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
       at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

OkHttp ConnectionPool:
       at java.lang.Object.wait(Object.java)
       at com.android.okhttp.ConnectionPool$1.run(ConnectionPool.java:106)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

queued-work-looper:
       at java.io.FileDescriptor.sync(FileDescriptor.java)
       at android.os.FileUtils.sync(FileUtils.java:256)
       at android.app.SharedPreferencesImpl.writeToFile(SharedPreferencesImpl.java:807)
       at android.app.SharedPreferencesImpl.-$$Nest$mwriteToFile(SharedPreferencesImpl.java)
       at android.app.SharedPreferencesImpl$2.run(SharedPreferencesImpl.java:672)
       at android.app.QueuedWork.processPendingWork(QueuedWork.java:265)
       at android.app.QueuedWork.-$$Nest$smprocessPendingWork(QueuedWork.java)
       at android.app.QueuedWork$QueuedWorkHandler.handleMessage(QueuedWork.java:285)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at android.os.HandlerThread.run(HandlerThread.java:67)

firebase-installations-executor-2:
       at libcore.io.Linux.poll(Linux.java)
       at libcore.io.ForwardingOs.poll(ForwardingOs.java:573)
       at libcore.io.BlockGuardOs.poll(BlockGuardOs.java:283)
       at libcore.io.ForwardingOs.poll(ForwardingOs.java:573)
       at libcore.io.IoBridge.isConnected(IoBridge.java:326)
       at libcore.io.IoBridge.connectErrno(IoBridge.java:237)
       at libcore.io.IoBridge.connect(IoBridge.java:179)
       at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
       at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
       at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
       at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
       at java.net.Socket.connect(Socket.java:646)
       at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182)
       at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145)
       at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
       at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
       at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
       at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
       at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
       at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
       at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
       at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeRequestBodyToOutputStream(FirebaseInstallationServiceClient.java)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeFIDCreateRequestBodyToOutputStream(FirebaseInstallationServiceClient.java:3)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.a(FirebaseInstallationServiceClient.java:56)
       at com.google.firebase.installations.FirebaseInstallations.j(FirebaseInstallations.java:45)
       at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:6)
       at com.google.firebase.installations.-$$Lambda$FirebaseInstallations$VZq1h0TBcWNH8Y5yY86ujrFFyLo.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)
```

Body:
Hello my production app crash with no reason when user validate data. I have no idea where the problem come from

Fatal Exception: java.lang.ExceptionInInitializerError:
       at com.google.android.gms.measurement.internal.zzip.<init>(zzip.java:34)
       at com.google.android.gms.measurement.internal.zzgk.<init>(zzgk.java:3)
       at com.google.android.gms.measurement.internal.zzgk.zzp(zzgk.java:4)
       at com.google.android.gms.measurement.internal.AppMeasurementDynamiteService.initialize(AppMeasurementDynamiteService.java:2)
       at com.google.android.gms.internal.measurement.zzcx.zza(zzcx.java:6)
       at com.google.android.gms.internal.measurement.zzdt.run(zzdt.java:12)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

Caused by java.lang.RuntimeException: java.lang.NoSuchMethodException: com.google.android.gms.measurement.internal.i.values []
       at java.lang.Enum.enumValues(Enum.java:272)
       at java.lang.Enum.-$$Nest$smenumValues(Enum.java)
       at java.lang.Enum$1.create(Enum.java:279)
       at java.lang.Enum$1.create(Enum.java:277)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
       at java.lang.Enum.getSharedConstants(Enum.java:291)
       at java.lang.Class.getEnumConstantsShared(Class.java:2461)
       at java.util.EnumMap.getKeyUniverse(EnumMap.java:754)
       at java.util.EnumMap.<init>(EnumMap.java:134)
       at com.google.android.gms.measurement.internal.zzai.<init>(zzai.java:7)
       at com.google.android.gms.measurement.internal.zzai.<clinit>(zzai.java:3)
       at com.google.android.gms.measurement.internal.zzip.<init>(zzip.java:34)
       at com.google.android.gms.measurement.internal.zzgk.<init>(zzgk.java:3)
       at com.google.android.gms.measurement.internal.zzgk.zzp(zzgk.java:4)
       at com.google.android.gms.measurement.internal.AppMeasurementDynamiteService.initialize(AppMeasurementDynamiteService.java:2)
       at com.google.android.gms.internal.measurement.zzcx.zza(zzcx.java:6)
       at com.google.android.gms.internal.measurement.zzdt.run(zzdt.java:12)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

Caused by java.lang.NoSuchMethodException: com.google.android.gms.measurement.internal.i.values []
       at java.lang.Class.getMethod(Class.java:2103)
       at java.lang.Class.getDeclaredMethod(Class.java:2081)
       at java.lang.Enum.enumValues(Enum.java:269)
       at java.lang.Enum.-$$Nest$smenumValues(Enum.java)
       at java.lang.Enum$1.create(Enum.java:279)
       at java.lang.Enum$1.create(Enum.java:277)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
       at java.lang.Enum.getSharedConstants(Enum.java:291)
       at java.lang.Class.getEnumConstantsShared(Class.java:2461)
       at java.util.EnumMap.getKeyUniverse(EnumMap.java:754)
       at java.util.EnumMap.<init>(EnumMap.java:134)
       at com.google.android.gms.measurement.internal.zzai.<init>(zzai.java:7)
       at com.google.android.gms.measurement.internal.zzai.<clinit>(zzai.java:3)
       at com.google.android.gms.measurement.internal.zzip.<init>(zzip.java:34)
       at com.google.android.gms.measurement.internal.zzgk.<init>(zzgk.java:3)
       at com.google.android.gms.measurement.internal.zzgk.zzp(zzgk.java:4)
       at com.google.android.gms.measurement.internal.AppMeasurementDynamiteService.initialize(AppMeasurementDynamiteService.java:2)
       at com.google.android.gms.internal.measurement.zzcx.zza(zzcx.java:6)
       at com.google.android.gms.internal.measurement.zzdt.run(zzdt.java:12)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

WM.task-1:
       at android.database.sqlite.SQLiteConnection.nativeFinalizeStatement(SQLiteConnection.java)
       at android.database.sqlite.SQLiteConnection.finalizePreparedStatement(SQLiteConnection.java:1114)
       at android.database.sqlite.SQLiteConnection.releasePreparedStatement(SQLiteConnection.java:1109)
       at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:825)
       at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:422)
       at android.database.sqlite.SQLiteConnection.setJournalFromConfiguration(SQLiteConnection.java:339)
       at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:268)
       at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
       at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:512)
       at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:210)
       at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:202)
       at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1085)
       at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1065)
       at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:929)
       at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:918)
       at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373)
       at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:4)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:4)
       at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:2)
       at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java)
       at androidx.work.impl.model.SystemIdInfoDao_Impl.getWorkSpecIds(SystemIdInfoDao_Impl.java:9)
       at androidx.work.impl.background.systemjob.SystemJobScheduler.reconcileJobs(SystemJobScheduler.java:20)
       at androidx.work.impl.utils.ForceStopRunnable.cleanUp(ForceStopRunnable.java:1)
       at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:31)
       at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:2)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

heartbeat-information-executor:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
       at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

flutter-worker-1:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:463)
       at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:361)
       at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:939)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

GmsDynamite:
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:442)
       at java.lang.Object.wait(Object.java:568)
       at com.google.android.gms.dynamite.zza.run(zza.java:6)

FinalizerWatchdogDaemon:
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:442)
       at java.lang.Object.wait(Object.java:568)
       at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded(Daemons.java:385)
       at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:365)
       at java.lang.Daemons$Daemon.run(Daemons.java:140)
       at java.lang.Thread.run(Thread.java:1012)

pool-8-thread-1:
       at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
       at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:730)
       at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration(SQLiteConnection.java:474)
       at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:272)
       at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
       at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:512)
       at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:210)
       at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:202)
       at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1085)
       at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1065)
       at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:929)
       at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:918)
       at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373)
       at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
       at com.google.android.datatransport.runtime.scheduling.persistence.-$$Lambda$pZuvEfO_xLfFaI7wN1aaaWpYHdo.produce(-.java:2)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.retryIfDbLocked(SQLiteEventStore.java:6)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.getDb(SQLiteEventStore.java:12)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.ensureBeginTransaction(SQLiteEventStore.java)
       at com.google.android.datatransport.runtime.scheduling.jobscheduling.WorkInitializer.lambda$ensureContextsScheduled$1(WorkInitializer.java:1)
       at com.google.android.datatransport.runtime.scheduling.jobscheduling.-$$Lambda$WorkInitializer$IZdbY5oNmKQf7_hQvjCC3nA27Mo.run(-.java:2)
       at com.google.android.datatransport.runtime.SafeLoggingExecutor$SafeLoggingRunnable.run(SafeLoggingExecutor.java:2)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

ReferenceQueueDaemon:
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:442)
       at java.lang.Object.wait(Object.java:568)
       at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:232)
       at java.lang.Daemons$Daemon.run(Daemons.java:140)
       at java.lang.Thread.run(Thread.java:1012)

Crashlytics Exception Handler1:
       at dalvik.system.VMStack.getThreadStackTrace(VMStack.java)
       at java.lang.Thread.getStackTrace(Thread.java:1841)
       at java.lang.Thread.getAllStackTraces(Thread.java:1909)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.populateThreadsList(CrashlyticsReportDataCapture.java:7)
       at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.g(SessionReportingCoordinator.java:19)
       at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.persistFatalEvent(SessionReportingCoordinator.java:32)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsController$2.call(CrashlyticsController.java:3)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsBackgroundWorker$3.then(CrashlyticsBackgroundWorker.java:2)
       at com.google.android.gms.tasks.zze.run(zze.java:8)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:2)
       at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:5)
       at java.lang.Thread.run(Thread.java:1012)

flutter-worker-0:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:463)
       at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:361)
       at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:939)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

ScionFrontendApi:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
       at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

com.google.firebase.crashlytics.startup1:
       at libcore.io.Linux.android_getaddrinfo(Linux.java)
       at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:133)
       at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:222)
       at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:133)
       at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135)
       at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
       at java.net.InetAddress.getAllByName(InetAddress.java:1152)
       at com.android.okhttp.Dns$1.lookup(Dns.java:41)
       at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178)
       at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144)
       at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86)
       at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176)
       at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
       at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
       at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
       at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
       at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
       at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
       at com.google.firebase.crashlytics.internal.network.HttpGetRequest.b(HttpGetRequest.java:95)
       at com.google.firebase.crashlytics.internal.settings.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:4)
       at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:1)
       at com.google.android.gms.tasks.zzo.run(zzo.java:12)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:2)
       at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:5)
       at java.lang.Thread.run(Thread.java:1012)

FinalizerDaemon:
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:442)
       at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:203)
       at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:224)
       at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:300)
       at java.lang.Daemons$Daemon.run(Daemons.java:140)
       at java.lang.Thread.run(Thread.java:1012)

awaitEvenIfOnMainThread task continuation executor1:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
       at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1063)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:2)
       at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:5)
       at java.lang.Thread.run(Thread.java:1012)

main:
       at android.hardware.SystemSensorManager.nativeCreate(SystemSensorManager.java)
       at android.hardware.SystemSensorManager.<init>(SystemSensorManager.java:140)
       at android.app.SystemServiceRegistry$41.createService(SystemServiceRegistry.java:626)
       at android.app.SystemServiceRegistry$41.createService(SystemServiceRegistry.java:622)
       at android.app.SystemServiceRegistry$CachedServiceFetcher.getService(SystemServiceRegistry.java:1913)
       at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:1590)
       at android.app.ContextImpl.getSystemService(ContextImpl.java:2120)
       at android.content.ContextWrapper.getSystemService(ContextWrapper.java:900)
       at dev.fluttercommunity.plus.sensors.SensorsPlugin.setupEventChannels(SensorsPlugin.java:1)
       at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.add(FlutterEngineConnectionRegistry.java:7)
       at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:32)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.google.android.material.R$style.d0(R.java:25)
       at io.flutter.embedding.android.FlutterActivity.configureFlutterEngine(FlutterActivity.java:16)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:16)
       at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:3)
       at android.app.Activity.performCreate(Activity.java:8290)
       at android.app.Activity.performCreate(Activity.java:8269)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3657)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at android.app.ActivityThread.main(ActivityThread.java:7898)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

firebase-installations-executor-1:
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
       at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1123)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

OkHttp ConnectionPool:
       at java.lang.Object.wait(Object.java)
       at com.android.okhttp.ConnectionPool$1.run(ConnectionPool.java:106)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

queued-work-looper:
       at java.io.FileDescriptor.sync(FileDescriptor.java)
       at android.os.FileUtils.sync(FileUtils.java:256)
       at android.app.SharedPreferencesImpl.writeToFile(SharedPreferencesImpl.java:807)
       at android.app.SharedPreferencesImpl.-$$Nest$mwriteToFile(SharedPreferencesImpl.java)
       at android.app.SharedPreferencesImpl$2.run(SharedPreferencesImpl.java:672)
       at android.app.QueuedWork.processPendingWork(QueuedWork.java:265)
       at android.app.QueuedWork.-$$Nest$smprocessPendingWork(QueuedWork.java)
       at android.app.QueuedWork$QueuedWorkHandler.handleMessage(QueuedWork.java:285)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at android.os.HandlerThread.run(HandlerThread.java:67)

firebase-installations-executor-2:
       at libcore.io.Linux.poll(Linux.java)
       at libcore.io.ForwardingOs.poll(ForwardingOs.java:573)
       at libcore.io.BlockGuardOs.poll(BlockGuardOs.java:283)
       at libcore.io.ForwardingOs.poll(ForwardingOs.java:573)
       at libcore.io.IoBridge.isConnected(IoBridge.java:326)
       at libcore.io.IoBridge.connectErrno(IoBridge.java:237)
       at libcore.io.IoBridge.connect(IoBridge.java:179)
       at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
       at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
       at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
       at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
       at java.net.Socket.connect(Socket.java:646)
       at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182)
       at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145)
       at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
       at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
       at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
       at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
       at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
       at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
       at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
       at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeRequestBodyToOutputStream(FirebaseInstallationServiceClient.java)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeFIDCreateRequestBodyToOutputStream(FirebaseInstallationServiceClient.java:3)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.a(FirebaseInstallationServiceClient.java:56)
       at com.google.firebase.installations.FirebaseInstallations.j(FirebaseInstallations.java:45)
       at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:6)
       at com.google.firebase.installations.-$$Lambda$FirebaseInstallations$VZq1h0TBcWNH8Y5yY86ujrFFyLo.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)


来源: stackexchange

问:
How to read the tree structure from file using Java
I'm trying to read from a .txt file a tree structure like that:

```<code>parent                   Type     short description1
   .firstChild           Type     short description2
       .firstNephew      Type     short description3
   .secondChild          Type     short description4
       .firstNephew      Type     short description5
       .secondNephew     Type     short description6

parent.firstChild = value1
parent.firstChild.firstNephew = value2
parent.secondChild = value3
parent.secondChild.firstNephew = value4
parent.secondChild.secondNephew = value5
</code>```

And I want the output to be a list with Test objects like that (the expected output):

[parent, type, value1, short description1,

firstChild, type, value2, short description2,

firstNephew, type, value3, short description3,

secondChild, type, value4, short description4,

firstNephew, type, value5, short description5,

secondNephew, type, value6, short description6]

So far I have:

```<code>public class Test {
    private String name;
    private String type;
    private String value;
    private String description;
    public Test(String name, String type, String value, String description) {
        super();
        this.name = name;
        this.type = type;
        this.value = value;
        this.description = description;
    }
    @Override
    public String toString() {
        return "name: " + name + ", type: " + type + ", value: " + value + ", description: " + description;
    }

}

public class Main {
    public static void main(String[] args) {
            try (Stream<String> lines = Files.lines(Paths.get("files/file.txt")).filter(line -> !line.isEmpty())) {
            List<Test> myObjectsList = lines.map(line -> {
                String[] arr = line.trim().split(" +", 3);
                return new Test(arr[0], arr[1], null, arr[2]);
            }).collect(Collectors.toList());

            myObjectsList.forEach(System.out::println);

        } catch (IOException e) {
            e.printStackTrace();
        }
}
}
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I'm trying to read from a .txt file a tree structure like that:

parent                   Type     short description1
   .firstChild           Type     short description2
       .firstNephew      Type     short description3
   .secondChild          Type     short description4
       .firstNephew      Type     short description5
       .secondNephew     Type     short description6

parent.firstChild = value1
parent.firstChild.firstNephew = value2
parent.secondChild = value3
parent.secondChild.firstNephew = value4
parent.secondChild.secondNephew = value5

And I want the output to be a list with Test objects like that (the expected output):

[parent, type, value1, short description1,

firstChild, type, value2, short description2,

firstNephew, type, value3, short description3,

secondChild, type, value4, short description4,

firstNephew, type, value5, short description5,

secondNephew, type, value6, short description6]

So far I have:

public class Test {
    private String name;
    private String type;
    private String value;
    private String description;
    public Test(String name, String type, String value, String description) {
        super();
        this.name = name;
        this.type = type;
        this.value = value;
        this.description = description;
    }
    @Override
    public String toString() {
        return "name: " + name + ", type: " + type + ", value: " + value + ", description: " + description;
    }

}

public class Main {
    public static void main(String[] args) {
            try (Stream<String> lines = Files.lines(Paths.get("files/file.txt")).filter(line -> !line.isEmpty())) {
            List<Test> myObjectsList = lines.map(line -> {
                String[] arr = line.trim().split(" +", 3);
                return new Test(arr[0], arr[1], null, arr[2]);
            }).collect(Collectors.toList());

            myObjectsList.forEach(System.out::println);

        } catch (IOException e) {
            e.printStackTrace();
        }
}
}


问:
Everything but the media queries work in tailwind css react project
All the classes in my project (react + vite) work except the media queries, and I am having a hard time figuring out why. I tried manually adding all the breakpoints (with the default values) in the tailwind config file which had no effect at all.

```<code>function Sidebar(props) {
    return(
        <>
            <aside className="text-xl p-4">
                <h1 className="font-chivoMono ">Noteit</h1>
                <h3 className="text-xl md:text-7xl text-white sm:text-red-500 md:text-green-300 lg:text-pink-300">{props.displayName}</h3>
            </aside>
        </>
    )
}

export default Sidebar
</code>```

I took all the configuration steps correctly (and I think no classes would have worked if i didn't)

I tried to run the command

```<code>npx tailwindcss -i ./src/styles.css -o ./dist/output.css
</code>```

thinking it might do something but honestly I am just completely clueless to why this is not working
Also, the media queries do not show up while inspecting the page.

Body:
All the classes in my project (react + vite) work except the media queries, and I am having a hard time figuring out why. I tried manually adding all the breakpoints (with the default values) in the tailwind config file which had no effect at all.

function Sidebar(props) {
    return(
        <>

Noteit

{props.displayName}

        </>
    )
}

export default Sidebar

I took all the configuration steps correctly (and I think no classes would have worked if i didn't)

I tried to run the command

npx tailwindcss -i ./src/styles.css -o ./dist/output.css

thinking it might do something but honestly I am just completely clueless to why this is not working
Also, the media queries do not show up while inspecting the page.


问:
How do i force audience validation for a client credential flow bearer token validation in identity server 4
I've protected a resource api with client credential flow bearer in IDS4. I can specify audience and if it does not match the name in the apiresource defined in IDS4 the token fails to validate as expected.

Snippet from IDS4

```<code>public static IEnumerable<ApiResource> ApiResources =>
    new List<ApiResource>
    {
        new ApiResource("api6")
        {
            Scopes = { "api6" },
            UserClaims =
            {
                JwtClaimTypes.Audience
            }
        },
    };
</code>```

Snippet from Resource Api

```<code>builder.Services.AddAuthentication("Bearer")
                .AddJwtBearer("Bearer", options =>
                {
                    options.Authority = "https://localhost:5001";
                    //options.Audience = "api6"; // works as expected
                    options.Audience = "api7"; // Fails as expected
                    options.TokenValidationParameters = new TokenValidationParameters
                    {
                        ValidateAudience = true
                    };
                });
</code>```

However, if i remove the ValidateAudience = true from the api, it all becomes meaningless unless i can enforce IDS4 to make an audience mandatory.

I'm looking to set a property somewhere in the identity server that's something like AudienceRequired=true;

So when the token is validated, it checks for the presence of the aud claim and it's a relevant registered audience.

IE, how do i stop another API resource using the same creds? (Granted you could hack the audience to be the same as another API.)

It just seems pointless specifying audience validation in the resource if it's not enforced on the identity server and you can turn off in code? Am i missing something?....

Body:
I've protected a resource api with client credential flow bearer in IDS4. I can specify audience and if it does not match the name in the apiresource defined in IDS4 the token fails to validate as expected.

Snippet from IDS4

public static IEnumerable<ApiResource> ApiResources =>
    new List<ApiResource>
    {
        new ApiResource("api6")
        {
            Scopes = { "api6" },
            UserClaims =
            {
                JwtClaimTypes.Audience
            }
        },
    };

Snippet from Resource Api

builder.Services.AddAuthentication("Bearer")
                .AddJwtBearer("Bearer", options =>
                {
                    options.Authority = "https://localhost:5001";
                    //options.Audience = "api6"; // works as expected
                    options.Audience = "api7"; // Fails as expected
                    options.TokenValidationParameters = new TokenValidationParameters
                    {
                        ValidateAudience = true
                    };
                });

However, if i remove the ValidateAudience = true from the api, it all becomes meaningless unless i can enforce IDS4 to make an audience mandatory.

I'm looking to set a property somewhere in the identity server that's something like AudienceRequired=true;

So when the token is validated, it checks for the presence of the aud claim and it's a relevant registered audience.

IE, how do i stop another API resource using the same creds? (Granted you could hack the audience to be the same as another API.)

It just seems pointless specifying audience validation in the resource if it's not enforced on the identity server and you can turn off in code? Am i missing something?....


问:
Undefined reference even though header file is included
In short, my xdp_pass_user.c won't compile for some reason which I don't understand (you might  be able to skip xdp_pass_kern.c in order to solve it).

In more detail, I'm trying to implement some eBPF logic. I have this xdp_pass_kern.c which is my kernel program:

```<code>#include <stdint.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <asm/byteorder.h>
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/udp.h>
#include <linux/pkt_cls.h>

#define SEC(NAME) __attribute__((section(NAME), used))

#define htons(x) ((__be16)__constant_swa16((x)))

struct bpf_map_def SEC("maps") my_map = {
    .type        = BPF_MAP_TYPE_ARRAY,
    .key_size    = sizeof(uint8_t),
    .value_size  = sizeof(uint8_t),
    .max_entries = 1,
};

SEC("xdp")
int xdp_prog_simple(struct xdp_md *ctx) {
    void *data = (void *)(long)ctx->data;
    void *data_end = (void *)(long)ctx->data_end;

    struct ethhdr *eth = (struct ethhdr *)data;
    struct iphdr *iph = (struct iphdr *)(eth + 1);
    struct udphdr *udph = (struct udphdr *)(iph + 1);

    /* sanity check needed by the eBPF verifier */
    if ((void *)(udph + 1) > data_end)
        return XDP_DROP;

    /* skip non UDP packets */
    if (eth->h_proto != __constant_htons(ETH_P_IP) || iph->protocol != IPPROTO_UDP)
        return XDP_DROP;

    /* Skip non port 1900 */
    if (ntohs(udph->dest) != 1900)
        return XDP_DROP;

    uint8_t key = 10;
    uint8_t *val = bpf_map_lookup_elem(&my_map, &key);
    if (!val) {
        val = (uint8_t *)(iph + 1);
        bpf_map_update_elem(&my_map, &key, &val, BPF_ANY);
    } else {
        if (*(uint8_t *)(iph + 1) != *val)
            return XDP_DROP;
    }

    return XDP_PASS;
}

char _license[] SEC("license") = "GPL";
</code>```

And this xdp_pass_user.c which is my user program and uses (hopefully somewhat correctly) the program in xdp_pass_kern.c in order to attach the program to an interface and run xdp_prog_simple on each packet.
xdp_pass_user.c:

```<code>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <linux/perf_event.h>
#include <linux/bpf.h>
#include <net/if.h>
#include <errno.h>
#include <assert.h>
#include <sys/sysinfo.h>
#include <sys/ioctl.h>
#include <signal.h>
#include <bpf/libbpf.h>
#include <bpf/bpf.h>
#include <libgen.h>
#include <linux/if_link.h>

static int if_idx;
static char *if_name;
static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST;
static __u32 prog_id;
static struct perf_buffer *pb = NULL;

static int do_attach(int idx, int fd, const char *name)
{
    struct bpf_prog_info info = {};
    __u32 info_len = sizeof(info);
    int err;
    err = bpf_xdp_attach(idx, fd, xdp_flags, NULL);
    if (err < 0) {
        printf("ERROR: failed to attach program to %s\n", name);
        return err;
    }
    err = bpf_obj_get_info_by_fd(fd, &info, &info_len);
    if (err) {
        printf("can't get prog info - %s\n", strerror(errno));
        return err;
    }
    prog_id = info.id;
    return err;
}

static int do_detach(int idx, const char *name)
{
    __u32 curr_prog_id = 0;
    int err = 0;
    err = bpf_xdp_query_id(idx, xdp_flags, &curr_prog_id);
    if (err) {
        printf("bpf_xdp_query_id failed\n");
        return err;
    }
    if (prog_id == curr_prog_id) {
        err = bpf_xdp_detach(idx, xdp_flags, NULL);
        if (err < 0)
            printf("ERROR: failed to detach prog from %s\n", name);
    } else if (!curr_prog_id) {
        printf("couldn't find a prog id on a %s\n", name);
    } else {
        printf("program on interface changed, not removing\n");
    }
    return err;
}

static void sig_handler(int signo)
{
    do_detach(if_idx, if_name);
    perf_buffer__free(pb);
    exit(0);
}

int main (int argc, char *argv[]) {
    int prog_fd, map_fd;
    struct bpf_program *prog;
    struct bpf_object *obj;
    struct bpf_map *map;
    int err;

    char filename[] = "xdp_pass_kern.o";
    obj = bpf_object__open_file(filename, NULL);
    if (libbpf_get_error(obj))
        return 1;

    prog = bpf_object__next_program(obj, NULL);
    bpf_program__set_type(prog, BPF_PROG_TYPE_XDP);
    err = bpf_object__load(obj);
    if (err)
        return 1;
    prog_fd = bpf_program__fd(prog);
    map = bpf_object__next_map(obj, NULL);
    if (!map) {
        printf("finding a map in obj file failed\n");
        return 1;
    }
    map_fd = bpf_map__fd(map);
    if_idx = if_nametoindex("lo");
    if (!if_idx)
        if_idx = strtoul("lo", NULL, 0);
    if (!if_idx) {
        fprintf(stderr, "Invalid ifname\n");
        return 1;
    }
    if_name = "lo";
    err = do_attach(if_idx, prog_fd, if_name);
    if (err)
        return err;
    if (signal(SIGINT, sig_handler) ||
        signal(SIGHUP, sig_handler) ||
        signal(SIGTERM, sig_handler)) {
        perror("signal");
        return 1;
    }

    while (true)
        ;

    return 0;
}
</code>```

First, I'm trying to compile the kernel program using:
sudo clang -I/usr/include/x86_64-linux-gnu -O2 -target bpf -c xdp_pass_kern.c -o xdp_pass_kern.o -w. It compiles just fine.

Then, I'm trying to compile the user program with:
gcc -o xdp_pass_user xdp_pass_user.c
In order to eventually run with ./xdp_pass_user. The compilation fails with this error:

```<code>/usr/bin/ld: /tmp/ccCZPdeQ.o: in function `do_attach':
xdp_pass_user.c:(.text+0x71): undefined reference to `bpf_xdp_attach'
/usr/bin/ld: xdp_pass_user.c:(.text+0xc1): undefined reference to `bpf_obj_get_info_by_fd'
/usr/bin/ld: /tmp/ccCZPdeQ.o: in function `do_detach':
xdp_pass_user.c:(.text+0x16d): undefined reference to `bpf_xdp_query_id'
/usr/bin/ld: xdp_pass_user.c:(.text+0x1b0): undefined reference to `bpf_xdp_detach'
/usr/bin/ld: /tmp/ccCZPdeQ.o: in function `sig_handler':
xdp_pass_user.c:(.text+0x24e): undefined reference to `perf_buffer__free'
/usr/bin/ld: /tmp/ccCZPdeQ.o: in function `main':
xdp_pass_user.c:(.text+0x2a7): undefined reference to `bpf_object__open_file'
/usr/bin/ld: xdp_pass_user.c:(.text+0x2b7): undefined reference to `libbpf_get_error'
/usr/bin/ld: xdp_pass_user.c:(.text+0x2dc): undefined reference to `bpf_object__next_program'
/usr/bin/ld: xdp_pass_user.c:(.text+0x2f3): undefined reference to `bpf_program__set_type'
/usr/bin/ld: xdp_pass_user.c:(.text+0x2ff): undefined reference to `bpf_object__load'
/usr/bin/ld: xdp_pass_user.c:(.text+0x31e): undefined reference to `bpf_program__fd'
/usr/bin/ld: xdp_pass_user.c:(.text+0x337): undefined reference to `bpf_object__next_map'
/usr/bin/ld: xdp_pass_user.c:(.text+0x366): undefined reference to `bpf_map__fd'
collect2: error: ld returned 1 exit statu
</code>```

As could be seen here: https://elixir.bootlin.com/linux/latest/source/tools/lib/bpf/libbpf.h#L207, those functions (e.g. bpf_object__load) are found in libbpf.h, which I include in my code:
#include <bpf/libbpf.h>.

I have also installed libbpf-dev and libbpf0.

It is unclear to me why I get this error even though I have the header file included.

Will appreciate any help.

Body:
In short, my xdp_pass_user.c won't compile for some reason which I don't understand (you might  be able to skip xdp_pass_kern.c in order to solve it).

In more detail, I'm trying to implement some eBPF logic. I have this xdp_pass_kern.c which is my kernel program:

#include <stdint.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <asm/byteorder.h>
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/udp.h>
#include <linux/pkt_cls.h>

#define SEC(NAME) __attribute__((section(NAME), used))

#define htons(x) ((__be16)__constant_swa16((x)))

struct bpf_map_def SEC("maps") my_map = {
    .type        = BPF_MAP_TYPE_ARRAY,
    .key_size    = sizeof(uint8_t),
    .value_size  = sizeof(uint8_t),
    .max_entries = 1,
};

SEC("xdp")
int xdp_prog_simple(struct xdp_md *ctx) {
    void *data = (void *)(long)ctx->data;
    void *data_end = (void *)(long)ctx->data_end;

    struct ethhdr *eth = (struct ethhdr *)data;
    struct iphdr *iph = (struct iphdr *)(eth + 1);
    struct udphdr *udph = (struct udphdr *)(iph + 1);

    /* sanity check needed by the eBPF verifier */
    if ((void *)(udph + 1) > data_end)
        return XDP_DROP;

    /* skip non UDP packets */
    if (eth->h_proto != __constant_htons(ETH_P_IP) || iph->protocol != IPPROTO_UDP)
        return XDP_DROP;

    /* Skip non port 1900 */
    if (ntohs(udph->dest) != 1900)
        return XDP_DROP;

    uint8_t key = 10;
    uint8_t *val = bpf_map_lookup_elem(&my_map, &key);
    if (!val) {
        val = (uint8_t *)(iph + 1);
        bpf_map_update_elem(&my_map, &key, &val, BPF_ANY);
    } else {
        if (*(uint8_t *)(iph + 1) != *val)
            return XDP_DROP;
    }

    return XDP_PASS;
}

char _license[] SEC("license") = "GPL";

And this xdp_pass_user.c which is my user program and uses (hopefully somewhat correctly) the program in xdp_pass_kern.c in order to attach the program to an interface and run xdp_prog_simple on each packet.
xdp_pass_user.c:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <linux/perf_event.h>
#include <linux/bpf.h>
#include <net/if.h>
#include <errno.h>
#include <assert.h>
#include <sys/sysinfo.h>
#include <sys/ioctl.h>
#include <signal.h>
#include <bpf/libbpf.h>
#include <bpf/bpf.h>
#include <libgen.h>
#include <linux/if_link.h>

static int if_idx;
static char *if_name;
static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST;
static __u32 prog_id;
static struct perf_buffer *pb = NULL;

static int do_attach(int idx, int fd, const char *name)
{
    struct bpf_prog_info info = {};
    __u32 info_len = sizeof(info);
    int err;
    err = bpf_xdp_attach(idx, fd, xdp_flags, NULL);
    if (err < 0) {
        printf("ERROR: failed to attach program to %s\n", name);
        return err;
    }
    err = bpf_obj_get_info_by_fd(fd, &info, &info_len);
    if (err) {
        printf("can't get prog info - %s\n", strerror(errno));
        return err;
    }
    prog_id = info.id;
    return err;
}

static int do_detach(int idx, const char *name)
{
    __u32 curr_prog_id = 0;
    int err = 0;
    err = bpf_xdp_query_id(idx, xdp_flags, &curr_prog_id);
    if (err) {
        printf("bpf_xdp_query_id failed\n");
        return err;
    }
    if (prog_id == curr_prog_id) {
        err = bpf_xdp_detach(idx, xdp_flags, NULL);
        if (err < 0)
            printf("ERROR: failed to detach prog from %s\n", name);
    } else if (!curr_prog_id) {
        printf("couldn't find a prog id on a %s\n", name);
    } else {
        printf("program on interface changed, not removing\n");
    }
    return err;
}

static void sig_handler(int signo)
{
    do_detach(if_idx, if_name);
    perf_buffer__free(pb);
    exit(0);
}

int main (int argc, char *argv[]) {
    int prog_fd, map_fd;
    struct bpf_program *prog;
    struct bpf_object *obj;
    struct bpf_map *map;
    int err;

    char filename[] = "xdp_pass_kern.o";
    obj = bpf_object__open_file(filename, NULL);
    if (libbpf_get_error(obj))
        return 1;

    prog = bpf_object__next_program(obj, NULL);
    bpf_program__set_type(prog, BPF_PROG_TYPE_XDP);
    err = bpf_object__load(obj);
    if (err)
        return 1;
    prog_fd = bpf_program__fd(prog);
    map = bpf_object__next_map(obj, NULL);
    if (!map) {
        printf("finding a map in obj file failed\n");
        return 1;
    }
    map_fd = bpf_map__fd(map);
    if_idx = if_nametoindex("lo");
    if (!if_idx)
        if_idx = strtoul("lo", NULL, 0);
    if (!if_idx) {
        fprintf(stderr, "Invalid ifname\n");
        return 1;
    }
    if_name = "lo";
    err = do_attach(if_idx, prog_fd, if_name);
    if (err)
        return err;
    if (signal(SIGINT, sig_handler) ||
        signal(SIGHUP, sig_handler) ||
        signal(SIGTERM, sig_handler)) {
        perror("signal");
        return 1;
    }

    while (true)
        ;

    return 0;
}

First, I'm trying to compile the kernel program using:
sudo clang -I/usr/include/x86_64-linux-gnu -O2 -target bpf -c xdp_pass_kern.c -o xdp_pass_kern.o -w. It compiles just fine.

Then, I'm trying to compile the user program with:
gcc -o xdp_pass_user xdp_pass_user.c
In order to eventually run with ./xdp_pass_user. The compilation fails with this error:

/usr/bin/ld: /tmp/ccCZPdeQ.o: in function `do_attach':
xdp_pass_user.c:(.text+0x71): undefined reference to `bpf_xdp_attach'
/usr/bin/ld: xdp_pass_user.c:(.text+0xc1): undefined reference to `bpf_obj_get_info_by_fd'
/usr/bin/ld: /tmp/ccCZPdeQ.o: in function `do_detach':
xdp_pass_user.c:(.text+0x16d): undefined reference to `bpf_xdp_query_id'
/usr/bin/ld: xdp_pass_user.c:(.text+0x1b0): undefined reference to `bpf_xdp_detach'
/usr/bin/ld: /tmp/ccCZPdeQ.o: in function `sig_handler':
xdp_pass_user.c:(.text+0x24e): undefined reference to `perf_buffer__free'
/usr/bin/ld: /tmp/ccCZPdeQ.o: in function `main':
xdp_pass_user.c:(.text+0x2a7): undefined reference to `bpf_object__open_file'
/usr/bin/ld: xdp_pass_user.c:(.text+0x2b7): undefined reference to `libbpf_get_error'
/usr/bin/ld: xdp_pass_user.c:(.text+0x2dc): undefined reference to `bpf_object__next_program'
/usr/bin/ld: xdp_pass_user.c:(.text+0x2f3): undefined reference to `bpf_program__set_type'
/usr/bin/ld: xdp_pass_user.c:(.text+0x2ff): undefined reference to `bpf_object__load'
/usr/bin/ld: xdp_pass_user.c:(.text+0x31e): undefined reference to `bpf_program__fd'
/usr/bin/ld: xdp_pass_user.c:(.text+0x337): undefined reference to `bpf_object__next_map'
/usr/bin/ld: xdp_pass_user.c:(.text+0x366): undefined reference to `bpf_map__fd'
collect2: error: ld returned 1 exit statu

As could be seen here: https://elixir.bootlin.com/linux/latest/source/tools/lib/bpf/libbpf.h#L207, those functions (e.g. bpf_object__load) are found in libbpf.h, which I include in my code:
#include <bpf/libbpf.h>.

I have also installed libbpf-dev and libbpf0.

It is unclear to me why I get this error even though I have the header file included.

Will appreciate any help.


问:
Problem detecting iPad userAgent in Safari
I have a problem detecting iPad in Safari. My aim is to make all iOS mobile devices have link to AppStore, while desktop has link to the browser version of app. I've already tested it on iPhone and iPad Chrome - everything worked correctly, though in Safari iPad is treated as Mac device.

I've tried other solutions from related stackoverflow topics, such as finding maxTouchPoints, trying 'ontouchend' in window etc. But nothing works.

Currently I have the following function, where I check iOS in userAgent and also checking on touch points value, but it doesn't work. I don't know what I am doing wrong, but maybe there are more progressive solutions to this problem.

```<code>export default function CheckDevice() {

  if(typeof window !== "undefined") {
    const userAgent = window.navigator.userAgent;
    let os = null;

    const isIpad = /Macintosh|Mac OS|MacIntel|MacPPC|Mac68K/gi.test(userAgent) && (navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
    const isIOS = isIpad || /iPad|iPhone|iPod/gi.test(userAgent)

    if (/Macintosh|MacIntel|MacPPC|Mac68K/gi.test(userAgent) && navigator.maxTouchPoints === 0) {
      os = 'Mac';
    } else if (isIOS) {
      os = 'iOS';
    } else if (/'Win32|Win64|Windows|Windows NT|WinCE/gi.test(userAgent)) {
      os = 'Windows';
    } else if (/Android/gi.test(userAgent)) {
      os = 'Android';
    } else if (/Linux/gi.test(userAgent)) {
      os = 'Linux';
    }

  return os
  }
</code>```

Body:
I have a problem detecting iPad in Safari. My aim is to make all iOS mobile devices have link to AppStore, while desktop has link to the browser version of app. I've already tested it on iPhone and iPad Chrome - everything worked correctly, though in Safari iPad is treated as Mac device.

I've tried other solutions from related stackoverflow topics, such as finding maxTouchPoints, trying 'ontouchend' in window etc. But nothing works.

Currently I have the following function, where I check iOS in userAgent and also checking on touch points value, but it doesn't work. I don't know what I am doing wrong, but maybe there are more progressive solutions to this problem.

export default function CheckDevice() {

  if(typeof window !== "undefined") {
    const userAgent = window.navigator.userAgent;
    let os = null;

    const isIpad = /Macintosh|Mac OS|MacIntel|MacPPC|Mac68K/gi.test(userAgent) && (navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
    const isIOS = isIpad || /iPad|iPhone|iPod/gi.test(userAgent)

    if (/Macintosh|MacIntel|MacPPC|Mac68K/gi.test(userAgent) && navigator.maxTouchPoints === 0) {
      os = 'Mac';
    } else if (isIOS) {
      os = 'iOS';
    } else if (/'Win32|Win64|Windows|Windows NT|WinCE/gi.test(userAgent)) {
      os = 'Windows';
    } else if (/Android/gi.test(userAgent)) {
      os = 'Android';
    } else if (/Linux/gi.test(userAgent)) {
      os = 'Linux';
    }

  return os
  }


问:
Data in RecyclerView does not change
I'm making a task that changes the unit property of the recycler view list in batches using a toggle button.

Since you are using MVVM pattern your logic will be executed in Repository.

Through debugging, it was confirmed that the unit of all items in the Repository List changes.

However, there is no change on the screen even if I put a value in _items.value of the ViewModel.

I'm not sure where the problem is.

WorkoutSetInfo

```<code>data class WorkoutSetInfo(
    @PrimaryKey(autoGenerate = true)
    val id: Long = 0,
    val set: Int,
    var weight: String = "0",
    var reps: String = "0",
    var unit: WorkoutUnit = WorkoutUnit.kg,
    val parentWorkoutId: Long = 0
)
</code>```

Repository

```<code>class WriteDetailRepository(val dao: WorkoutDao) {
    private var setInfoList = arrayListOf(WorkoutSetInfo(set = 1)) // fixed set 1
    private var updatedList = listOf<WorkoutSetInfo>()
                get() = setInfoList.toList()

    fun changeUnit(unit: WorkoutUnit) {
        updatedList = setInfoList.map { setInfo ->
            setInfo.copy(unit = unit)
        }
    }

    fun add() {
        val item = WorkoutSetInfo(set = setInfoList.size + 1)
        setInfoList.add(item)
        updatedList = setInfoList.toList()
    }

    fun getList() : List<WorkoutSetInfo> = updatedList
}
</code>```

ViewModel

```<code>class WriteDetailViewModel(
    private val repository: WriteDetailRepository
    ): ViewModel() {

    private var _items: MutableStateFlow<List<WorkoutSetInfo>> = MutableStateFlow(repository.getList())
    val items = _items.asStateFlow()

    fun changeUnit(unit: WorkoutUnit) {
        repository.changeUnit(unit)
        _items.value = repository.getList()
    }

    fun addSet() {
        viewModelScope.launch(Dispatchers.IO) {
            repository.add()
            _items.value = repository.getList() // here
        }
    }
}
</code>```

Fragment

```<code>class WriteDetailFragment :  Fragment() {

    ...
    private val viewModel: WriteDetailViewModel by viewModels {
        WriteDetailViewModelFactory(
            (requireActivity().application as WorkoutApplication).writeDetailRepo
        )
    }

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        _binding = FragmentWriteDetailBinding.inflate(inflater, container, false)

        binding.apply {
            ...

            addSet.setOnClickListener {
                viewModel.addSet()
            }

            unitToggle.addOnButtonCheckedListener { _, checkedId, isChecked ->
                if(isChecked) {
                    when(checkedId) {
                        R.id.kg -> viewModel.changeUnit(WorkoutUnit.kg)
                        R.id.lb -> viewModel.changeUnit(WorkoutUnit.lbs)
                    }
                }
            }
        }

        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        viewLifecycleOwner.lifecycleScope.launch {
            repeatOnLifecycle(Lifecycle.State.STARTED) {
                viewModel.items.collect { list -> // list value does not change
                    adapter.submitList(list)
                }
            }
        }
    }
}
</code>```

Title: Data in RecyclerView does not change

Body:
I'm making a task that changes the unit property of the recycler view list in batches using a toggle button.

Since you are using MVVM pattern your logic will be executed in Repository.

Through debugging, it was confirmed that the unit of all items in the Repository List changes.

However, there is no change on the screen even if I put a value in _items.value of the ViewModel.

I'm not sure where the problem is.

WorkoutSetInfo

data class WorkoutSetInfo(
    @PrimaryKey(autoGenerate = true)
    val id: Long = 0,
    val set: Int,
    var weight: String = "0",
    var reps: String = "0",
    var unit: WorkoutUnit = WorkoutUnit.kg,
    val parentWorkoutId: Long = 0
)

Repository

class WriteDetailRepository(val dao: WorkoutDao) {
    private var setInfoList = arrayListOf(WorkoutSetInfo(set = 1)) // fixed set 1
    private var updatedList = listOf<WorkoutSetInfo>()
                get() = setInfoList.toList()

    fun changeUnit(unit: WorkoutUnit) {
        updatedList = setInfoList.map { setInfo ->
            setInfo.copy(unit = unit)
        }
    }

    fun add() {
        val item = WorkoutSetInfo(set = setInfoList.size + 1)
        setInfoList.add(item)
        updatedList = setInfoList.toList()
    }

    fun getList() : List<WorkoutSetInfo> = updatedList
}

ViewModel

class WriteDetailViewModel(
    private val repository: WriteDetailRepository
    ): ViewModel() {

    private var _items: MutableStateFlow<List<WorkoutSetInfo>> = MutableStateFlow(repository.getList())
    val items = _items.asStateFlow()

    fun changeUnit(unit: WorkoutUnit) {
        repository.changeUnit(unit)
        _items.value = repository.getList()
    }

    fun addSet() {
        viewModelScope.launch(Dispatchers.IO) {
            repository.add()
            _items.value = repository.getList() // here
        }
    }
}

Fragment

class WriteDetailFragment :  Fragment() {

    ...
    private val viewModel: WriteDetailViewModel by viewModels {
        WriteDetailViewModelFactory(
            (requireActivity().application as WorkoutApplication).writeDetailRepo
        )
    }

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        _binding = FragmentWriteDetailBinding.inflate(inflater, container, false)

        binding.apply {
            ...

            addSet.setOnClickListener {
                viewModel.addSet()
            }

            unitToggle.addOnButtonCheckedListener { _, checkedId, isChecked ->
                if(isChecked) {
                    when(checkedId) {
                        R.id.kg -> viewModel.changeUnit(WorkoutUnit.kg)
                        R.id.lb -> viewModel.changeUnit(WorkoutUnit.lbs)
                    }
                }
            }
        }

        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        viewLifecycleOwner.lifecycleScope.launch {
            repeatOnLifecycle(Lifecycle.State.STARTED) {
                viewModel.items.collect { list -> // list value does not change
                    adapter.submitList(list)
                }
            }
        }
    }
}


问:
In a Powershell command, Why does "$_" resolve to a filename when included as part of a path?
I was trying to figure out how to create hardlinks in a destination folder to every file contained in a source folder.  I finally succeeded by running this from the source folder:

```<code>gci | foreach-object {new-item -itemtype hardlink -path c:\destdir\$_ -value $_}
</code>```

A hardlink named "1.txt" was created in c:\destdir to the file named "1.txt" in c:\sourcedir, and so on for every file in c:\sourcedir.  So in -value $_ (source file in c:\sourcedir), the $_ resolves to the fileinfo object that will be hardlinked.  But in -path c\destdir\$_, the $_ resolved to "1.txt" - just the file name, not the whole pathname.  How did Powershell know how to supply the right part of the filename from the fileinfo object that came from the pipeline?

Body:
I was trying to figure out how to create hardlinks in a destination folder to every file contained in a source folder.  I finally succeeded by running this from the source folder:

gci | foreach-object {new-item -itemtype hardlink -path c:\destdir\$_ -value $_}

A hardlink named "1.txt" was created in c:\destdir to the file named "1.txt" in c:\sourcedir, and so on for every file in c:\sourcedir.  So in -value $_ (source file in c:\sourcedir), the $_ resolves to the fileinfo object that will be hardlinked.  But in -path c\destdir\$_, the $_ resolved to "1.txt" - just the file name, not the whole pathname.  How did Powershell know how to supply the right part of the filename from the fileinfo object that came from the pipeline?


问:
how loop through a dataframe with comma separated values?
The code below is an example of the problem i am dealing with. I start off with raw data, df, which is then transformed into df2 as I am combining similar fruit together using the df['Combine'] column that tags the fruit. What I am trying to do next is create a for-loop that loops through each SKU number, which is easier to do in df than df2..... but then I am also trying to loop through the excel workbooks. I extract a graph through the worksheets, but the problem is, is that some values are pointing to the same graph, so i do not need the graph twice, just once. Other times, i need to extract 2 graphs from 1 worksheet, as you can see with strawberries. How would i go about doing this?

```<code>import pandas as pd

df = pd.DataFrame( {'Category':['Orange','Orange','Orange','Strawberry', 'Pineapple'],'Name' :['Blood Orange','Navel Orange', 'Jaffa Orange', 'Strawberry', 'Pineapple'], 'SKU': [4564,7894,5484,4675,5461],'Combine':[1,1,1,2,3],
                    'ExcelPath': ['oranges.xlsx','oranges.xlsx','oranges2.xlsx','strawberries.xlsx','pineapples.xlsx'], 'ExcelWorksheet':['GRAPH1','GRAPH1','GRAPH2','GRAPH1, GRAPH2','GRAPH1']})

df2 = df.groupby(['Combine'])[['Category','SKU','ExcelPath','ExcelWorksheet']].agg(set)
df2 = df2.astype(str).replace(r'{|}|\'','',regex=True)
df2 = df2.replace(['nan, '],'',regex=True)
</code>```

Body:
The code below is an example of the problem i am dealing with. I start off with raw data, df, which is then transformed into df2 as I am combining similar fruit together using the df['Combine'] column that tags the fruit. What I am trying to do next is create a for-loop that loops through each SKU number, which is easier to do in df than df2..... but then I am also trying to loop through the excel workbooks. I extract a graph through the worksheets, but the problem is, is that some values are pointing to the same graph, so i do not need the graph twice, just once. Other times, i need to extract 2 graphs from 1 worksheet, as you can see with strawberries. How would i go about doing this?

import pandas as pd

df = pd.DataFrame( {'Category':['Orange','Orange','Orange','Strawberry', 'Pineapple'],'Name' :['Blood Orange','Navel Orange', 'Jaffa Orange', 'Strawberry', 'Pineapple'], 'SKU': [4564,7894,5484,4675,5461],'Combine':[1,1,1,2,3],
                    'ExcelPath': ['oranges.xlsx','oranges.xlsx','oranges2.xlsx','strawberries.xlsx','pineapples.xlsx'], 'ExcelWorksheet':['GRAPH1','GRAPH1','GRAPH2','GRAPH1, GRAPH2','GRAPH1']})

df2 = df.groupby(['Combine'])[['Category','SKU','ExcelPath','ExcelWorksheet']].agg(set)
df2 = df2.astype(str).replace(r'{|}|\'','',regex=True)
df2 = df2.replace(['nan, '],'',regex=True)


问:
DateTime.Now precision when called in different services
I have an object which can be called MyResponse.

```<code>{
"TimeStampA": "2022-01-01 08:00:00.000",
"TimeStampB": "2022-01-01 08:00:00.100"
}
</code>```

The response is created by a service A (which set TimeStampA property) and then forwarded to service B (which set TimeStampB property).
Service A and service B are running on the same server.

TimeStampA and TimeStampB are both set using DateTime.Now function.

Problem : when the frequency of MyResponse publication is very high, i can see that in some cases, TimeStampB < TimeStampA

I found this article telling that DateTime.Now can return the same value if called repeatedly in a short time interval.
https://learn.microsoft.com/en-us/dotnet/api/system.datetime.now?redirectedfrom=MSDN&view=net-7.0#System_DateTime_Now
It seems to explain why TimeStampB < TimeStampA in some cases ?

So, how to set the timestamp with precision ? Stopwatch seems more appropriate for durations, but the items are manipulated in 2 services.

My goal is to calculate the duration between TimeStampA and TimeStampB

Thanks

Body:
I have an object which can be called MyResponse.

{
"TimeStampA": "2022-01-01 08:00:00.000",
"TimeStampB": "2022-01-01 08:00:00.100"
}

The response is created by a service A (which set TimeStampA property) and then forwarded to service B (which set TimeStampB property).
Service A and service B are running on the same server.

TimeStampA and TimeStampB are both set using DateTime.Now function.

Problem : when the frequency of MyResponse publication is very high, i can see that in some cases, TimeStampB < TimeStampA

I found this article telling that DateTime.Now can return the same value if called repeatedly in a short time interval.
https://learn.microsoft.com/en-us/dotnet/api/system.datetime.now?redirectedfrom=MSDN&view=net-7.0#System_DateTime_Now
It seems to explain why TimeStampB < TimeStampA in some cases ?

So, how to set the timestamp with precision ? Stopwatch seems more appropriate for durations, but the items are manipulated in 2 services.

My goal is to calculate the duration between TimeStampA and TimeStampB

Thanks


问:
Truncate selected value in SwiftUI Picker with limited width
I'm implementing a Picker in SwiftUI. The picker values are strings that vary in size, but the picker itself has a maxWidth due to UI limitations. Some of the strings won't fit, and that's fine with me. However, at the moment, the string is wrapped, increasing the height of the picker, like so:

I'd like to limit the string to just one line, truncating the string, and keeping the picker height the same.

I've tried

```<code>.frame(maxHeight: 20)
.clipped()
.contentShape(Rectangle())
</code>```

on the picker, but that gives me this:

I'd like to truncate the string. How can I do this? NOTE: it should only truncate here, not in the dropdown list.

I've played around with .lineLimit(1), .multilineTextAlignment(.leading), .truncationMode(.tail), on both the text in the ForEach block, and on the picker itself, but no luck so far.

Here is the full code that I have now:

```<code>Picker("Theme", selection: $selectedThemeRawValue) {
    ForEach(Theme.allCases.map({$0.rawValue}), id: \.self) { value in
        Text(value)
            .lineLimit(1)
            .multilineTextAlignment(.leading)
            .truncationMode(.tail)
    }
}
.accentColor(.primary)
.frame(maxHeight: 20)
.clipped()
.contentShape(Rectangle())
.lineLimit(1)
.multilineTextAlignment(.leading)
.truncationMode(.tail)
</code>```

Does anyone have an idea on how I can do this?

Body:
I'm implementing a Picker in SwiftUI. The picker values are strings that vary in size, but the picker itself has a maxWidth due to UI limitations. Some of the strings won't fit, and that's fine with me. However, at the moment, the string is wrapped, increasing the height of the picker, like so:

I'd like to limit the string to just one line, truncating the string, and keeping the picker height the same.

I've tried

.frame(maxHeight: 20)
.clipped()
.contentShape(Rectangle())

on the picker, but that gives me this:

I'd like to truncate the string. How can I do this? NOTE: it should only truncate here, not in the dropdown list.

I've played around with .lineLimit(1), .multilineTextAlignment(.leading), .truncationMode(.tail), on both the text in the ForEach block, and on the picker itself, but no luck so far.

Here is the full code that I have now:

Picker("Theme", selection: $selectedThemeRawValue) {
    ForEach(Theme.allCases.map({$0.rawValue}), id: \.self) { value in
        Text(value)
            .lineLimit(1)
            .multilineTextAlignment(.leading)
            .truncationMode(.tail)
    }
}
.accentColor(.primary)
.frame(maxHeight: 20)
.clipped()
.contentShape(Rectangle())
.lineLimit(1)
.multilineTextAlignment(.leading)
.truncationMode(.tail)

Does anyone have an idea on how I can do this?


问:
WooCommerce Analytics : show only the stats of the logged user
On the page "Analytics Overview" : /wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Foverview

I would like to show the statistics of the currently logged user, not all the users. It's for a marketplace and an iframe.

I already tried things like:

```<code>function add_where_subquery($clauses)
{
    $user = wp_get_current_user();
    $userId = $user->ID;

    $clauses[] = "AND wp_wc_order_stats.post_author = '{$userId}'";

    return $clauses;
}

add_filter('woocommerce_analytics_clauses_where_orders_subquery', 'add_where_subquery');
add_filter('woocommerce_analytics_clauses_where_orders_stats_total', 'add_where_subquery');
add_filter('woocommerce_analytics_clauses_where_orders_stats_interval', 'add_where_subquery');

function add_select_subquery($clauses)
{
    $clauses[] = ', wp_wc_order_stats.post_author';

    return $clauses;
}

add_filter('woocommerce_analytics_clauses_select_orders_subquery', 'add_select_subquery');
add_filter('woocommerce_analytics_clauses_select_orders_stats_total', 'add_select_subquery');
add_filter('woocommerce_analytics_clauses_select_orders_stats_interval', 'add_select_subquery');
</code>```

But it does nothing. All the stats needs to be adapted to the logged user (with its own orders). How can I do?

Best regards,

Body:
On the page "Analytics Overview" : /wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Foverview

I would like to show the statistics of the currently logged user, not all the users. It's for a marketplace and an iframe.

I already tried things like:

function add_where_subquery($clauses)
{
    $user = wp_get_current_user();
    $userId = $user->ID;

    $clauses[] = "AND wp_wc_order_stats.post_author = '{$userId}'";

    return $clauses;
}

add_filter('woocommerce_analytics_clauses_where_orders_subquery', 'add_where_subquery');
add_filter('woocommerce_analytics_clauses_where_orders_stats_total', 'add_where_subquery');
add_filter('woocommerce_analytics_clauses_where_orders_stats_interval', 'add_where_subquery');

function add_select_subquery($clauses)
{
    $clauses[] = ', wp_wc_order_stats.post_author';

    return $clauses;
}

add_filter('woocommerce_analytics_clauses_select_orders_subquery', 'add_select_subquery');
add_filter('woocommerce_analytics_clauses_select_orders_stats_total', 'add_select_subquery');
add_filter('woocommerce_analytics_clauses_select_orders_stats_interval', 'add_select_subquery');

But it does nothing. All the stats needs to be adapted to the logged user (with its own orders). How can I do?

Best regards,


问:
Use a function defined in a siblings child component in Vue
So have a a MainLauyout.vue file

In that file I have a Toolbar component and a content component like so

```<code><!--MainLayout.Vue-->
<Toolbar />
<Content></Content>
</code>```

Within Content component I have a search bar with @input

Within the Content component

I have a router-view that displays another vue.

Within that vue, I have a table with a search function defined.

I was wondering how its possible to put that function in the @input that is in the Toolbar component. From what I was able to search they say to use refs but I'm not sure how to get that to work with my layout structure. Can anyone let me know the best way to do this?

Body:
So have a a MainLauyout.vue file

In that file I have a Toolbar component and a content component like so

<Toolbar />
<Content></Content>

Within Content component I have a search bar with @input

Within the Content component

I have a router-view that displays another vue.

Within that vue, I have a table with a search function defined.

I was wondering how its possible to put that function in the @input that is in the Toolbar component. From what I was able to search they say to use refs but I'm not sure how to get that to work with my layout structure. Can anyone let me know the best way to do this?