问:
No virtual method performAttach()V in class Landroidx/savedstate/SavedStateRegistryController with Appium and Espresso
I am trying to launch an automatic test with Appium and Espresso but get stuck with the error in the title at application start. I checked that I am using a debug apk and all other Espresso dependencies.
I am running Appium with Robot Framework and AppiumLibrary to start the app.

Below, the Appium logs

```[Appium] Welcome to Appium v2.0.0-beta.48 (REV 6a7eac25e167a1eb2d49e13c8cc530a3188af995)
[Appium] Non-default server args:
[Appium] {
[Appium]   basePath: '/wd/hub'
[Appium] }
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] {
[Appium]   'appium:automationName': 'Espresso',
[Appium]   'appium:newCommandTimeout': 0,
[Appium]   'appium:deviceName': 'emulator-5554',
[Appium]   'appium:autoGrantPermissions': true
[Appium] }
[Appium] Attempting to load driver uiautomator2...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver xcuitest...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-xcuitest-driver
[Appium] Attempting to load driver espresso...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-espresso-driver
(node:22533) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[Appium] Available drivers:
[Appium]   - uiautomator2@2.12.1 (automationName 'UiAutomator2')
[Appium]   - xcuitest@4.16.3 (automationName 'XCUITest')
[Appium]   - espresso@2.13.9 (automationName 'Espresso')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[debug] [HTTP] Request idempotency key: 7b853c7e-f626-4307-bfe7-a3b18754139d
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:devicename":"emulator-5554","appium:appPackage":"net.myapp.dev","appium:appActivity":"net.myapp.app.MainActivity","appium:automationName":"Espresso","appium:noReset":"false"}}}
[debug] [AppiumDriver@87ee] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:devicename":"emulator-5554","appium:appPackage":"net.myapp.dev","appium:appActivity":"net.myapp.app.MainActivity","appium:automationName":"Espresso","appium:noReset":"false"}}]
[debug] [AppiumDriver@87ee] Event 'newSessionRequested' logged at 1672994839624 (10:47:19 GMT+0200 (Eastern European Standard Time))
[Appium] Attempting to find matching driver for automationName 'Espresso' and platformName 'Android'
[Appium] The 'espresso' driver was installed and matched caps.
[Appium] Will require it at /Users/liviuavram/.appium/node_modules/appium-espresso-driver
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-espresso-driver
[AppiumDriver@87ee] Appium v2.0.0-beta.48 creating new EspressoDriver (v2.13.9) session
[AppiumDriver@87ee] Checking BaseDriver versions for Appium and EspressoDriver
[AppiumDriver@87ee] Appium's BaseDriver version is 9.1.0
[AppiumDriver@87ee] EspressoDriver's BaseDriver version is 9.1.0
[debug] [EspressoDriver@9a25] Creating session with W3C capabilities: {
[debug] [EspressoDriver@9a25]   "alwaysMatch": {
[debug] [EspressoDriver@9a25]     "platformName": "Android",
[debug] [EspressoDriver@9a25]     "appium:devicename": "emulator-5554",
[debug] [EspressoDriver@9a25]     "appium:appPackage": "net.myapp.dev",
[debug] [EspressoDriver@9a25]     "appium:appActivity": "net.myapp.app.MainActivity",
[debug] [EspressoDriver@9a25]     "appium:automationName": "Espresso",
[debug] [EspressoDriver@9a25]     "appium:noReset": "false",
[debug] [EspressoDriver@9a25]     "appium:newCommandTimeout": 0,
[debug] [EspressoDriver@9a25]     "appium:deviceName": "emulator-5554",
[debug] [EspressoDriver@9a25]     "appium:autoGrantPermissions": true
[debug] [EspressoDriver@9a25]   },
[debug] [EspressoDriver@9a25]   "firstMatch": [
[debug] [EspressoDriver@9a25]     {}
[debug] [EspressoDriver@9a25]   ]
[debug] [EspressoDriver@9a25] }
[EspressoDriver@9a25] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[EspressoDriver@9a25] The following capabilities were provided, but are not recognized by Appium:
[EspressoDriver@9a25]   devicename
[EspressoDriver@9a25 (c5d1140b)] Session created with session id: c5d1140b-a77a-43a2-9820-03f48d574e5f
[ADB] Found 3 'build-tools' folders under '/Users/liviuavram/Library/Android/sdk' (newest first):
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/33.0.0
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/Users/liviuavram/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb' from '/Users/liviuavram/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to emulator-5554
[EspressoDriver@9a25 (c5d1140b)] App file was not listed, instead we're going to run net.myapp.dev directly on the device
[debug] [ADB] Getting install status for net.myapp.dev
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] 'net.myapp.dev' is installed
[EspressoDriver@9a25 (c5d1140b)] EspressoDriver version: 2.13.9
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 31
[ADB] Getting device platform version
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 12
[debug] [ADB] Device API level: 31
[EspressoDriver@9a25 (c5d1140b)] Relaxing hidden api policy
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('5.0.0' >= '5.0.0')
[debug] [ADB] There is no need to install/upgrade '/Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [Logcat] Starting logs capture with command: /Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global animator_duration_scale'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global transition_animation_scale'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global window_animation_scale'
[debug] [EspressoDriver@9a25 (c5d1140b)] Forwarding Espresso Server port 6791 to 8300
[debug] [ADB] Forwarding system: 8300 to device: 6791
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8300 tcp:6791'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [EspressoDriver@9a25 (c5d1140b)] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for net.myapp.dev
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] 'net.myapp.dev' is installed
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop net.myapp.dev'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear net.myapp.dev'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] Retrieving requested permissions
[debug] [ADB] Retrieved 20 permissions from requested group
[debug] [ADB] Retrieving granted permissions
[debug] [ADB] Retrieved 10 permissions from install,runtime groups
[debug] [ADB] Granting permissions ["android.permission.READ_EXTERNAL_STORAGE","android.permission.WRITE_EXTERNAL_STORAGE","android.permission.ACCESS_FINE_LOCATION","android.permission.CAMERA","android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE","android.launcher.permission.CHANGE_BADGE","android.launcher.permission.READ_SETTINGS","android.launcher.permission.WRITE_SETTINGS","android.permission.READ_APP_BADGE","android.permission.ACCESS_COARSE_LOCATION"] to 'net.myapp.dev'
[debug] [ADB] Got the following command chunks to execute: [["pm","grant","net.myapp.dev","android.permission.READ_EXTERNAL_STORAGE",";","pm","grant","net.myapp.dev","android.permission.WRITE_EXTERNAL_STORAGE",";","pm","grant","net.myapp.dev","android.permission.ACCESS_FINE_LOCATION",";","pm","grant","net.myapp.dev","android.permission.CAMERA",";","pm","grant","net.myapp.dev","android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE",";","pm","grant","net.myapp.dev","android.launcher.permission.CHANGE_BADGE",";","pm","grant","net.myapp.dev","android.launcher.permission.READ_SETTINGS",";","pm","grant","net.myapp.dev","android.launcher.permission.WRITE_SETTINGS",";","pm","grant","net.myapp.dev","android.permission.READ_APP_BADGE",";","pm","grant","net.myapp.dev","android.permission.ACCESS_COARSE_LOCATION",";"]]
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm grant net.myapp.dev android.permission.READ_EXTERNAL_STORAGE ; pm grant net.myapp.dev android.permission.WRITE_EXTERNAL_STORAGE ; pm grant net.myapp.dev android.permission.ACCESS_FINE_LOCATION ; pm grant net.myapp.dev android.permission.CAMERA ; pm grant net.myapp.dev android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE ; pm grant net.myapp.dev android.launcher.permission.CHANGE_BADGE ; pm grant net.myapp.dev android.launcher.permission.READ_SETTINGS ; pm grant net.myapp.dev android.launcher.permission.WRITE_SETTINGS ; pm grant net.myapp.dev android.permission.READ_APP_BADGE ; pm grant net.myapp.dev android.permission.ACCESS_COARSE_LOCATION ;'
[debug] [AndroidDriver] Performed fast reset on the installed 'net.myapp.dev' application (stop and clear)
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell "[ -e '/data/local/tmp/espresso.apppackage' ] && echo __PASS__"'
[debug] [EspressoDriver@9a25 (c5d1140b)] The previous target application package is unknown
[EspressoDriver@9a25 (c5d1140b)] Forcing Espresso server rebuild because of changed application package
[debug] [EspressoDriver@9a25 (c5d1140b)] Deleting the obsolete Espresso server package '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[EspressoDriver@9a25 (c5d1140b)] Building espresso server in '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554'
[debug] [EspressoDriver@9a25 (c5d1140b)] The build folder root could be customized by changing the 'tmpDir' capability
[debug] [EspressoDriver@9a25 (c5d1140b)] Copying espresso server template from ('/Users/liviuavram/.appium/node_modules/appium-espresso-driver/espresso-server' to '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554')
[debug] [Support] Traversed 52 directories and 281 files in 104ms
[debug] [EspressoDriver@9a25 (c5d1140b)] Bulding espresso server
[debug] [EspressoDriver@9a25 (c5d1140b)] Beginning build with command '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554/gradlew -PappiumTargetPackage=net.myapp.dev app:assembleAndroidTest' in directory '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554'
[debug] [EspressoDriver@9a25 (c5d1140b)] Output from Gradle will not be logged. To change this, use 'showGradleLog' desired capability
[debug] [EspressoDriver@9a25 (c5d1140b)] Copying built apk from '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk' to '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[debug] [ADB] Checking app cert for /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[ADB] Using 'apksigner.jar' from '/Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar'
[debug] [ADB] Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar verify --print-certs /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
[debug] [ADB] Signer #1 certificate SHA-256 digest: fe82fd29c451bf64a764faaa86634a05981f71ffcd92b882ed6545d2acdffe82
[debug] [ADB] Signer #1 certificate SHA-1 digest: adfec47da6d9a2ebeb0eebd2a483e44496b8fdc2
[debug] [ADB] Signer #1 certificate MD5 digest: 056c1cb0adccefb201a142db5d3fd9ec
[debug] [ADB]
[ADB] '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is signed with a non-default certificate
[ADB] Using 'zipalign' from '/Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/zipalign'
[debug] [ADB] /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is already zip-aligned. Doing nothing
[debug] [ADB] Signing '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' with default cert
[debug] [ADB] Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar sign --key /Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.pk8 --cert /Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.x509.pem /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[debug] [ADB] Uninstalling io.appium.espressoserver.test
[debug] [ADB] Getting install status for io.appium.espressoserver.test
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.espressoserver.test'
[debug] [ADB] 'io.appium.espressoserver.test' is installed
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.espressoserver.test'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 uninstall io.appium.espressoserver.test'
[debug] [ADB] 'adb uninstall io.appium.espressoserver.test' command output: Success
[ADB] io.appium.espressoserver.test was successfully uninstalled
[EspressoDriver@9a25 (c5d1140b)] Uninstalled the obsolete Espresso server package from the device under test
[debug] [ADB] Getting install status for io.appium.espressoserver.test
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.espressoserver.test'
[debug] [ADB] 'io.appium.espressoserver.test' is not installed
[debug] [ADB] App '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is not installed
[EspressoDriver@9a25 (c5d1140b)] Installing Espresso Test Server apk from the target device (path: '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk')
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 help'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 features'
[ADB] The application at '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[ADB] The installation of 'io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' took 164ms
[debug] [ADB] Install command stdout: Serving...
[debug] [ADB] Performing Incremental Install
[debug] [ADB] Success
[debug] [ADB] Install command complete in 146 ms
[EspressoDriver@9a25 (c5d1140b)] Installed Espresso Test Server apk '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' (pkg: 'io.appium.espressoserver.test')
[ADB] Adding packages ["io.appium.settings","io.appium.espressoserver.test"] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.espressoserver.test",";"]]
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.espressoserver.test ;'
[debug] [EspressoDriver@9a25 (c5d1140b)] Performing cleanup of automation leftovers
[debug] [EspressoDriver@9a25 (c5d1140b)] No obsolete sessions have been detected (socket hang up)
[EspressoDriver@9a25 (c5d1140b)] Starting Espresso Server v2.13.9 with cmd: adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","-e","debug",false,"-e","disableAnalytics",true,"io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[EspressoDriver@9a25 (c5d1140b)] Waiting up to 45000ms for Espresso server to be online
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] io.appium.espressoserver.EspressoServerRunnerTest:
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[debug] [EspressoDriver@9a25 (c5d1140b)] Got response with status 200: {"id":"ea635626-6eda-40c6-b5a4-ea3cf80a86c9","sessionId":null,"value":null}
[EspressoDriver@9a25 (c5d1140b)] Espresso server is online. The initialization process took 1531ms
[EspressoDriver@9a25 (c5d1140b)] Starting the session
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/session' to command name 'createSession'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [POST /session] to [POST http://127.0.0.1:8300/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","devicename":"emulator-5554","appPackage":"net.myapp.dev","appActivity":"net.myapp.app.MainActivity","automationName":"Espresso","noReset":false,"newCommandTimeout":0,"deviceName":"emulator-5554","autoGrantPermissions":true},"platformName":"Android","devicename":"emulator-5554","appPackage":"net.myapp.dev","appActivity":"net.myapp.app.MainActivity","automationName":"Espresso","noReset":false,"newCommandTimeout":0,"deviceName":"emulator-5554","autoGrantPermissions":true,"deviceUDID":"emulator-5554","appWaitPackage":"net.myapp.dev","appWaitActivity":"net.myapp.app.MainActivity"}],"alwaysMatch":{}}}
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] Process crashed while executing startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest):
[debug] [EspressoDriver@9a25 (c5d1140b)] java.lang.NoSuchMethodError: No virtual method performAttach()V in class Landroidx/savedstate/SavedStateRegistryController; or its super classes (declaration of 'androidx.savedstate.SavedStateRegistryController' appears in /data/app/~~-_XPaemZoOsaDyP5dvs3Vg==/io.appium.espressoserver.test-QsWDOBl2RUq8qZlMBH_E5w==/base.apk)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.activity.ComponentActivity.<init>(ComponentActivity.java:304)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.fragment.app.FragmentActivity.<init>(FragmentActivity.java:108)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at io.flutter.embedding.android.FlutterFragmentActivity.<init>(FlutterFragmentActivity.java:65)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at net.myapp.app.MainActivity.<init>(MainActivity.kt:5)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at java.lang.Class.newInstance(Native Method)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.Instrumentation.newActivity(Instrumentation.java:1273)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.test.runner.MonitoringInstrumentation.newActivity(MonitoringInstrumentation.java:817)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3532)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Handler.dispatchMessage(Handler.java:106)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Looper.loopOnce(Looper.java:201)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Looper.loop(Looper.java:288)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.main(ActivityThread.java:7839)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at java.lang.reflect.Method.invoke(Native Method)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Deleting espresso session
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys activity services io.appium.settings/.recorder.RecorderService'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop net.myapp.dev'
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [EspressoDriver@9a25 (c5d1140b)] INSTRUMENTATION_CODE: 0
[EspressoDriver@9a25 (c5d1140b)] Instrumentation process exited with code 0 from signal null
[debug] [Logcat] Stopping logcat capture
[EspressoDriver@9a25 (c5d1140b)] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[debug] [ADB] Removing forwarded port socket connection: 8300
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8300'
[debug] [AppiumDriver@87ee] Event 'newSessionStarted' logged at 1672994847053 (10:47:27 GMT+0200 (Eastern European Standard Time))
[debug] [AppiumDriver@87ee] Encountered internal error running command: A new session could not be created. Details: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[debug] [AppiumDriver@87ee] UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[debug] [AppiumDriver@87ee]     at EspressoProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:342:13)
[debug] [AppiumDriver@87ee]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [AppiumDriver@87ee]     at EspressoRunner.startSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:312:5)
[debug] [AppiumDriver@87ee]     at EspressoDriver.startEspressoSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/driver.js:444:5)
[debug] [AppiumDriver@87ee]     at EspressoDriver.createSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/driver.js:224:7)
[debug] [AppiumDriver@87ee]     at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[HTTP] <-- POST /wd/hub/session 500 7432 ms - 1382
[HTTP]
```
<p>Any ideas? Thanks!</p>
<p>I have this in my build.gradle file:</p>
````testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test:monitor:1.6.1'`
```

Body:
I am trying to launch an automatic test with Appium and Espresso but get stuck with the error in the title at application start. I checked that I am using a debug apk and all other Espresso dependencies.
I am running Appium with Robot Framework and AppiumLibrary to start the app.

Below, the Appium logs

[Appium] Welcome to Appium v2.0.0-beta.48 (REV 6a7eac25e167a1eb2d49e13c8cc530a3188af995)
[Appium] Non-default server args:
[Appium] {
[Appium]   basePath: '/wd/hub'
[Appium] }
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] {
[Appium]   'appium:automationName': 'Espresso',
[Appium]   'appium:newCommandTimeout': 0,
[Appium]   'appium:deviceName': 'emulator-5554',
[Appium]   'appium:autoGrantPermissions': true
[Appium] }
[Appium] Attempting to load driver uiautomator2...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver xcuitest...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-xcuitest-driver
[Appium] Attempting to load driver espresso...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-espresso-driver
(node:22533) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[Appium] Available drivers:
[Appium]   - uiautomator2@2.12.1 (automationName 'UiAutomator2')
[Appium]   - xcuitest@4.16.3 (automationName 'XCUITest')
[Appium]   - espresso@2.13.9 (automationName 'Espresso')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[debug] [HTTP] Request idempotency key: 7b853c7e-f626-4307-bfe7-a3b18754139d
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:devicename":"emulator-5554","appium:appPackage":"net.myapp.dev","appium:appActivity":"net.myapp.app.MainActivity","appium:automationName":"Espresso","appium:noReset":"false"}}}
[debug] [AppiumDriver@87ee] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:devicename":"emulator-5554","appium:appPackage":"net.myapp.dev","appium:appActivity":"net.myapp.app.MainActivity","appium:automationName":"Espresso","appium:noReset":"false"}}]
[debug] [AppiumDriver@87ee] Event 'newSessionRequested' logged at 1672994839624 (10:47:19 GMT+0200 (Eastern European Standard Time))
[Appium] Attempting to find matching driver for automationName 'Espresso' and platformName 'Android'
[Appium] The 'espresso' driver was installed and matched caps.
[Appium] Will require it at /Users/liviuavram/.appium/node_modules/appium-espresso-driver
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-espresso-driver
[AppiumDriver@87ee] Appium v2.0.0-beta.48 creating new EspressoDriver (v2.13.9) session
[AppiumDriver@87ee] Checking BaseDriver versions for Appium and EspressoDriver
[AppiumDriver@87ee] Appium's BaseDriver version is 9.1.0
[AppiumDriver@87ee] EspressoDriver's BaseDriver version is 9.1.0
[debug] [EspressoDriver@9a25] Creating session with W3C capabilities: {
[debug] [EspressoDriver@9a25]   "alwaysMatch": {
[debug] [EspressoDriver@9a25]     "platformName": "Android",
[debug] [EspressoDriver@9a25]     "appium:devicename": "emulator-5554",
[debug] [EspressoDriver@9a25]     "appium:appPackage": "net.myapp.dev",
[debug] [EspressoDriver@9a25]     "appium:appActivity": "net.myapp.app.MainActivity",
[debug] [EspressoDriver@9a25]     "appium:automationName": "Espresso",
[debug] [EspressoDriver@9a25]     "appium:noReset": "false",
[debug] [EspressoDriver@9a25]     "appium:newCommandTimeout": 0,
[debug] [EspressoDriver@9a25]     "appium:deviceName": "emulator-5554",
[debug] [EspressoDriver@9a25]     "appium:autoGrantPermissions": true
[debug] [EspressoDriver@9a25]   },
[debug] [EspressoDriver@9a25]   "firstMatch": [
[debug] [EspressoDriver@9a25]     {}
[debug] [EspressoDriver@9a25]   ]
[debug] [EspressoDriver@9a25] }
[EspressoDriver@9a25] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[EspressoDriver@9a25] The following capabilities were provided, but are not recognized by Appium:
[EspressoDriver@9a25]   devicename
[EspressoDriver@9a25 (c5d1140b)] Session created with session id: c5d1140b-a77a-43a2-9820-03f48d574e5f
[ADB] Found 3 'build-tools' folders under '/Users/liviuavram/Library/Android/sdk' (newest first):
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/33.0.0
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/Users/liviuavram/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb' from '/Users/liviuavram/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to emulator-5554
[EspressoDriver@9a25 (c5d1140b)] App file was not listed, instead we're going to run net.myapp.dev directly on the device
[debug] [ADB] Getting install status for net.myapp.dev
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] 'net.myapp.dev' is installed
[EspressoDriver@9a25 (c5d1140b)] EspressoDriver version: 2.13.9
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 31
[ADB] Getting device platform version
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 12
[debug] [ADB] Device API level: 31
[EspressoDriver@9a25 (c5d1140b)] Relaxing hidden api policy
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('5.0.0' >= '5.0.0')
[debug] [ADB] There is no need to install/upgrade '/Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [Logcat] Starting logs capture with command: /Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global animator_duration_scale'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global transition_animation_scale'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global window_animation_scale'
[debug] [EspressoDriver@9a25 (c5d1140b)] Forwarding Espresso Server port 6791 to 8300
[debug] [ADB] Forwarding system: 8300 to device: 6791
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8300 tcp:6791'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [EspressoDriver@9a25 (c5d1140b)] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for net.myapp.dev
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] 'net.myapp.dev' is installed
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop net.myapp.dev'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear net.myapp.dev'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] Retrieving requested permissions
[debug] [ADB] Retrieved 20 permissions from requested group
[debug] [ADB] Retrieving granted permissions
[debug] [ADB] Retrieved 10 permissions from install,runtime groups
[debug] [ADB] Granting permissions ["android.permission.READ_EXTERNAL_STORAGE","android.permission.WRITE_EXTERNAL_STORAGE","android.permission.ACCESS_FINE_LOCATION","android.permission.CAMERA","android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE","android.launcher.permission.CHANGE_BADGE","android.launcher.permission.READ_SETTINGS","android.launcher.permission.WRITE_SETTINGS","android.permission.READ_APP_BADGE","android.permission.ACCESS_COARSE_LOCATION"] to 'net.myapp.dev'
[debug] [ADB] Got the following command chunks to execute: [["pm","grant","net.myapp.dev","android.permission.READ_EXTERNAL_STORAGE",";","pm","grant","net.myapp.dev","android.permission.WRITE_EXTERNAL_STORAGE",";","pm","grant","net.myapp.dev","android.permission.ACCESS_FINE_LOCATION",";","pm","grant","net.myapp.dev","android.permission.CAMERA",";","pm","grant","net.myapp.dev","android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE",";","pm","grant","net.myapp.dev","android.launcher.permission.CHANGE_BADGE",";","pm","grant","net.myapp.dev","android.launcher.permission.READ_SETTINGS",";","pm","grant","net.myapp.dev","android.launcher.permission.WRITE_SETTINGS",";","pm","grant","net.myapp.dev","android.permission.READ_APP_BADGE",";","pm","grant","net.myapp.dev","android.permission.ACCESS_COARSE_LOCATION",";"]]
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm grant net.myapp.dev android.permission.READ_EXTERNAL_STORAGE ; pm grant net.myapp.dev android.permission.WRITE_EXTERNAL_STORAGE ; pm grant net.myapp.dev android.permission.ACCESS_FINE_LOCATION ; pm grant net.myapp.dev android.permission.CAMERA ; pm grant net.myapp.dev android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE ; pm grant net.myapp.dev android.launcher.permission.CHANGE_BADGE ; pm grant net.myapp.dev android.launcher.permission.READ_SETTINGS ; pm grant net.myapp.dev android.launcher.permission.WRITE_SETTINGS ; pm grant net.myapp.dev android.permission.READ_APP_BADGE ; pm grant net.myapp.dev android.permission.ACCESS_COARSE_LOCATION ;'
[debug] [AndroidDriver] Performed fast reset on the installed 'net.myapp.dev' application (stop and clear)
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell "[ -e '/data/local/tmp/espresso.apppackage' ] && echo __PASS__"'
[debug] [EspressoDriver@9a25 (c5d1140b)] The previous target application package is unknown
[EspressoDriver@9a25 (c5d1140b)] Forcing Espresso server rebuild because of changed application package
[debug] [EspressoDriver@9a25 (c5d1140b)] Deleting the obsolete Espresso server package '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[EspressoDriver@9a25 (c5d1140b)] Building espresso server in '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554'
[debug] [EspressoDriver@9a25 (c5d1140b)] The build folder root could be customized by changing the 'tmpDir' capability
[debug] [EspressoDriver@9a25 (c5d1140b)] Copying espresso server template from ('/Users/liviuavram/.appium/node_modules/appium-espresso-driver/espresso-server' to '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554')
[debug] [Support] Traversed 52 directories and 281 files in 104ms
[debug] [EspressoDriver@9a25 (c5d1140b)] Bulding espresso server
[debug] [EspressoDriver@9a25 (c5d1140b)] Beginning build with command '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554/gradlew -PappiumTargetPackage=net.myapp.dev app:assembleAndroidTest' in directory '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554'
[debug] [EspressoDriver@9a25 (c5d1140b)] Output from Gradle will not be logged. To change this, use 'showGradleLog' desired capability
[debug] [EspressoDriver@9a25 (c5d1140b)] Copying built apk from '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk' to '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[debug] [ADB] Checking app cert for /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[ADB] Using 'apksigner.jar' from '/Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar'
[debug] [ADB] Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar verify --print-certs /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
[debug] [ADB] Signer #1 certificate SHA-256 digest: fe82fd29c451bf64a764faaa86634a05981f71ffcd92b882ed6545d2acdffe82
[debug] [ADB] Signer #1 certificate SHA-1 digest: adfec47da6d9a2ebeb0eebd2a483e44496b8fdc2
[debug] [ADB] Signer #1 certificate MD5 digest: 056c1cb0adccefb201a142db5d3fd9ec
[debug] [ADB]
[ADB] '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is signed with a non-default certificate
[ADB] Using 'zipalign' from '/Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/zipalign'
[debug] [ADB] /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is already zip-aligned. Doing nothing
[debug] [ADB] Signing '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' with default cert
[debug] [ADB] Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar sign --key /Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.pk8 --cert /Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.x509.pem /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[debug] [ADB] Uninstalling io.appium.espressoserver.test
[debug] [ADB] Getting install status for io.appium.espressoserver.test
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.espressoserver.test'
[debug] [ADB] 'io.appium.espressoserver.test' is installed
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.espressoserver.test'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 uninstall io.appium.espressoserver.test'
[debug] [ADB] 'adb uninstall io.appium.espressoserver.test' command output: Success
[ADB] io.appium.espressoserver.test was successfully uninstalled
[EspressoDriver@9a25 (c5d1140b)] Uninstalled the obsolete Espresso server package from the device under test
[debug] [ADB] Getting install status for io.appium.espressoserver.test
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.espressoserver.test'
[debug] [ADB] 'io.appium.espressoserver.test' is not installed
[debug] [ADB] App '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is not installed
[EspressoDriver@9a25 (c5d1140b)] Installing Espresso Test Server apk from the target device (path: '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk')
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 help'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 features'
[ADB] The application at '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[ADB] The installation of 'io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' took 164ms
[debug] [ADB] Install command stdout: Serving...
[debug] [ADB] Performing Incremental Install
[debug] [ADB] Success
[debug] [ADB] Install command complete in 146 ms
[EspressoDriver@9a25 (c5d1140b)] Installed Espresso Test Server apk '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' (pkg: 'io.appium.espressoserver.test')
[ADB] Adding packages ["io.appium.settings","io.appium.espressoserver.test"] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.espressoserver.test",";"]]
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.espressoserver.test ;'
[debug] [EspressoDriver@9a25 (c5d1140b)] Performing cleanup of automation leftovers
[debug] [EspressoDriver@9a25 (c5d1140b)] No obsolete sessions have been detected (socket hang up)
[EspressoDriver@9a25 (c5d1140b)] Starting Espresso Server v2.13.9 with cmd: adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","-e","debug",false,"-e","disableAnalytics",true,"io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[EspressoDriver@9a25 (c5d1140b)] Waiting up to 45000ms for Espresso server to be online
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] io.appium.espressoserver.EspressoServerRunnerTest:
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[debug] [EspressoDriver@9a25 (c5d1140b)] Got response with status 200: {"id":"ea635626-6eda-40c6-b5a4-ea3cf80a86c9","sessionId":null,"value":null}
[EspressoDriver@9a25 (c5d1140b)] Espresso server is online. The initialization process took 1531ms
[EspressoDriver@9a25 (c5d1140b)] Starting the session
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/session' to command name 'createSession'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [POST /session] to [POST http://127.0.0.1:8300/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","devicename":"emulator-5554","appPackage":"net.myapp.dev","appActivity":"net.myapp.app.MainActivity","automationName":"Espresso","noReset":false,"newCommandTimeout":0,"deviceName":"emulator-5554","autoGrantPermissions":true},"platformName":"Android","devicename":"emulator-5554","appPackage":"net.myapp.dev","appActivity":"net.myapp.app.MainActivity","automationName":"Espresso","noReset":false,"newCommandTimeout":0,"deviceName":"emulator-5554","autoGrantPermissions":true,"deviceUDID":"emulator-5554","appWaitPackage":"net.myapp.dev","appWaitActivity":"net.myapp.app.MainActivity"}],"alwaysMatch":{}}}
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] Process crashed while executing startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest):
[debug] [EspressoDriver@9a25 (c5d1140b)] java.lang.NoSuchMethodError: No virtual method performAttach()V in class Landroidx/savedstate/SavedStateRegistryController; or its super classes (declaration of 'androidx.savedstate.SavedStateRegistryController' appears in /data/app/~~-_XPaemZoOsaDyP5dvs3Vg==/io.appium.espressoserver.test-QsWDOBl2RUq8qZlMBH_E5w==/base.apk)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.activity.ComponentActivity.<init>(ComponentActivity.java:304)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.fragment.app.FragmentActivity.<init>(FragmentActivity.java:108)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at io.flutter.embedding.android.FlutterFragmentActivity.<init>(FlutterFragmentActivity.java:65)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at net.myapp.app.MainActivity.<init>(MainActivity.kt:5)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at java.lang.Class.newInstance(Native Method)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.Instrumentation.newActivity(Instrumentation.java:1273)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.test.runner.MonitoringInstrumentation.newActivity(MonitoringInstrumentation.java:817)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3532)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Handler.dispatchMessage(Handler.java:106)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Looper.loopOnce(Looper.java:201)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Looper.loop(Looper.java:288)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.main(ActivityThread.java:7839)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at java.lang.reflect.Method.invoke(Native Method)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Deleting espresso session
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys activity services io.appium.settings/.recorder.RecorderService'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop net.myapp.dev'
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [EspressoDriver@9a25 (c5d1140b)] INSTRUMENTATION_CODE: 0
[EspressoDriver@9a25 (c5d1140b)] Instrumentation process exited with code 0 from signal null
[debug] [Logcat] Stopping logcat capture
[EspressoDriver@9a25 (c5d1140b)] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[debug] [ADB] Removing forwarded port socket connection: 8300
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8300'
[debug] [AppiumDriver@87ee] Event 'newSessionStarted' logged at 1672994847053 (10:47:27 GMT+0200 (Eastern European Standard Time))
[debug] [AppiumDriver@87ee] Encountered internal error running command: A new session could not be created. Details: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[debug] [AppiumDriver@87ee] UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[debug] [AppiumDriver@87ee]     at EspressoProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:342:13)
[debug] [AppiumDriver@87ee]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [AppiumDriver@87ee]     at EspressoRunner.startSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:312:5)
[debug] [AppiumDriver@87ee]     at EspressoDriver.startEspressoSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/driver.js:444:5)
[debug] [AppiumDriver@87ee]     at EspressoDriver.createSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/driver.js:224:7)
[debug] [AppiumDriver@87ee]     at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[HTTP] <-- POST /wd/hub/session 500 7432 ms - 1382
[HTTP]

Any ideas? Thanks!

I have this in my build.gradle file:

`testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test:monitor:1.6.1'`


来源: stackexchange

问:
Can I move a Transporter directly inside a Cell in a storage Block?
I used the MoveByTransporter block of the Material handling Library. My goal is that I have a bucket (Agent) at a "Beginning Node" and it gets Transportet by an AGV inside a Storage Cell. I realised that when I let the Model run, the bucket gets Transportet to the upper Corner of the Storage(Node) and after that inside a Free Cell of the Storage.
The moveByTransporter Block has the Option to set a Destination. I thought about setting the destination to (x, y, z) and set for example the x-coordinate to Storage.getFreeCell().getX() something like that. But I have no idea if that works.
Does somebody have an Idea how I can Transport an Agent (Bucket) directly inside a Cell of a Storge by a AGV?

I tried to set the Destination of the AGV to (x, y, z) coordinates to a free Cell of the Storage like x = Storage.getFreeCell().getX()

ContentLicense: CC BY-SA 4.0


问:
How to hide dialog by checkbox?
How to hide the dialog box if the checkbox checked? i dont know how to do

This is my dialog method

I tried to hide dialog box permanently by shared preference. But not working (my fault). So please give me the whole function

Title: How to hide dialog by checkbox?


问:
BigQuery "error Script exceeded timeout limit"
Reading on https://cloud.google.com/bigquery/quotas I see that the cumulative time limit for a multi-statement query is 24 hours.
I have a stored procedure that exceed 24 hours because it calls other stored procedures to process a large set of data for a wide time period. The time period is every week for a 5-year span. Each week it processes several terabytes of data.

After 24 hours I get error Script exceeded timeout limit.
When the procedure fails because of the timeout error, I have a log table that tells identifies the last week_id that was ran and I restart the process from that week.

To get around the timeout error, I can call the stored procedure with a code like this:

```<code>DECLARE begin_week_id INT64;
DECLARE end_week_id INT64;

SET begin_week_id = 1;
SET end_week_id  = 110;

BEGIN
CALL dev.process_data(begin_week_id, end_week_id);
EXCEPTION WHEN ERROR
THEN SET begin_week_id = (SELECT max(week_id) from dev.process_week_log);
CALL dev.process_data(begin_week_id, end_week_id);
END IF;
CALL dev.process_data(begin_week_id, end_week_id);
EXCEPTION WHEN ERROR
THEN SET begin_week_id = (SELECT max(week_id) from dev.process_week_log);
CALL dev.process_data(begin_week_id, end_week_id);
END IF;
CALL dev.process_data(begin_week_id, end_week_id);
EXCEPTION WHEN ERROR
THEN SET begin_week_id = (SELECT max(week_id) from dev.process_week_log);
CALL dev.process_data(begin_week_id, end_week_id);
END IF;
CALL dev.process_data(begin_week_id, end_week_id);
EXCEPTION WHEN ERROR
THEN SET begin_week_id = (SELECT max(week_id) from dev.process_week_log);
CALL dev.process_data(begin_week_id, end_week_id);
END IF;
END;
</code>```

The problem with this is, if I put the EXCEPTION WHEN ERROR in the stored procedure however, I would still get the timeout error.
It's only when I run the EXCEPTION WHEN ERROR with the call/invoke/exec that it works.

This is not ideal because at the end of the day, I would like this to be fully automated and not require to be executed with EXCEPTION WHEN ERROR outside of the stored procedure. I will have to pass this process on to a coworker in the future and I'd prefer that it would be more seamless.

Is there a better way to get around the timeout error in BigQuery? Any help is appreciated. Thank you.

Body:
Reading on https://cloud.google.com/bigquery/quotas I see that the cumulative time limit for a multi-statement query is 24 hours.
I have a stored procedure that exceed 24 hours because it calls other stored procedures to process a large set of data for a wide time period. The time period is every week for a 5-year span. Each week it processes several terabytes of data.

After 24 hours I get error Script exceeded timeout limit.
When the procedure fails because of the timeout error, I have a log table that tells identifies the last week_id that was ran and I restart the process from that week.

To get around the timeout error, I can call the stored procedure with a code like this:

DECLARE begin_week_id INT64;
DECLARE end_week_id INT64;

SET begin_week_id = 1;
SET end_week_id  = 110;

BEGIN
CALL dev.process_data(begin_week_id, end_week_id);
EXCEPTION WHEN ERROR
THEN SET begin_week_id = (SELECT max(week_id) from dev.process_week_log);
CALL dev.process_data(begin_week_id, end_week_id);
END IF;
CALL dev.process_data(begin_week_id, end_week_id);
EXCEPTION WHEN ERROR
THEN SET begin_week_id = (SELECT max(week_id) from dev.process_week_log);
CALL dev.process_data(begin_week_id, end_week_id);
END IF;
CALL dev.process_data(begin_week_id, end_week_id);
EXCEPTION WHEN ERROR
THEN SET begin_week_id = (SELECT max(week_id) from dev.process_week_log);
CALL dev.process_data(begin_week_id, end_week_id);
END IF;
CALL dev.process_data(begin_week_id, end_week_id);
EXCEPTION WHEN ERROR
THEN SET begin_week_id = (SELECT max(week_id) from dev.process_week_log);
CALL dev.process_data(begin_week_id, end_week_id);
END IF;
END;

The problem with this is, if I put the EXCEPTION WHEN ERROR in the stored procedure however, I would still get the timeout error.
It's only when I run the EXCEPTION WHEN ERROR with the call/invoke/exec that it works.

This is not ideal because at the end of the day, I would like this to be fully automated and not require to be executed with EXCEPTION WHEN ERROR outside of the stored procedure. I will have to pass this process on to a coworker in the future and I'd prefer that it would be more seamless.

Is there a better way to get around the timeout error in BigQuery? Any help is appreciated. Thank you.


问:
GameAnalytics metric api curl post example
```<code> function getData()
    {
        $ch = curl_init();
        $url = 'https://metrics.gameanalytics.com/metrics/v1/metrics/ad_impressions_per_user?';
        $key = 'myapikeyhere';
        $fields =  array(
            "granularity" => "day",
            "interval" => "2022-10-21T04:00:00.000Z/2022-11-21T04:00:00.000Z",
            "query" => array(
                "dimension" => "ad_type",
                "limit" => 3,
                "type" => "group"
            )
        );
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'Accept: application/json',
            'Accept-Encoding: gzip, deflate',
            'Connection: close',
            'Host: metrics.gameanalytics.com',
            'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36',
            "X-API-Key: $key",
        )); //you can specify multiple custom keys.

        $result = curl_exec($ch);
        curl_close($ch);
        print_r(json_decode($result));
    }
</code>```

` its my code i always getting (415 Unsupported Media Type). i need solution or some example

gameanalytics metric api using curl php.`

Body:
 function getData()
    {
        $ch = curl_init();
        $url = 'https://metrics.gameanalytics.com/metrics/v1/metrics/ad_impressions_per_user?';
        $key = 'myapikeyhere';
        $fields =  array(
            "granularity" => "day",
            "interval" => "2022-10-21T04:00:00.000Z/2022-11-21T04:00:00.000Z",
            "query" => array(
                "dimension" => "ad_type",
                "limit" => 3,
                "type" => "group"
            )
        );
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'Accept: application/json',
            'Accept-Encoding: gzip, deflate',
            'Connection: close',
            'Host: metrics.gameanalytics.com',
            'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36',
            "X-API-Key: $key",
        )); //you can specify multiple custom keys.

        $result = curl_exec($ch);
        curl_close($ch);
        print_r(json_decode($result));
    }

` its my code i always getting (415 Unsupported Media Type). i need solution or some example

gameanalytics metric api using curl php.`


问:
updating mongo db conversation model user last message and createdAt
const ConversationSchema = new mongoose.Schema( { members: { type: Array, }, members: { type: Array, lastMessage: { type:String, default: "" }, text: {type: String, default: ""} }, }, { timestamps: true } );

module.exports = mongoose.model("Conversation", ConversationSchema);`

const MessageSchema = new mongoose.Schema( { conversationId: { type: String, }, sender: { type: String, }, text: { type: String, }, }, { timestamps: true } );

module.exports = mongoose.model("Message", MessageSchema);`

router.post("/", async (req, res) => {   const newMessage = new Message(req.body)   try {     const savedMessage = await newMessage.save();     res.status(200).json(savedMessage);   } catch (err) {     res.status(500).json(err);   } });

I am developing whatsapp web clone app with react and express js I have 3 mongo db model one is user, message and conversation. I want to update in conversation model last message array which is include text and time field depending on last message of user. Message model conversationId and conversation model ObjectId are matching each other.

I tried new req which aggregation I filter and get res of each conversations last messages however I should push those datas to my conversation model exact fields.


问:
React Native Expo - Notifying reachability change is false for android, true for iOS
In my React Native Expo project, I am fetching data using DataStore.Query to my amplify backend.

For iOS, I get:

```<code>iOS Bundling complete 125ms
 LOG  [INFO] 53:57.609 Reachability - subscribing to reachability in React Native
 LOG  [INFO] 53:58.504 Reachability - Notifying reachability change true
</code>```

However for Android, I get:

```<code>Android Bundling complete 129ms
 LOG  [INFO] 53:58.358 Reachability - subscribing to reachability in React Native
 LOG  [INFO] 53:58.380 Reachability - Notifying reachability change false
</code>```

Because it is false, I fail to fetch any data from the backend. (For android, works fine for ios).

Anyone had a similar issue?

Body:
In my React Native Expo project, I am fetching data using DataStore.Query to my amplify backend.

For iOS, I get:

iOS Bundling complete 125ms
 LOG  [INFO] 53:57.609 Reachability - subscribing to reachability in React Native
 LOG  [INFO] 53:58.504 Reachability - Notifying reachability change true

However for Android, I get:

Android Bundling complete 129ms
 LOG  [INFO] 53:58.358 Reachability - subscribing to reachability in React Native
 LOG  [INFO] 53:58.380 Reachability - Notifying reachability change false

Because it is false, I fail to fetch any data from the backend. (For android, works fine for ios).

Anyone had a similar issue?


问:
How to optimize Go Confluent Kafka consumer to catch up 500 millions lagging messages?
I have a Kafka topic with 12 partitions, and that topic is received transaction messages from the frontend system all day long.
And currently I have an ETL application to consume the messages on that topic by using default github.com/confluentinc/confluent-kafka-go/kafka.
This ETL is deployed into 12 pods of Kubernetes, so each pod will specifically consume on each partition.

The consumer configuration is:

```<code>`consumer, err := kafka.NewConsumer(&kafka.ConfigMap{
"bootstrap.servers":  config.CONFIG["KAFKA_SERVERS"],
"sasl.username":      config.CONFIG["KAFKA_USER"],
"sasl.password":      config.CONFIG["KAFKA_PASSWORD"],
"group.id":           config.CONFIG["KAFKA_CONSUMER_GROUP"],
"session.timeout.ms": 300000,
"auto.offset.reset":  "latest",
"security.protocol":  "SASL_SSL",
"sasl.mechanism":     "PLAIN",

// Consumer Tuning
"fetch.min.bytes":         1,
"max.poll.interval.ms":    300000,
"auto.commit.interval.ms": 10000,
"heartbeat.interval.ms":   100000,
})`
</code>```

But my ETL application runs unproperly in last 1-2 weeks, and the messages have lagged approx. 500.000.000 records. with the production speed from the front application, and my ETL's consumption speed, the lag is still happen and not catch up.

What can I do to speed up the consumer to decrease the lagging number?

Please don't hesitate to comment if anything in my question is unclear.

I have optimized the code, but lagging still massively happen. and I expect to get an insight what best Go consumer code to decrease this lagging.

Body:
I have a Kafka topic with 12 partitions, and that topic is received transaction messages from the frontend system all day long.
And currently I have an ETL application to consume the messages on that topic by using default github.com/confluentinc/confluent-kafka-go/kafka.
This ETL is deployed into 12 pods of Kubernetes, so each pod will specifically consume on each partition.

The consumer configuration is:

`consumer, err := kafka.NewConsumer(&kafka.ConfigMap{
"bootstrap.servers":  config.CONFIG["KAFKA_SERVERS"],
"sasl.username":      config.CONFIG["KAFKA_USER"],
"sasl.password":      config.CONFIG["KAFKA_PASSWORD"],
"group.id":           config.CONFIG["KAFKA_CONSUMER_GROUP"],
"session.timeout.ms": 300000,
"auto.offset.reset":  "latest",
"security.protocol":  "SASL_SSL",
"sasl.mechanism":     "PLAIN",

// Consumer Tuning
"fetch.min.bytes":         1,
"max.poll.interval.ms":    300000,
"auto.commit.interval.ms": 10000,
"heartbeat.interval.ms":   100000,
})`

But my ETL application runs unproperly in last 1-2 weeks, and the messages have lagged approx. 500.000.000 records. with the production speed from the front application, and my ETL's consumption speed, the lag is still happen and not catch up.

What can I do to speed up the consumer to decrease the lagging number?

Please don't hesitate to comment if anything in my question is unclear.

I have optimized the code, but lagging still massively happen. and I expect to get an insight what best Go consumer code to decrease this lagging.


问:
I have a problem that "@IsNotEmpty" in Dto does not check empty
I am building a project using NestJs. I have a problem that "@IsNotEmpty" in Dto does not check empty. The checking is only performed because {require: true} in the schema. Please help me with this case. Thank you!

Here is my code:

import { IsNotEmpty, IsString } from 'class-validator';

export class AddCommentDto {
    @IsNotEmpty()
    @IsString()
    comment: string

    @IsNotEmpty()
    @IsString()
    walletId: string

    @IsString()
    replyCommentId: string
}

//Schema
@Schema({
    timestamps: true,
})
export class UserComment extends Document {
    @Prop({
        required: true
    })
    walletId: string;

    @Prop({
    })
    replyCommentId: string;

    @Prop({
        require: true
    })
    comment: string;
}
```

An explanation for this case.

Body:
I am building a project using NestJs. I have a problem that "@IsNotEmpty" in Dto does not check empty. The checking is only performed because {require: true} in the schema. Please help me with this case. Thank you!

Here is my code:

import { IsNotEmpty, IsString } from 'class-validator';

export class AddCommentDto {
    @IsNotEmpty()
    @IsString()
    comment: string

    @IsNotEmpty()
    @IsString()
    walletId: string

    @IsString()
    replyCommentId: string
}

//Schema
@Schema({
    timestamps: true,
})
export class UserComment extends Document {
    @Prop({
        required: true
    })
    walletId: string;

    @Prop({
    })
    replyCommentId: string;

    @Prop({
        require: true
    })
    comment: string;
}

An explanation for this case.


问:
Python negative loss while training convolutional autoencoder
I am training a convolutional autoencoder with in a csv file as input. After some epochs, the loss value becomes negative. I did not normalize my data because I consider them between 0 and 1 and my loss function is binary_crossentropy.

The csv file represents the pixel position of an image and his structure is as follow:

```<code>0 0 1.875223e+01
1 0 1.875223e+01
2 0 2.637685e+01
3 0 2.637685e+01
4 0 2.637685e+01
5 0 2.637685e+01
6 0 2.637685e+01
7 0 2.637685e+01
8 0 2.637685e+01
9 0 1.875223e+01
10 0 1.112761e+01
</code>```

After loading my dataset, I extract the x, y, and value columns as NumPy arrays and extract the relevant columns as NumPy arrays.

```<code>x = data[0].values
y = data[1].values
values = data[2].values
</code>```

Then, I create an empty image with the correct dimensions and fill in the image with the pixel values
image = np.empty((1024, 1024))

```<code>for i, (xi, yi, value) in enumerate(zip(x, y, values)):
    image[xi.astype(int), yi.astype(int)] = value

# Reshape the image array to a 4D tensor
image = image.reshape((1, image.shape[0], image.shape[1], 1))
</code>```

I defined the architecture of my convolutional autoencoder as the following:

```<code>import keras
from keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D
from keras.models import Model

# Define the input layer
input_layer = Input(shape=(1,image.shape[1], image.shape[2], 1))

# Define the encoder layers
x = Conv2D(16, (3, 3), activation='relu', padding='same')(input_layer)
x = MaxPooling2D((2, 2), padding='same')(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
x = MaxPooling2D((2, 2), padding='same')(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
encoded = MaxPooling2D((2, 2), padding='same')(x)

# Define the decoder layers
x = Conv2D(8, (3, 3), activation='relu', padding='same')(encoded)
x = UpSampling2D((2, 2))(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
x = UpSampling2D((2, 2))(x)
x = Conv2D(16, (3, 3), activation='relu')(x)
x = UpSampling2D((2, 2))(x)
decoded = Conv2D(1, (3, 3), activation='sigmoid', padding='same')(x)

# Define the autoencoder model
autoencoder = Model(input_layer, decoded)

# Compile the model
autoencoder.compile(optimizer='adam', loss='binary_crossentropy')
</code>```

Do you have any idea why the loss is negative ?

Body:
I am training a convolutional autoencoder with in a csv file as input. After some epochs, the loss value becomes negative. I did not normalize my data because I consider them between 0 and 1 and my loss function is binary_crossentropy.

The csv file represents the pixel position of an image and his structure is as follow:

0 0 1.875223e+01
1 0 1.875223e+01
2 0 2.637685e+01
3 0 2.637685e+01
4 0 2.637685e+01
5 0 2.637685e+01
6 0 2.637685e+01
7 0 2.637685e+01
8 0 2.637685e+01
9 0 1.875223e+01
10 0 1.112761e+01

After loading my dataset, I extract the x, y, and value columns as NumPy arrays and extract the relevant columns as NumPy arrays.

x = data[0].values
y = data[1].values
values = data[2].values

Then, I create an empty image with the correct dimensions and fill in the image with the pixel values
image = np.empty((1024, 1024))

for i, (xi, yi, value) in enumerate(zip(x, y, values)):
    image[xi.astype(int), yi.astype(int)] = value

# Reshape the image array to a 4D tensor
image = image.reshape((1, image.shape[0], image.shape[1], 1))

I defined the architecture of my convolutional autoencoder as the following:

import keras
from keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D
from keras.models import Model

# Define the input layer
input_layer = Input(shape=(1,image.shape[1], image.shape[2], 1))

# Define the encoder layers
x = Conv2D(16, (3, 3), activation='relu', padding='same')(input_layer)
x = MaxPooling2D((2, 2), padding='same')(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
x = MaxPooling2D((2, 2), padding='same')(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
encoded = MaxPooling2D((2, 2), padding='same')(x)

# Define the decoder layers
x = Conv2D(8, (3, 3), activation='relu', padding='same')(encoded)
x = UpSampling2D((2, 2))(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
x = UpSampling2D((2, 2))(x)
x = Conv2D(16, (3, 3), activation='relu')(x)
x = UpSampling2D((2, 2))(x)
decoded = Conv2D(1, (3, 3), activation='sigmoid', padding='same')(x)

# Define the autoencoder model
autoencoder = Model(input_layer, decoded)

# Compile the model
autoencoder.compile(optimizer='adam', loss='binary_crossentropy')

Do you have any idea why the loss is negative ?


问:
How do I create a workflow model file (.wfm) from the workflow diagram in eworms
I am working in a project that involves RCP and eworms. I have a workflow diagram which I created with the required inputs and outputs. Now, I am not being able to figure out how to create the model file.

Below is the screenshot of the workflow file that I have and where I am willing to create the model for this workflow-

Below is the screenshot of a similar workflow created by a different person and has a model for the same -

I have tried to create a model from File -> New. But as it seems, I can only create Ecore models and I want to create a workflow model.


问:
Get type of class by string-Name and create an instance of it
I have the name of class ex:"Car" saved as string, now i want to create an instance of it!
i think i have to get the type of it first, not sure!

Type.GetType() does not get the type with class name as input, even if it does how to create an instance of it next?


问:
OpenCV shows white screen when using cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
I'm using the following lines of code to set the image to fullscreen:

```<code>cv2.namedWindow("Image", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
</code>```

The screen that opens is this.

However, when I commented out cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN), the image is shown. How do I fix this?

EDIT:
Full code:

```<code>import cv2
cap = cv2.VideoCapture(0)

cv2.namedWindow("Image", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

while cap.isOpened():
    success, image = cap.read()

    cv2.imshow("Image", image)

    if cv2.waitKey(5) & 0xFF == 27:
      break

cv2.destroyAllWindows()
cap.release()
</code>```

EDIT: The version of opencv-python that I'm using is 4.7.0.68

EDIT: Code for reading image

```<code>import cv2

img = cv2.imread('path/to/image')
cv2.namedWindow("Image", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

cv2.imshow("Image", img)
cv2.waitKey(0)
</code>```

Body:
I'm using the following lines of code to set the image to fullscreen:

cv2.namedWindow("Image", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

The screen that opens is this.

However, when I commented out cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN), the image is shown. How do I fix this?

EDIT:
Full code:

import cv2
cap = cv2.VideoCapture(0)

cv2.namedWindow("Image", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

while cap.isOpened():
    success, image = cap.read()

    cv2.imshow("Image", image)

    if cv2.waitKey(5) & 0xFF == 27:
      break

cv2.destroyAllWindows()
cap.release()

EDIT: The version of opencv-python that I'm using is 4.7.0.68

EDIT: Code for reading image

import cv2

img = cv2.imread('path/to/image')
cv2.namedWindow("Image", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

cv2.imshow("Image", img)
cv2.waitKey(0)


问:
Power Apps - Error code 20143 when trying to retireve sections in OneNote Notebook
When using 'OneNote(Business)'.GetSectionsInNotebook() in Power Apps, one Notebook returns the error:

```<code>Error; unknown error code encountered when attempting to retrieve
notebook details. Code: 20143
</code>```

The Notebook key comes directly from OneNote(Business).GetNotebooks().

All other Notebooks works fine.

Where can I start my troubleshooting?

I don't have access to the Azure OneNote Logs

PowerApps Monitor shows nothing more than the error posted

Body:
When using 'OneNote(Business)'.GetSectionsInNotebook() in Power Apps, one Notebook returns the error:

Error; unknown error code encountered when attempting to retrieve
notebook details. Code: 20143

The Notebook key comes directly from OneNote(Business).GetNotebooks().

All other Notebooks works fine.

Where can I start my troubleshooting?

I don't have access to the Azure OneNote Logs

PowerApps Monitor shows nothing more than the error posted


问:
SilentFlow not using CachePlugin in msal-node
I have implemented msal-node, and are able to fetch tokens and authenticated as expected. I am using the DistributedCachePlugin with my own implementation of ICacheClient and IPartitionManager.

```<code>cache: {
   cachePlugin: new DistributedCachePlugin(new MsalSessionCacheClient(session), new SessionPartitionManager(session)),
}
</code>```

When running 'acquireTokenByCode' i see the cacheplugin is used and the data is stored as expected.

If i try to use 'acquireTokenSilent' after the cache has been set i would expect it to read the values from the cache and return the access token or renew with the refreshtoken, instead it fails with error:

SilentRenew Failed:  InteractionRequiredAuthError: no_tokens_found: No refresh token found in the cache. Please sign-in.

So my conclution is that it does not use the cache plugin as expected, i have added logging in CacheClient and PartitionManager. Does get triggered during 'acquireTokenByCode', but not during 'acquireTokenSilent'.

Body:
I have implemented msal-node, and are able to fetch tokens and authenticated as expected. I am using the DistributedCachePlugin with my own implementation of ICacheClient and IPartitionManager.

cache: {
   cachePlugin: new DistributedCachePlugin(new MsalSessionCacheClient(session), new SessionPartitionManager(session)),
}

When running 'acquireTokenByCode' i see the cacheplugin is used and the data is stored as expected.

If i try to use 'acquireTokenSilent' after the cache has been set i would expect it to read the values from the cache and return the access token or renew with the refreshtoken, instead it fails with error:

SilentRenew Failed:  InteractionRequiredAuthError: no_tokens_found: No refresh token found in the cache. Please sign-in.

So my conclution is that it does not use the cache plugin as expected, i have added logging in CacheClient and PartitionManager. Does get triggered during 'acquireTokenByCode', but not during 'acquireTokenSilent'.


问:
DB2 has a default Database named "sample", when I am trying to run command connect to sample, it is not able to connect
DB2 has a default Database named "sample", when I am trying to run command "CONNECT TO SAMPLE", it is saying "SQL1013N  The database alias name or database name "SAMPLE" could not be found.  SQLSTATE=42705" in command line.

enter image description here

I am trying to run command "CONNECT TO SAMPLE", it is saying "SQL1013N  The database alias name or database name "SAMPLE" could not be found.  SQLSTATE=42705" in command line. I was expecting it to connect to the default database named "SAMPLE"


问:
Exclude multiple tests with dotnet test --filter command
I am trying to exclude 2 name space from tests. I have try planty of option. but without result.

dotnet test --filter "not(FullyQualifiedName~TribesTests.EntitiesTest.BuildingTest) | (FullyQualifiedName~TribesTests.EndpointsTest)"

I have try
dotnet test --filter "not(FullyQualifiedName~TribesTests.EntitiesTest.BuildingTest) | (FullyQualifiedName~TribesTests.EndpointsTest)"

dotnet test --filter "FullyQualifiedName!~TribesTests.EntitiesTest.BuildingTest | FullyQualifiedName!~TribesTests.EndpointsTest"

and many of another try


问:
Combining two sheets in excel and producing single sheet
enter image description here
enter image description here

How can I achieve this?

Currently pretty new to excel functions so had no idea on how to do this.


问:
Delete multiple collections in one command
I use MongoDB driver (C#) and kinda new with it. Is there any way or best practices to delete multiple collections in one db by one command ?
I have a lot of collections and they’re not needed anymore so I looking the way to delete many collections but without dropping all db in general ( because there’s some collections that I still need ) .

Found DeleteMany but that can be applied to collection, in my case I need something like that but what can be applied to db .


问:
How to use a single IAM role to deploy resources in multiple accounts using CDK CLI
Is it possible to use a single IAM role (which can access another role) to deploy resources with environment variables CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION?
For example: Below is a piece of code from Jenkinsfile , which uses a role to deploy resources in the account of which it a part.

```<code>script
{
  withCredentials([string(credentialsId: "sample-role-arn", variable: 'ARN'), string(credentialsId: "sample-role-extid", variable: 'EXT_ID')])
   {
     withAWS(role: "${ARN}", externalId: "${EXT_ID}", region: "${AWS_REGION}"){
       sh '''
       cdk deploy --all
       '''
       }
   }
}
</code>```

In this code sample-role-arn is defined in the account in which cdk deploy --all will deploy the resources. If the CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION are set to different values of which sample-role-arn is not a part, the cdk deploy --all will through error: Could not assume role in target account using current credentials (which are for account xxxxxx) User: arn:aws:sts::xxxx:assumed-role/sample-role-arn/xxx is not authorized to perform: sts:AssumeRole on resource is is expected.

However, if role is created in account set by CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION and made sample-role-arn as trusted entity, yet the same error as mentioned above is encountered despite the fact that sample-role-arn is a trusted entity.

Could someone please advise, if this is possible?

Body:
Is it possible to use a single IAM role (which can access another role) to deploy resources with environment variables CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION?
For example: Below is a piece of code from Jenkinsfile , which uses a role to deploy resources in the account of which it a part.

script
{
  withCredentials([string(credentialsId: "sample-role-arn", variable: 'ARN'), string(credentialsId: "sample-role-extid", variable: 'EXT_ID')])
   {
     withAWS(role: "${ARN}", externalId: "${EXT_ID}", region: "${AWS_REGION}"){
       sh '''
       cdk deploy --all
       '''
       }
   }
}

In this code sample-role-arn is defined in the account in which cdk deploy --all will deploy the resources. If the CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION are set to different values of which sample-role-arn is not a part, the cdk deploy --all will through error: Could not assume role in target account using current credentials (which are for account xxxxxx) User: arn:aws:sts::xxxx:assumed-role/sample-role-arn/xxx is not authorized to perform: sts:AssumeRole on resource is is expected.

However, if role is created in account set by CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION and made sample-role-arn as trusted entity, yet the same error as mentioned above is encountered despite the fact that sample-role-arn is a trusted entity.

Could someone please advise, if this is possible?


问:
Unable to connect to a C# Socket using Angular
I'm trying to connect to a Socket from my angular Application on the ngOnInit method.

Here is how my Service Looks Like

```<code>import { Injectable } from '@angular/core';
import {webSocket, WebSocketSubject} from 'rxjs/webSocket';
import { map } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class SocketService {
  private socket$!: WebSocketSubject<any>;

  constructor() {
    // Connect to the local websocket server on port 15001. Handle any Exceptions.

    try {
      this.socket$ = webSocket('ws://localhost:15001');
    }
    catch (e) {
      console.log(e);
    }

   }

   // Receive messages from the server

   public receive(){
      return this.socket$.pipe(
        map(message=>JSON.parse(message))
      )
   }
}
</code>```

Here is My Component.ts

```<code>import { Component, OnInit } from '@angular/core';
import { SocketService } from './services/socket.service';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  constructor(private socketService: SocketService) { }

  ngOnInit() {

    try{
      this.socketService.receive().subscribe((data) => {
        console.log(data);
      });
    }
    catch (e) {
      console.log(e);
    }

  }

  title = 'MarketFeed';
}
</code>```

Despite adding a try-catch I'm getting this error which is difficult to debug.

Here is the Error Message on the console

WebSocket connection to 'ws://localhost:15001/' failed:
ngOnInit  @   app.component.ts:15 Show 37 more frames app.component.ts:15
ERROR  Event {isTrusted: true, type: 'error', target: WebSocket,
currentTarget: WebSocket, eventPhase: 0, …} Zone -
WebSocket.addEventListener:error (async)

ngOnInit  @   app.component.ts:15 Promise.then (async)         4431   @   main.ts:6
webpack_exec  @   main.ts:7 (anonymous)   @   main.ts:7 (anonymous)   @   main.ts:7 (anonymous)   @   main.js:2 Show 134 more frames
Blockquote

What could I be missing? I'm able to consume the same socket using node js. But here on Angular, it is not working.

Body:
I'm trying to connect to a Socket from my angular Application on the ngOnInit method.

Here is how my Service Looks Like

import { Injectable } from '@angular/core';
import {webSocket, WebSocketSubject} from 'rxjs/webSocket';
import { map } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class SocketService {
  private socket$!: WebSocketSubject<any>;

  constructor() {
    // Connect to the local websocket server on port 15001. Handle any Exceptions.

    try {
      this.socket$ = webSocket('ws://localhost:15001');
    }
    catch (e) {
      console.log(e);
    }

   }

   // Receive messages from the server

   public receive(){
      return this.socket$.pipe(
        map(message=>JSON.parse(message))
      )
   }
}

Here is My Component.ts

import { Component, OnInit } from '@angular/core';
import { SocketService } from './services/socket.service';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  constructor(private socketService: SocketService) { }

  ngOnInit() {

    try{
      this.socketService.receive().subscribe((data) => {
        console.log(data);
      });
    }
    catch (e) {
      console.log(e);
    }

  }

  title = 'MarketFeed';
}

Despite adding a try-catch I'm getting this error which is difficult to debug.

Here is the Error Message on the console

WebSocket connection to 'ws://localhost:15001/' failed:
ngOnInit  @   app.component.ts:15 Show 37 more frames app.component.ts:15
ERROR  Event {isTrusted: true, type: 'error', target: WebSocket,
currentTarget: WebSocket, eventPhase: 0, …} Zone -
WebSocket.addEventListener:error (async)

ngOnInit  @   app.component.ts:15 Promise.then (async)         4431   @   main.ts:6
webpack_exec  @   main.ts:7 (anonymous)   @   main.ts:7 (anonymous)   @   main.ts:7 (anonymous)   @   main.js:2 Show 134 more frames
Blockquote

What could I be missing? I'm able to consume the same socket using node js. But here on Angular, it is not working.