Jenkins connectedDebugAndroidTest no connected device - jenkins

I have a Jenkins project which start up Android emulator and run the connectedDebugAndroidTest gradle task.
The first time everything is fine, But the consecutive build will failed
due to:
com.android.builder.testing.api.DeviceException: No connected devices!
I think my emulator run up perfectly. Because every time I use adb devices check the emulator. But the connectedAndroidTest failed.
Started by upstream project "cp_demo" build number 62
originally caused by:
Started by user selab
[EnvInject] - Loading node environment variables.
Building on master in workspace /var/lib/jenkins/workspace/em
$ /opt/android-sdk-linux/tools/android list target
[android] Using Android SDK: /opt/android-sdk-linux
$ /opt/android-sdk-linux/platform-tools/adb start-server
* daemon not running. starting it now at tcp:5850 *
* daemon started successfully *
$ /opt/android-sdk-linux/platform-tools/adb start-server
[android] Starting Android emulator
$ /opt/android-sdk-linux/tools/emulator -engine classic -ports 5746,5747 -report-console tcp:5839,max=60 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-23_x86 -no-snapshot-load -no-snapshot-save -no-window -verbose -noaudio
WARNING: Force to use classic engine to support snapshot.
emulator: Android virtual device file at: /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.ini
emulator: virtual device content at /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd
emulator: virtual device config file: /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/config.ini
emulator: using core hw config path: /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/hardware-qemu.ini
emulator: Found AVD target API level: 23
emulator: Read property file at /opt/android-sdk-linux/system-images/android-23/default/x86//build.prop
emulator: No boot.prop property file found.
emulator: found skin 'WVGA800' in directory: /opt/android-sdk-linux/platforms/android-23/skins/
emulator: autoconfig: -skin WVGA800
emulator: autoconfig: -skindir /opt/android-sdk-linux/platforms/android-23/skins/
emulator: found skin-specific hardware.ini: /opt/android-sdk-linux/platforms/android-23/skins//WVGA800/hardware.ini
emulator: autoconfig: -kernel /opt/android-sdk-linux/system-images/android-23/default/x86//kernel-qemu
emulator: Target arch = 'x86'
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires legacy device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /opt/android-sdk-linux/system-images/android-23/default/x86//ramdisk.img
emulator: Using initial system image: /opt/android-sdk-linux/system-images/android-23/default/x86//system.img
emulator: autoconfig: -data /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/userdata-qemu.img
emulator: autoconfig: -initdata /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/userdata.img
emulator: autoconfig: -cache /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/cache.img
emulator: autoconfig: -sdcard /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/sdcard.img
emulator: Increasing RAM size to 1024MB
emulator: VM heap size 48MB is below hardware specified minimum of 192MB,setting it to that value
emulator: System image is read only
emulator: autoconfig: -snapstorage /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/snapshots.img
emulator: GPU emulation is disabled
emulator: Found 2 DNS servers: 8.8.8.8 168.95.192.1
emulator: trying to load skin file '/opt/android-sdk-linux/platforms/android-23/skins//WVGA800/layout'
emulator: Found 2 DNS servers: 8.8.8.8 168.95.192.1
emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored.
Content of hardware configuration file:
hw.cpu.arch = x86
hw.cpu.model = qemu32
hw.cpu.ncore = 2
hw.ramSize = 1024
hw.screen = multi-touch
hw.mainKeys = true
hw.trackBall = true
hw.keyboard = false
hw.keyboard.lid = false
hw.keyboard.charmap = qwerty2
hw.dPad = true
hw.gsmModem = true
hw.gps = true
hw.battery = true
hw.accelerometer = true
hw.audioInput = true
hw.audioOutput = true
hw.sdCard = true
hw.sdCard.path = /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/sdcard.img
disk.cachePartition = true
disk.cachePartition.path = /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/cache.img
disk.cachePartition.size = 66m
hw.lcd.width = 480
hw.lcd.height = 800
hw.lcd.depth = 16
hw.lcd.density = 160
hw.lcd.backlight = true
hw.gpu.enabled = false
hw.gpu.mode = (null)
hw.gpu.blacklisted = no
hw.initialOrientation = portrait
hw.camera.back = emulated
hw.camera.front = none
vm.heapSize = 192
hw.sensors.light = true
hw.sensors.pressure = true
hw.sensors.humidity = true
hw.sensors.proximity = true
hw.sensors.magnetic_field = true
hw.sensors.orientation = true
hw.sensors.temperature = true
hw.useext4 = true
kernel.path = /opt/android-sdk-linux/system-images/android-23/default/x86//kernel-qemu
kernel.newDeviceNaming = no
kernel.supportsYaffs2 = no
disk.ramdisk.path = /opt/android-sdk-linux/system-images/android-23/default/x86//ramdisk.img
disk.systemPartition.initPath = /opt/android-sdk-linux/system-images/android-23/default/x86//system.img
disk.systemPartition.size = 1280m
disk.dataPartition.path = /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/userdata-qemu.img
disk.dataPartition.size = 2g
disk.snapStorage.path = /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/snapshots.img
avd.name = hudson_en-US_160_WVGA_android-23_x86
.
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: KVM (version 12) is installed and usable.
QEMU options list:
emulator: argv[00] = "/opt/android-sdk-linux/tools/emulator64-x86"
emulator: argv[01] = "-audio"
emulator: argv[02] = "none"
emulator: argv[03] = "-dns-server"
emulator: argv[04] = "8.8.8.8,168.95.192.1"
emulator: argv[05] = "-serial"
emulator: argv[06] = "null"
emulator: argv[07] = "-serial"
emulator: argv[08] = "null"
emulator: argv[09] = "-boot-property"
emulator: argv[10] = "persist.sys.language=en"
emulator: argv[11] = "-boot-property"
emulator: argv[12] = "persist.sys.country=US"
emulator: argv[13] = "-android-ports"
emulator: argv[14] = "5746,5747"
emulator: argv[15] = "-android-report-console"
emulator: argv[16] = "tcp:5839,max=60"
emulator: argv[17] = "-enable-kvm"
emulator: argv[18] = "-android-hw"
emulator: argv[19] = "/var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/hardware-qemu.ini"
emulator: argv[20] = "-append"
emulator: argv[21] = "qemu=1 androidboot.hardware=goldfish clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=0 ndns=2"
Concatenated QEMU options:
/opt/android-sdk-linux/tools/emulator64-x86 -audio none -dns-server 8.8.8.8,168.95.192.1 -serial null -serial null -boot-property persist.sys.language=en -boot-property persist.sys.country=US -android-ports 5746,5747 -android-report-console tcp:5839,max=60 -enable-kvm -android-hw /var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/hardware-qemu.ini -append 'qemu=1 androidboot.hardware=goldfish clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=0 ndns=2'
emulator: Starting QEMU main loop
emulator: registered 'boot-properties' qemud service
emulator: Using kernel serial device prefix: ttyS
emulator: AVD Name: hudson_en-US_160_WVGA_android-23_x86
emulator: Ramdisk image contains fstab.goldfish file
emulator: Found format of system partition: 'ext4'
emulator: Found format of userdata partition: 'ext4'
emulator: Found format of cache partition: 'ext4'
emulator: system partition format: ext4
emulator: nand_add_dev: system,size=0x50000000,file=/opt/android-sdk-linux/system-images/android-23/default/x86//system.img,pagesize=512,extrasize=0,readonly
emulator: userdata partition format: ext4
emulator: nand_add_dev: userdata,size=0x80000000,file=/var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/userdata-qemu.img,pagesize=512,extrasize=0
emulator: cache partition format: ext4
emulator: nand_add_dev: cache,size=0x4200000,file=/var/lib/jenkins/.android/avd/hudson_en-US_160_WVGA_android-23_x86.avd/cache.img,pagesize=512,extrasize=0
emulator: Adding boot property: 'dalvik.vm.heapsize' = '192m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Found 2 DNS servers: 8.8.8.8 168.95.192.1
emulator: Kernel parameters: qemu=1 androidboot.hardware=goldfish clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=0 ndns=2
emulator: trying to find: /opt/android-sdk-linux/tools/bios.bin
emulator: trying to find: /opt/android-sdk-linux/tools/lib/pc-bios/bios.bin
emulator: trying to find: /opt/android-sdk-linux/tools/vgabios-cirrus.bin
emulator: trying to find: /opt/android-sdk-linux/tools/lib/pc-bios/vgabios-cirrus.bin
emulator: Adding boot property: 'persist.sys.language' = 'en'
emulator: Adding boot property: 'persist.sys.country' = 'US'
emulator: (android_emulation_setup) using custom adb server port 5850
emulator: ro.adb.qemud invalid or not found, API >= 16, defaulting ro.adb.qemud = 0
emulator: (setup_console_and_adb_ports) trying console port 5746, adb port 5747 (legacy: true)
emulator: (android_console_start) initializing on port 5746
emulator: sent '0012host:emulator:5747' to ADB server
emulator: WARNING: Requested adb port (5747) is outside the recommended range [5555,5586]. ADB may not function properly for the emulator. See -help-port for details.
emulator: Listening for console connections on port: 5746
emulator: Serial number of this emulator (for ADB): emulator-5746
emulator: trying to find console-report client on tcp:5839
emulator: trying to find console-report client on tcp:5839
emulator: trying to find console-report client on tcp:5839
emulator: trying to find console-report client on tcp:5839
emulator: trying to find console-report client on tcp:5839
emulator: trying to find console-report client on tcp:5839
emulator: console port number sent to remote. resuming boot
[android] Emulator reported that the console is available on port 5,746
[android] Waiting for emulator to finish booting...
emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized
emulator: Skipping metrics reporting: No user opt-in.
$ /opt/android-sdk-linux/platform-tools/adb -s emulator-5746 wait-for-device shell getprop init.svc.bootanim
emulator: _hwFingerprint_connect: connect finger print listen is called
emulator: got message from guest system fingerprint HAL
[android] Emulator reported that the startup process is 'stopped'
$ /opt/android-sdk-linux/platform-tools/adb -s emulator-5746 logcat -v time
[android] Attempting to unlock emulator screen
$ /opt/android-sdk-linux/platform-tools/adb -s emulator-5746 shell wm dismiss-keyguard
$ /opt/android-sdk-linux/platform-tools/adb -s emulator-5746 shell input keyevent 4
[android] Emulator is ready for use (took 29 seconds)
[em] $ /bin/sh -xe /tmp/hudson8096686309595310732.sh
+ /opt/android-sdk-linux/platform-tools/adb devices
List of devices attached
emulator-5746 device
+ sleep 10
+ cd /var/lib/jenkins/workspace/cp_demo/CompositeApp
+ ./gradlew connectedDebugAndroidTest
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /opt/android-sdk-linux/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
WARNING: WARNING: Dependency commons-logging:commons-logging:1.1.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Unrecognized dependency: 'com.wu-man:android-oauth-client:0.4.5' (type: 'arr', extension: 'arr')
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency commons-logging:commons-logging:1.1.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Unrecognized dependency: 'com.wu-man:android-oauth-client:0.4.5' (type: 'arr', extension: 'arr')
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency commons-logging:commons-logging:1.1.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Unrecognized dependency: 'com.wu-man:android-oauth-client:0.4.5' (type: 'arr', extension: 'arr')
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency commons-logging:commons-logging:1.1.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Unrecognized dependency: 'com.wu-man:android-oauth-client:0.4.5' (type: 'arr', extension: 'arr')
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Incremental java compilation is an incubating feature.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /opt/android-sdk-linux/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debugAndroidTest as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debugAndroidTest as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library
:app:prepareComAndroidSupportDesign2301Library
:app:prepareComAndroidSupportMultidex101Library
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library
:app:prepareCompositeAppComlibraryDebugUnspecifiedLibrary
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:incrementalDebugJavaCompilationSafeguard
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/var/lib/jenkins/workspace/cp_demo/CompositeApp/app/src/main/java/ntu/selab/lw/util/ClassUtilities.java:326: warning: non-varargs call of varargs method with inexact argument type for last parameter;
value = valueClass.getMethod("toString", parameters).invoke(valueObj, parameters);
^
cast to Object for a varargs call
cast to Object[] for a non-varargs call and to suppress this warning
/var/lib/jenkins/workspace/cp_demo/CompositeApp/app/src/main/java/ntu/selab/lw/util/ClassUtilities.java:335: warning: non-varargs call of varargs method with inexact argument type for last parameter;
return beanClass.getMethod(methodName, parameters).invoke(beanObj, parameters);
^
cast to Object for a varargs call
cast to Object[] for a non-varargs call and to suppress this warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 warnings
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:unzipJacocoAgent UP-TO-DATE
:app:transformClassesWithJacocoForDebug
:app:transformClassesWithDexForDebug
Running dex as a separate process.
To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 2560 MB (based on the dexOptions.javaMaxHeapSize = 2g).
To do this set org.gradle.jvmargs=-Xmx2560M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug
:app:assembleDebug
:app:prepareComAndroidSupportMultidexInstrumentation101Library
:app:prepareComAndroidSupportRecyclerviewV72301Library
:app:prepareComAndroidSupportTestEspressoEspressoContrib221Library
:app:prepareComAndroidSupportTestEspressoEspressoCore221Library
:app:prepareComAndroidSupportTestEspressoEspressoIdlingResource221Library
:app:prepareComAndroidSupportTestExposedInstrumentationApiPublish041Library
:app:prepareComAndroidSupportTestRules041Library
:app:prepareComAndroidSupportTestRunner041Library
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:generateDebugAndroidTestResValues
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:incrementalDebugAndroidTestJavaCompilationSafeguard
:app:javaPreCompileDebugAndroidTest
:app:compileDebugAndroidTestJavaWithJavacNote: /var/lib/jenkins/workspace/cp_demo/CompositeApp/app/src/androidTest/java/ntu/selab/lw/invoke/intent_address_extractor/OutputExtrasInputExtractorTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileDebugAndroidTestNdk UP-TO-DATE
:app:compileDebugAndroidTestSources
:app:mergeDebugAndroidTestShaders
:app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets
:app:mergeDebugAndroidTestAssets
:app:transformClassesWithDexForDebugAndroidTest
:app:mergeDebugAndroidTestJniLibFolders
:app:transformNativeLibsWithMergeJniLibsForDebugAndroidTest
:app:processDebugAndroidTestJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebugAndroidTest
:app:validateSigningDebugAndroidTest
:app:packageDebugAndroidTest
:app:assembleDebugAndroidTest
:app:connectedDebugAndroidTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:connectedDebugAndroidTest'.
> com.android.builder.testing.api.DeviceException: No connected devices!
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.205 secs
Build step 'Execute shell' marked build as failure
[android] Stopping Android emulator
[android] Archiving emulator log
$ /opt/android-sdk-linux/platform-tools/adb kill-server
Finished: FAILURE
The Build log display that my emulator startup successfully, Does anybody no why?
Thanks

Related

Error when running Memgraph 2.1.1 on MacBook Air with M1

I want to run Memgraph 2.1.1 inside Docker. I have MacBook Air with M1. When I try to run it I get the error:
> docker run -p 7687:7687 memgraph/memgraph
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
You are running Memgraph v2.1.1
To get started with Memgraph, visit https://memgr.ph/start
qemu: uncaught target signal 6 (Aborted) - core dumped
In my docker log I can see also some errors:
memgraph#e01736c43b23:/usr/lib/memgraph$ cat /var/log/memgraph/memgraph_2023-02-13.log
[2023-02-13 11:16:17.124] [memgraph_log] [warning] Invalid license key string. To use Enterprise features please set it to a valid string using the following query:
SET DATABASE SETTING "enterprise.license" TO "your-license-key"
[2023-02-13 11:16:17.254] [memgraph_log] [warning] No snapshot or WAL file found. For more details, visit https://memgr.ph/durability.
[2023-02-13 11:17:50.221] [memgraph_log] [warning] Using non-secure Bolt connection (without SSL). For more details, visit https://memgr.ph/ssl.
[2023-02-13 11:18:03.589] [memgraph_log] [critical]
Assertion failed in file /memgraph/src/utils/async_timer.cpp at line 144.
Expression: 'timer_create(CLOCK_MONOTONIC, &notification_settings, &timer_id_) == 0'
Message: 'Couldn't create timer: (22) Invalid argument'
What can I do to start Memgraph in docker?
You will need to upgrade Memgraph to newer version. Support for M1 was added in Memgraph 2.2.

How to inspect #local_config_platform//:host?

I'm running into some toolchain issues, with errors like:
INFO: ToolchainResolution: Type #io_bazel_rules_go//go:toolchain: target platform #local_config_platform//:host: Rejected toolchain #go_sdk//:go_linux_amd64-impl; mismatching values: linux, x86_64
INFO: ToolchainResolution: Type #io_bazel_rules_go//go:toolchain: target platform #local_config_platform//:host: No toolchains found.
but I believe I am running on x86_64 and Linux, but that would be made clear by inspecting the generated constraints.
This was mentioned earlier, but I was unable to find said-generated file.
And in case it ever helps anyone else, I'm running popos.
Thanks!
Use query --output=build to dump the rule:
$ bazel query --output=build #local_config_platform//:host
# /home/user/.cache/_bazel_cache/bf5544946d234767647dbf413a7bc3c9/external/local_config_platform/BUILD.bazel:4:9
platform(
name = "host",
constraint_values = ["#platforms//cpu:x86_64", "#platforms//os:linux"],
)
The comment line even tells you were to find the original generated BUILD file.

Windows Driver : Install legacy hardware with command line tool

Operation System: Windows Server 2016 R2
I have a RAMDisk driver can be installed with "Add Legacy Hardware Wizard" (hdwwiz.exe) successfully. From the output of devcon hwids *, the device can be seen as below.
ROOT\UNKNOWN\0000
Name: RAMDrive [ QSoft ] Enterprise (x64)
Hardware IDs:
ramdriv
However, I need complete the installation via Ansible, hence hdwwiz.exe cannot be used. It has to be done via command line without interaction.
I tried several approaches and none of them works.
Approach I : DevCon.exe (Windows Device Console)
C:\Ramdisk64_inst>devcon.exe install RAMDriv.inf ramdriv
Device node created. Install is complete when drivers are installed...
Updating drivers for ramdriv from C:\Ramdisk64_inst\RAMDriv.inf.
devcon.exe failed.
C:\Ramdisk64_inst>devcon.exe install RAMDriv.inf ROOT\UNKNOWN\0000
Device node created. Install is complete when drivers are installed...
Updating drivers for ROOT\UNKNOWN\0000 from C:\Ramdisk64_inst\RAMDriv.inf.
devcon.exe failed.
Here is the log from C:\Windows\INF\setupapi.dev.log
>>> [Device Install (UpdateDriverForPlugAndPlayDevices) - ramdriv]
>>> Section start 2018/12/20 07:10:35.670
cmd: C:\Ramdisk64_inst\devcon.exe install C:\Ramdisk64_inst\RAMDriv.inf ramdriv
ndv: INF path: C:\Ramdisk64_inst\RAMDriv.inf
ndv: Install flags: 0x00000001
! ndv: Unable to find any matching devices.
<<< Section end 2018/12/20 07:10:35.717
<<< [Exit status: FAILURE(0xe000020b)]
>>> [Device Install (UpdateDriverForPlugAndPlayDevices) - ROOT\UNKNOWN\0000]
>>> Section start 2018/12/20 07:11:50.687
cmd: devcon.exe install RAMDriv.inf ROOT\UNKNOWN\0000
ndv: INF path: C:\Ramdisk64_inst\RAMDriv.inf
ndv: Install flags: 0x00000001
! ndv: Unable to find any matching devices.
<<< Section end 2018/12/20 07:11:50.734
<<< [Exit status: FAILURE(0xe000020b)]
Approach 2 : DPInst.exe (Driver Package Installer)
C:\Ramdisk64_inst>dpinst.exe /PATH C:\Ramdisk64_inst /Q /C /LM
INFO: Option set: dumping log info to console.
INFO: Current working directory: 'C:\Ramdisk64_inst'
INFO: Running on path 'C:\Ramdisk64_inst'
INFO: No valid 'dpinst.xml' file provided.
INFO: Install option set: Running in quiet mode. Suppressing Wizard and OS popups.
INFO: Install option set: legacy mode on.
INFO: Found driver package: 'C:\Ramdisk64_inst\RAMDriv.inf'.
INFO: Preinstalling 'c:\ramdisk64_inst\ramdriv.inf' ...
INFO: ENTER: DriverPackagePreinstallW
INFO: Driver package is already preinstalled 'c:\ramdisk64_inst\ramdriv.inf'.
SUCCESS:c:\ramdisk64_inst\ramdriv.inf is preinstalled.
INFO: RETURN: DriverPackagePreinstallW (0xB7)
INFO: ENTER: DriverPackageGetPathW
INFO: RETURN: DriverPackageGetPathW (0x0)
INFO: ENTER: DriverPackageInstallW
WARNING:DRIVER_PACKAGE_LEGACY_MODE flag set but not supported on Plug and Play driver on VISTA. Flag will be ignored.
INFO: Installing INF file 'c:\ramdisk64_inst\ramdriv.inf' (Plug and Play).
INFO: Looking for Model Section [DiskDevice.NTamd64]...
INFO: No matching devices found in INF "C:\Windows\System32\DriverStore\FileRepository\ramdriv.inf_amd64_fcc99ac0622d865b\ramdriv.inf" on the Machine.
INFO: No drivers installed. No devices found that match driver(s) contained in 'C:\Windows\System32\DriverStore\FileRepository\ramdriv.inf_amd64_fcc99ac0622d865b\ramdriv.inf'.
INFO: RETURN: DriverPackageInstallW (0xE000020B)
INFO: No matching device was found for 'c:\ramdisk64_inst\ramdriv.inf'. Driver will be installed when plugged in.
INFO: Returning with code 0x100
Approach 3 : rundll32 calls SetupAPI
C:\Ramdisk64_inst>rundll32.exe setupapi.dll,InstallHinfSection DiskInstall 128 C:\Ramdisk64_inst\RAMDriv.inf
It ends without any error, but the driver is not installed.
Approach 4 : PnPUtil
C:\Ramdisk64_inst>pnputil.exe /add-driver C:\Ramdisk64_inst\RAMDriv.inf /install /subdirs /restart
Microsoft PnP Utility
Adding driver package: RAMDriv.inf
Driver package added successfully.
Published Name: oem7.inf
Driver package installed on matching devices.
Total driver packages: 1
Added driver packages: 1
It succeeded, but in fact driver is not installed.
None of them works. DpInst.exe says No matching devices found in INF, DevCon.exe says Unable to find any matching devices. It seems the same reason.
However the driver can be installed with hdwwiz.exe manually, does anyone know what is the secret inside hdwwiz.exe?
Legacy Drivers canĀ“t be installed with pnputil and have to use LaunchINFSectionEx-Call
I tested the following and it works with several drivers from Windows 2000 up to Windows 10, 2012R2, 2016, 2019.
rundll32.exe advpack.dll,LaunchINFSectionEx ykmd.inf,Yubico64_Install.NT,,4,N
Pay attention to use the correct section
The correct section of the inf-File must be used, when there is no [DefaultInstall]-Section. This lacks in most answers. Look it up in your drivers inf-File and use the correct section (in my example "Yubico64_Install.NT"). Using the wrong section wont prompt an error. Im my example I use Quiet mode, no UI (4) and Never reboot (N) to install the driver automated via GPO. All options are documented in detail here:
https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768006(v%3Dvs.85)

Issue: Porting Docker to a new platform (Tizen 4.0 + ARM64)

I have been trying to port Docker CE on a new platform (Tizen 4.0 + ARM64) using static binaries as described here
However, even though I meet all the pre-requisites described in above link, I keep getting this error while trying to run docker daemon :
WARN[2018-10-04T14:14:57.890120101+09:00] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module bridge not found in directory /lib/modules/4.9.59-g70b545c-dirty modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.9.59-g70b545c-dirty, error: exit status 1
WARN[2018-10-04T14:14:57.905153370+09:00] Running modprobe nf_nat failed with message: modprobe: WARNING: Module nf_nat not found in directory /lib/modules/4.9.59-g70b545c-dirty, error: exit status 1
WARN[2018-10-04T14:14:57.920222485+09:00] Running modprobe xt_conntrack failed with message: modprobe: WARNING: Module xt_conntrack not found in directory /lib/modules/4.9.59-g70b545c-dirty, error: exit status 1
Error starting daemon: Error initializing network controller: Error creating default "bridge" network: package not installed
Is there anyway to fix this?
Otherwise, Is there some alternative way to port docker onto a new platform (In this case: Tizen 4.0 + ARM64).
Key note: The platform uses a linux kernel but doesn't support many typical Linux Platform features like apt-get commands.
Any help would be greatly appreciated. Thanks in advance :)
From your error message, your system is missing a number of networking related kernel modules, from the look of it, it's looking for at least: bridge, br_netfilter, nf_nat, xt_conntrack. You'll need to port these missing kernel modules or recompile the kernel to include the relevant modules.
Docker, by itself, requires a lot of pre-requesites to run on a new platform. Some of them are mentioned here.
Apart from meeting the pre-requisites, one has to meet specific kernel requirements and in case, the kernel doesn't meet all those requirements, one has to patch the kernel accordingly to get the things running.
Here are the kernel defconfigs, one must enable to get docker running -
CONFIG_CGROUP_DEVICE=y, CONFIG_CPUSETS=y, CONFIG_BLK_CGROUP=y, CONFIG_CGROUPS=y, CONFIG_CGROUP_CPUACCT=y, CONFIG_CGROUP_DEVICE=y, CONFIG_CGROUP_FREEZER=y, CONFIG_CGROUP_SCHED=y, - CONFIG_CGROUP_PERF=y, CONFIG_CGROUP_HUGETLB=y, CONFIG_NET_CLS_CGROUP=y, CONFIG_CGROUP_NET_PRIO=y, CONFIG_CFS_BANDWIDTH=y, CONFIG_CGROUP_PIDS=y, CONFIG_BLK_CGROUP=y, CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y, CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y, CONFIG_NETFILTER_XT_MATCH_IPVS=y, CONFIG_NF_NAT_IPV4=y, CONFIG_IP_NF_FILTER=y, CONFIG_IP_NF_TARGET_MASQUERADE=y, CONFIG_IP_NF_NAT=y, CONFIG_NF_NAT=y, CONFIG_NF_NAT_NEEDED=y, CONFIG_POSIX_MQUEUE=y, CONFIG_MEMCG=y, CONFIG_MEMCG_SWAP=y, CONFIG_MEMCG_KMEM=y, CONFIG_MEMCG_SWAP_ENABLED=y, CONFIG_BRIDGE=y, CONFIG_BRIDGE_NETFILTER=y, CONFIG_VXLAN=y, CONFIG_CRYPTO=y, CONFIG_CRYPTO_AEAD=y, CONFIG_CRYPTO_GCM=y, CONFIG_CRYPTO_SEQIV=y, CONFIG_CRYPTO_GHASH=y, CONFIG_XFRM=y, CONFIG_XFRM_USER=y, CONFIG_XFRM_ALGO=y, CONFIG_INET_ESP=y, CONFIG_INET_XFRM_MODE_TRANSPORT=y, CONFIG_IPVLAN=y, CONFIG_MACVLAN=y, CONFIG_DUMMY=y, ": CONFIG_NF_NAT_FTP=y, CONFIG_NF_CONNTRACK_FTP=y, CONFIG_NF_NAT_TFTP=y, CONFIG_NF_CONNTRACK_TFTP=y, CONFIG_OVERLAY_FS=y, CONG_AUFS_FS=y, CONFIG_BTRFS_FS=y, CONFIG_BTRFS_FS_POSIX_ACL=y, CONFIG_BLK_DEV_DM=y, CONFIG_DM_THIN_PROVISIONING=y, CONFIG_NAMESPACES=y, CONFIG_NET_NS=y, CONFIG_PID_NS=y, CONFIG_IPC_NS=y, CONFIG_UTS_NS=y, CONFIG_KEYS=y, CONFIG_VETH=y, CONFIG_USER_NS=y, CONFIG_SECCOMP=y, CONFIG_BLK_DEV_THROTTLING=y, CONFIG_IOSCHED_CFQ=y, CONFIG_CFQ_GROUP_IOSCHED=y, CONFIG_FAIR_GROUP_SCHED=y, CONFIG_RT_GROUP_SCHED=y, CONFIG_IP_VS=y, CONFIG_IP_VS_NFCT=y, CONFIG_IP_VS_RR=y, CONFIG_EXT4_FS=y, CONFIG_EXT4_FS_POSIX_ACL=y, CONFIG_EXT4_FS_SECURITY=y
P.S. - Some of the above defconfigs may not be necessary to get the docker running. However, enabling all of them ensures you have extended support for all the features that docker offers.

Appium ANDROID_HOME env variable issues

Happy new year all, I'd gratefully appreciate if someone could help or shed some light into this issue.
I've just set up appium 1.7.2 server on MAC OS High Sierra v 10.13.2, running appium through below command.
appium -a 127.0.0.1 -p 4723 --log-level=debug
Below is my .bash_profile
n.nadarajah#EGHJ-MACRDV01 ~ $ cat ~/.bash_profile
# Setting PATH for Python 2.7
# The original version is saved in .bash_profile.pysave
ANDROID_HOME=/Users/n.nadarajah/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
ANDROID_PLATFORM_TOOLS=$ANDROID_HOME/platform-tools
ANDROID_TOOLS=$ANDROID_HOME/tools
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}:$JAVA_HOME:$ANDROID_HOME:
$ANDROID_PLATFORM_TOOLS:$ANDROID_TOOLS"
export PATH
Echoing $ANDRIOD_HOME env variable
n.nadarajah#EGHJ-MACRDV01 ~ $ echo $ANDROID_HOME
/Users/n.nadarajah/Library/Android/sdk
Below are the Appium logs on test execution.
n.nadarajah#EGHJ-MACRDV01 ~ $ appium -a 127.0.0.1 -p 4723 --log-l .
level=debug
info: Welcome to Appium v1.4.16 (REV
ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"address":"127.0.0.1"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"capabilities":{"alwaysMatch":
{"platformName":"Android"},"firstMatch":
[{}]},"desiredCapabilities":{"deviceName":"Android
Emulator","app":"/Users/n.nadarajah/sites/Resilient-
QA/EndToEndTesting/apks/app-
debug.apk","platformName":"Android","automationName":"appium",
"appPackage":"com.resilientplc.smartnumbers.debug"}}
info: Client User-Agent string: Python http auth
info: [debug] No appActivity desired capability or server param.
Parsing from apk.
info: [debug] Using local app from desired caps:
/Users/n.nadarajah/sites/Resilient-QA/EndToEndTesting
/apks/app-debug.apk
info: [debug] Creating new appium session
a5cfbee9-bcd6-41af-a90c-0389ab244d2c
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_151
info: [debug] Checking whether adb is present
warn: The ANDROID_HOME environment variable is not set to the Android
SDK root directory path.
ANDROID_HOME is required for compatibility with SDK 23+.
Checking along PATH for adb.
info: [debug] executing cmd: which adb
info: [debug] Using adb from /Users/n.nadarajah/
Library/Android/sdk/platform-tools/adb
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
warn: The ANDROID_HOME environment variable is not set to the Android
SDK root directory path.
ANDROID_HOME is required for compatibility with SDK 23+.
Checking along PATH for aapt.
info: [debug] executing cmd: which aapt
error: Problem parsing package and activity from manifest: Error: Could
not find aapt. Please set the ANDROID_HOME environment
variable with the Android SDK root directory path.
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Could not
find aapt. Please set the ANDROID_HOME environment variable
with the Android SDK root directory path.
info: [debug] Error: Could not find aapt.
Please set the ANDROID_HOME environment variable with the
Android SDK root directory path.at ADB.<anonymous>
(/usr/local/lib/node_modules/appium
/node_modules/appium-adb/lib/adb.js:126:12)
at ChildProcess.exithandler (child_process.js:279:5)
at ChildProcess.emit (events.js:159:13)
at maybeClose (internal/child_process.js:943:16)
at Socket.stream.socket.on (internal/child_process.js:363:11)
at Socket.emit (events.js:159:13)
at Pipe._handle.close [as _onclose] (net.js:568:12)
info: [debug] Responding to client with error: {"status":33,"value":
{"message":"A new session could not be created.
(Original error: Could not find aapt. Please set the ANDROID_HOME
environment variable with the Android SDK root
directory path.)","origValue":"Could not find aapt. Please set the
ANDROID_HOME environment variable with the
Android SDK root directory path."},"sessionId":null}
info: <-- POST /wd/hub/session 500 164.317 ms - 344
Questions:
1. Why does appium cannot see the system environment variable?
I've tried appium server versions 1.7.2 & 1.7.1 & 1.6.2 & 1.4.16 the symptoms were the same.
Could someone help me out with this please.
Thanks
Niro
I've got to the bottom of this issue,
turns out I've missed another android env variable.
In the above case I've missed ANDROID_BUILD_TOOLS
At the point of writing this, below are the list of Env variables required for appium.
ANDROID_HOME=/Users/n.nadarajah/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/
Contents/Home/bin
ANDROID_PLATFORM_TOOLS=$ANDROID_HOME/platform-tools
ANDROID_TOOLS=$ANDROID_HOME/tools
ANDROID_BUILD_TOOLS=$ANDROID_HOME/build-tools/27.0.3
Append all the above env variables to $PATH
works for me in Mojave.
After editing ~/.bash_<profile or rc> I use:
source ~/.bash_<profile or rc>
It not only loads the new variables values, as reports any error on file as well.
here is the workin list of environment variables:
export ANDROID_HOME=/Users/user/Library/Android/sdk
export PATH=$ANDROID_HOME/:$PATH
export
PATH=$ANDROID_HOME/platform-tools/:$PATH
export
PATH=$ANDROID_HOME/tools/:$PATH export PATH=/usr/local/bin/:$PATH
launchctl setenv ANDROID_HOME /Users/user/Library/Android/sdk
works on highSierra, of course, tweak Your paths...
here I have installed android studio in default path.
First Set Android home: create a new System Variable
ANDROID_HOME : C:\Users\<user name>\AppData\Local\Android\Sdk
Add bellow three path in path system variables
C:\Users\<user name>\AppData\Local\Android\Sdk\platform-tools
C:\Users\<user name>\AppData\Local\Android\Sdk\tools
C:\Users\<user name>\AppData\Local\Android\Sdk\tools\bin

Resources