ActivityWatch / aw-android

ActivityWatch for Android, using aw-server-rust as backend.
Mozilla Public License 2.0
165 stars 29 forks source link

Crashes on launch (Android 11) #60

Closed Tisckkytt closed 3 months ago

Tisckkytt commented 3 years ago

Version: 0.10.0 Installed From: Playstore Android Version: 11 (AOSPA)

Scoop app couldn't register any crashes (weirdly), so can't provide logs, but if necessary I can use Matlog or something.

ErikBjare commented 3 years ago

This seems to happen to a number of people, not sure why.

Someone emailed me their logs, containing this stack trace (Android 9):

02-21 08:41:04.005 30556 30633 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 30633 (AsyncTask #2), pid 30556 (tywatch.android)
02-21 08:41:04.086 30669 30669 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-21 08:41:04.087 30669 30669 F DEBUG   : Build fingerprint: 'vivo/1820/1820:8.1.0/O11019/1610956190:user/release-keys'
02-21 08:41:04.087 30669 30669 F DEBUG   : Revision: '0'
02-21 08:41:04.087 30669 30669 F DEBUG   : ABI: 'arm64'
02-21 08:41:04.087 30669 30669 F DEBUG   : pid: 30556, tid: 30633, name: AsyncTask #2  >>> net.activitywatch.android <<<
02-21 08:41:04.087 30669 30669 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
02-21 08:41:04.087 30669 30669 F DEBUG   :     x0   0000000000000000  x1   00000000000077a9  x2   0000000000000006  x3   0000000000000008
02-21 08:41:04.087 30669 30669 F DEBUG   :     x4   0000007dd1a31200  x5   0000007dd1a31200  x6   0000007dd1a31200  x7   0000007dd1a31000
02-21 08:41:04.087 30669 30669 F DEBUG   :     x8   0000000000000083  x9   0000000010000000  x10  0000007dd5a88960  x11  0000000000000001
02-21 08:41:04.087 30669 30669 F DEBUG   :     x12  346dc5d63886594b  x13  0000000000002710  x14  0000000051eb851f  x15  0000000000000064
02-21 08:41:04.087 30669 30669 F DEBUG   :     x16  0000006120bb5fa8  x17  0000007e76075da4  x18  0000007e760e1000  x19  000000000000775c
02-21 08:41:04.087 30669 30669 F DEBUG   :     x20  00000000000077a9  x21  0000000000000083  x22  0000007ddb9ff468  x23  0000007ddb5cec88
02-21 08:41:04.087 30669 30669 F DEBUG   :     x24  0000000000000001  x25  0000000000000000  x26  0000007dd5e78aa0  x27  0000000000000005
02-21 08:41:04.087 30669 30669 F DEBUG   :     x28  0000000000000003  x29  0000007dd5a889a0  x30  0000007e7602a7a0
02-21 08:41:04.087 30669 30669 F DEBUG   :     sp   0000007dd5a88960  pc   0000007e7602a7c8  pstate 0000000060000000
02-21 08:41:04.088 30669 30669 F DEBUG   : 
02-21 08:41:04.088 30669 30669 F DEBUG   : backtrace:
02-21 08:41:04.088 30669 30669 F DEBUG   :     #00 pc 000000000001d7c8  /system/lib64/libc.so (abort+120)
02-21 08:41:04.089 30669 30669 F DEBUG   :     #01 pc 000000000001d79c  /system/lib64/libc.so (abort+76)
02-21 08:41:04.387 20064 30293 E         : nFreeSize: 5720518656
02-21 08:41:04.447  9294  9294 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3341 
02-21 08:41:04.447  9294  9294 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1906 
02-21 08:41:04.549 20064 30293 E         : nFreeSize: 5720449024
02-21 08:41:07.659  9294  9294 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3341 
02-21 08:41:07.660  9294  9294 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1906 
02-21 08:41:08.569 30688 30764 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 30764 (AsyncTask #2), pid 30688 (tywatch.android)
02-21 08:41:08.644 30798 30798 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-21 08:41:08.644 30798 30798 F DEBUG   : Build fingerprint: 'vivo/1820/1820:8.1.0/O11019/1610956190:user/release-keys'
02-21 08:41:08.644 30798 30798 F DEBUG   : Revision: '0'
02-21 08:41:08.644 30798 30798 F DEBUG   : ABI: 'arm64'
02-21 08:41:08.644 30798 30798 F DEBUG   : pid: 30688, tid: 30764, name: AsyncTask #2  >>> net.activitywatch.android <<<
02-21 08:41:08.644 30798 30798 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
02-21 08:41:08.644 30798 30798 F DEBUG   :     x0   0000000000000000  x1   000000000000782c  x2   0000000000000006  x3   0000000000000008
02-21 08:41:08.644 30798 30798 F DEBUG   :     x4   0000007dd5c90200  x5   0000007dd5c90200  x6   0000007dd5c90200  x7   0000007dd5c90000
02-21 08:41:08.644 30798 30798 F DEBUG   :     x8   0000000000000083  x9   0000000010000000  x10  0000007dd5b8f960  x11  0000000000000001
02-21 08:41:08.644 30798 30798 F DEBUG   :     x12  346dc5d63886594b  x13  0000000000002710  x14  0000000051eb851f  x15  0000000000000064
02-21 08:41:08.645 30798 30798 F DEBUG   :     x16  0000006120bb5fa8  x17  0000007e76075da4  x18  0000007e760e1000  x19  00000000000077e0
02-21 08:41:08.645 30798 30798 F DEBUG   :     x20  000000000000782c  x21  0000000000000083  x22  0000007ddb9fa468  x23  0000007ddb5c9c88
02-21 08:41:08.645 30798 30798 F DEBUG   :     x24  0000000000000001  x25  0000000000000000  x26  0000007dd5e67aa0  x27  0000000000000005
02-21 08:41:08.645 30798 30798 F DEBUG   :     x28  0000000000000003  x29  0000007dd5b8f9a0  x30  0000007e7602a7a0
02-21 08:41:08.645 30798 30798 F DEBUG   :     sp   0000007dd5b8f960  pc   0000007e7602a7c8  pstate 0000000060000000
02-21 08:41:08.646 30798 30798 F DEBUG   : 
02-21 08:41:08.646 30798 30798 F DEBUG   : backtrace:
02-21 08:41:08.646 30798 30798 F DEBUG   :     #00 pc 000000000001d7c8  /system/lib64/libc.so (abort+120)
02-21 08:41:08.646 30798 30798 F DEBUG   :     #01 pc 000000000001d79c  /system/lib64/libc.so (abort+76)
02-21 08:41:08.940 20064 30293 E         : nFreeSize: 5719990272
02-21 08:41:09.005  9294  9294 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3341 
02-21 08:41:09.006  9294  9294 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1906 
02-21 08:41:09.069 20064 30293 E         : nFreeSize: 5719920640
02-21 08:41:15.284  9294  9294 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3341 
02-21 08:41:15.286  9294  9294 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1906 
02-21 08:41:16.150 30815 30894 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 30894 (AsyncTask #2), pid 30815 (tywatch.android)
02-21 08:41:16.226 30929 30929 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-21 08:41:16.226 30929 30929 F DEBUG   : Build fingerprint: 'vivo/1820/1820:8.1.0/O11019/1610956190:user/release-keys'
02-21 08:41:16.226 30929 30929 F DEBUG   : Revision: '0'
02-21 08:41:16.226 30929 30929 F DEBUG   : ABI: 'arm64'
02-21 08:41:16.226 30929 30929 F DEBUG   : pid: 30815, tid: 30894, name: AsyncTask #2  >>> net.activitywatch.android <<<
02-21 08:41:16.226 30929 30929 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
02-21 08:41:16.226 30929 30929 F DEBUG   :     x0   0000000000000000  x1   00000000000078ae  x2   0000000000000006  x3   0000000000000008
02-21 08:41:16.226 30929 30929 F DEBUG   :     x4   0000007dd5c88200  x5   0000007dd5c88200  x6   0000007dd5c88200  x7   0000007dd5c88000
02-21 08:41:16.226 30929 30929 F DEBUG   :     x8   0000000000000083  x9   0000000010000000  x10  0000007dd5a8a960  x11  0000000000000001
02-21 08:41:16.226 30929 30929 F DEBUG   :     x12  346dc5d63886594b  x13  0000000000002710  x14  0000000051eb851f  x15  0000000000000064
02-21 08:41:16.226 30929 30929 F DEBUG   :     x16  0000006120bb5fa8  x17  0000007e76075da4  x18  0000007e760e1000  x19  000000000000785f
02-21 08:41:16.226 30929 30929 F DEBUG   :     x20  00000000000078ae  x21  0000000000000083  x22  0000007ddb9f8468  x23  0000007ddb5c7c88
02-21 08:41:16.226 30929 30929 F DEBUG   :     x24  0000000000000001  x25  0000000000000000  x26  0000007dd5e73aa0  x27  0000000000000005
02-21 08:41:16.226 30929 30929 F DEBUG   :     x28  0000000000000003  x29  0000007dd5a8a9a0  x30  0000007e7602a7a0
02-21 08:41:16.226 30929 30929 F DEBUG   :     sp   0000007dd5a8a960  pc   0000007e7602a7c8  pstate 0000000060000000
02-21 08:41:16.227 30929 30929 F DEBUG   : 
02-21 08:41:16.227 30929 30929 F DEBUG   : backtrace:
02-21 08:41:16.227 30929 30929 F DEBUG   :     #00 pc 000000000001d7c8  /system/lib64/libc.so (abort+120)
02-21 08:41:16.227 30929 30929 F DEBUG   :     #01 pc 000000000001d79c  /system/lib64/libc.so (abort+76)

There are more stacktraces reported in the Play Store developer console, but this one is suspiciously short (and I've seen it a few times). Maybe the device is out of memory?


This seems to happen commonly on Android 11 (8 impacted users):

********** Crash dump: **********
#00 0x000000000004e2cc /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
#00 0x00000000004e55c0 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (std::sys::unix::abort_internal::h748977a2819cc6c0+4)
#00 0x00000000004e1ec8 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (std::sys_common::util::abort::h75b577bd61c7f10e+60)
#00 0x00000000004e2f58 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (rust_panic+72)
#00 0x00000000004e2ee0 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (std::panicking::rust_panic_with_hook::h9f57cb2f6667519b+452)
#00 0x00000000004e2a0c /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::hc8a51f46c13c17e5+144)
#00 0x00000000004e101c /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (std::sys_common::backtrace::__rust_end_short_backtrace::hed5a74b6adf6da2e+28)
#00 0x00000000004e2974 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (rust_begin_unwind+60)
#00 0x00000000004f8f34 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (core::panicking::panic_fmt::ha9032b28d8e00c81+36)
#00 0x00000000004fd1b0 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (core::str::slice_error_fail::ha89f60df3d1e6d85+344)
#00 0x00000000004fb918 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (_$LT$str$u20$as$u20$core..fmt..Debug$GT$::fmt::ha51cc98ba13d586e+904)
#00 0x00000000004f9480 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (core::fmt::builders::DebugTuple::field::he50dcf273b04a724+152)
#00 0x0000000000223614 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (_$LT$aw_datastore..DatastoreError$u20$as$u20$core..fmt..Debug$GT$::fmt::ha3c1f6e101a49779+216)
#00 0x00000000004fa790 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (core::fmt::write::hed043646315264aa+416)
#00 0x00000000004f3fb0 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (alloc::fmt::format::h22299e4ae9ab53a9+308)
#00 0x00000000001c8530 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/lib/arm64/libaw_server.so (Java_net_activitywatch_android_RustInterface_heartbeat+440)
#00 0x000000000002d4cc /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/oat/arm64/base.odex (art_jni_trampoline+188)
#00 0x0000000000082450 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/oat/arm64/base.odex (net.activitywatch.android.watcher.UsageStatsWatcher$SendHeartbeatsTask.doInBackground+2912)
#00 0x0000000000082974 /data/app/~~bXmifU6CeOgvG1pKBppWpg==/net.activitywatch.android-P7ovmCaknWToLYdOFxYUIQ==/oat/arm64/base.odex (net.activitywatch.android.watcher.UsageStatsWatcher$SendHeartbeatsTask.doInBackground+84)
#00 0x00000000006d89c8 /system/framework/arm64/boot-framework.oat (android.os.AsyncTask$3.call+168)
#00 0x000000000023e3c8 /apex/com.android.art/javalib/arm64/boot.oat (java.util.concurrent.FutureTask.run+200)
#00 0x0000000000624448 /system/framework/arm64/boot-framework.oat (android.os.AsyncTask$SerialExecutor$1.run+72)
#00 0x000000000029d318 /apex/com.android.art/javalib/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+984)
#00 0x000000000029a510 /apex/com.android.art/javalib/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+64)
#00 0x000000000015ab08 /apex/com.android.art/javalib/arm64/boot.oat (java.lang.Thread.run+72)
#00 0x0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
#00 0x00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#00 0x0000000000553890 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460)
#00 0x00000000005a2c2c /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308)
#00 0x00000000000afd4c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#00 0x0000000000050288 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
ErikBjare commented 3 years ago

@johan-bjareholt Do you have any idea about that last one?

Going to run it on an Android 11 virtual device and see if I can replicate.

ErikBjare commented 3 years ago
Logs when I try to run ActivityWatch on Android 11 ``` 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/js/index.d85839d5.js.map -> /data/user/0/net.activitywatch.android.debug/cache/webui/js/index.d85839d5.js.map 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/manifest.json -> /data/user/0/net.activitywatch.android.debug/cache/webui/manifest.json 12883-12883/net.activitywatch.android.debug E/WebUI: WebView received error: net::ERR_CONNECTION_REFUSED 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/precache-manifest.117af8d05f49331312917f2185126b0d.js -> /data/user/0/net.activitywatch.android.debug/cache/webui/precache-manifest.117af8d05f49331312917f2185126b0d.js 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/precache-manifest.7dccddf34703545a8cacc2129f303adc.js -> /data/user/0/net.activitywatch.android.debug/cache/webui/precache-manifest.7dccddf34703545a8cacc2129f303adc.js 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/precache-manifest.ea5f68f9bbc7a0b462b22132e64cfe3b.js -> /data/user/0/net.activitywatch.android.debug/cache/webui/precache-manifest.ea5f68f9bbc7a0b462b22132e64cfe3b.js 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/report.html -> /data/user/0/net.activitywatch.android.debug/cache/webui/report.html 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/service-worker.js -> /data/user/0/net.activitywatch.android.debug/cache/webui/service-worker.js 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/static/logo.png -> /data/user/0/net.activitywatch.android.debug/cache/webui/static/logo.png 12883-12917/net.activitywatch.android.debug W/AssetExtractor: webui/static/logo.svg -> /data/user/0/net.activitywatch.android.debug/cache/webui/static/logo.svg 12883-12917/net.activitywatch.android.debug W/RustInterface: Starting server... 12883-12917/net.activitywatch.android.debug I/aw-server-rust: aw_server::android::android: Building server state... 12883-12917/net.activitywatch.android.debug I/aw-server-rust: aw_server::android::android: Using asset dir: /data/user/0/net.activitywatch.android.debug/cache/webui 12883-12917/net.activitywatch.android.debug I/aw-server-rust: aw_server::android::android: Starting server... 12883-12917/net.activitywatch.android.debug I/aw-server-rust: aw_server::endpoints: Starting aw-server-rust at 127.0.0.1:5600 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Configured for production. 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: address: 127.0.0.1 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: port: 5600 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: log: critical 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: workers: 8 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: secret key: generated 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: limits: forms = 32KiB, json* = 1000000000B 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: keep-alive: disabled 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: read timeout: 5s 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: write timeout: 5s 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: tls: disabled 12883-12917/net.activitywatch.android.debug W/aw-server-rust: rocket::rocket: environment is 'production', but no `secret_key` is configured 12883-12883/net.activitywatch.android.debug E/WebUI: WebView received error: net::ERR_CONNECTION_REFUSED 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Mounting /: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET / (root_index) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /favicon.ico (root_favicon) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /fonts/ (root_fonts) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /css/ (root_css) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /js/ (root_js) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /static/ (root_static) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Mounting /api/0/info: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/info (server_info) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Mounting /api/0/buckets: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: POST /api/0/buckets/ application/json (bucket_new) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: DELETE /api/0/buckets/ (bucket_delete) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/buckets (buckets_get) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/buckets/ (bucket_get) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/buckets//events?&& (bucket_events_get) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: POST /api/0/buckets//events application/json (bucket_events_create) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: POST /api/0/buckets//heartbeat? application/json (bucket_events_heartbeat) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/buckets//events/count (bucket_event_count) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: DELETE /api/0/buckets//events/ (bucket_events_delete_by_id) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/buckets//export (bucket_export) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Mounting /api/0/query: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: POST /api/0/query application/json (query) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Mounting /api/0/import: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: POST /api/0/import application/json (bucket_import_json) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: POST /api/0/import multipart/form-data (bucket_import_form) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Mounting /api/0/export: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/export (buckets_export) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Mounting /api/0/settings: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/settings/ (setting_get) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /api/0/settings (settings_list_get) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: POST /api/0/settings application/json (setting_set) 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: DELETE /api/0/settings/ (setting_delete) 12883-12883/net.activitywatch.android.debug E/WebUI: WebView received error: net::ERR_CONNECTION_REFUSED 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Mounting /cors: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: GET /cors/ 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::fairing::fairings: Fairings: 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::fairing::fairings: 1 request: CORS 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::fairing::fairings: 1 response: CORS 12883-12917/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Rocket has launched from http://127.0.0.1:5600 12984-12984/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 12883-12982/net.activitywatch.android.debug A/libc: Fatal signal 31 (SIGSYS), code -6 (SI_TKILL) in tid 12982 (AsyncTask #1), pid 12883 (h.android.debug) 12985-12985/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 12986-12986/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 12991-12991/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 12992-12992/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 12995-12995/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone 292-292/? I/tombstoned: received crash request for pid 12982 12995-12995/? I/crash_dump32: performing dump of process 12883 (target tid = 12982) 12995-12995/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 12995-12995/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86/generic_x86_arm:11/RSR1.201013.001/6903271:user/release-keys' 12995-12995/? A/DEBUG: Revision: '0' 12995-12995/? A/DEBUG: ABI: 'x86' 12995-12995/? A/DEBUG: Timestamp: 2021-02-21 10:54:28+0100 12995-12995/? A/DEBUG: pid: 12883, tid: 12982, name: AsyncTask #1 >>> net.activitywatch.android.debug <<< 12995-12995/? A/DEBUG: uid: 10154 12995-12995/? A/DEBUG: signal 31 (SIGSYS), code -6 (SI_TKILL), fault addr -------- 12995-12995/? A/DEBUG: eax 0000016c ebx 00000096 ecx bc968f80 edx bc968f3c 12995-12995/? A/DEBUG: edi 00000000 esi 00080000 12995-12995/? A/DEBUG: ebp 00000000 esp bc968ee8 eip f7cb9b99 12995-12995/? A/DEBUG: backtrace: 12995-12995/? A/DEBUG: #00 pc 00000b99 [vdso] (__kernel_vsyscall+9) 12995-12995/? A/DEBUG: #01 pc 0005ad68 /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) 12995-12995/? A/DEBUG: #02 pc 0040889d /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so 12995-12995/? A/DEBUG: #03 pc 0037bbc1 /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so 12995-12995/? A/DEBUG: #04 pc 0037a15d /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so 12995-12995/? A/DEBUG: #05 pc 00396ffa /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so 12995-12995/? A/DEBUG: #06 pc 00410584 /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so 12995-12995/? A/DEBUG: #07 pc 000e6974 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+100) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) 12995-12995/? A/DEBUG: #08 pc 00078567 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) 292-292/? E/tombstoned: Tombstone written to: /data/tombstones/tombstone_08 ``` Resymbolized: ``` ********** Crash dump: ********** Build fingerprint: 'google/sdk_gphone_x86/generic_x86_arm:11/RSR1.201013.001/6903271:user/release-keys' #00 0x00000b99 [vdso] (__kernel_vsyscall+9) #01 0x0005ad68 /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) #02 0x0040889d /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so std::sys::unix::net::Socket::accept::_$u7b$$u7b$closure$u7d$$u7d$::h8af4c63055ba239c /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys/unix/net.rs:213:21 std::sys::unix::cvt_r::h13626704dd01d553 /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys/unix/mod.rs:218:19 std::sys::unix::net::Socket::accept::h19f0386128c718c0 /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys/unix/net.rs:212:26 std::sys_common::net::TcpListener::accept::h4dcde08bff8b84da /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys_common/net.rs:408:20 std::net::tcp::TcpListener::accept::hc8f12c940e8194bb /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/net/tcp.rs:757:9 #03 0x0037bbc1 /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so _$LT$hyper..net..HttpListener$u20$as$u20$hyper..net..NetworkListener$GT$::accept::h657e6e87bb7e51c0 /home/erb/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.10.16/src/net.rs:254:38 hyper::server::listener::spawn_with::_$u7b$$u7b$closure$u7d$$u7d$::h6a94fcb160c9308a /home/erb/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.10.16/src/server/listener.rs:49:19 #04 0x0037a15d /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so std::sys_common::backtrace::__rust_begin_short_backtrace::h1003f00a26524d37 /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys_common/backtrace.rs:125:18 #05 0x00396ffa /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h30c03f40a8e611bb /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/thread/mod.rs:474:17 _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::hf8962db957ded83e /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panic.rs:322:9 std::panicking::try::do_call::h2d3d6500d2987ef2 /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:379:40 std::panicking::try::h5782a27c260bd697 /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:343:19 std::panic::catch_unwind::h706bfc509365724f /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panic.rs:396:14 std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::h4b4fc8e7c10f7b67 /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/thread/mod.rs:473:30 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h959b51a0670da118 /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/core/src/ops/function.rs:227:5 #06 0x00410584 /data/app/~~WSIbTeGQX_bahgHHf0nRaw==/net.activitywatch.android.debug-vTyTnCCcYxYHqIjK5VmEKg==/lib/x86/libaw_server.so _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h227e7a319af154e8 /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/alloc/src/boxed.rs:1318:9 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h5feb52cc82688f6a /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/alloc/src/boxed.rs:1318:9 std::sys::unix::thread::Thread::new::thread_start::h15cea1674342ff1f /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys/unix/thread.rs:71:17 #07 0x000e6974 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+100) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) #08 0x00078567 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) Crash dump is completed ```
Better logs (after updating a bunch of stuff) ``` 2021-02-21 12:10:31.946 5923-5970/net.activitywatch.android.debug I/aw-server-rust: rocket::fairing::fairings: 1 response: CORS 2021-02-21 12:10:31.946 5923-5970/net.activitywatch.android.debug I/aw-server-rust: rocket::rocket: Rocket has launched from http://127.0.0.1:5600 2021-02-21 12:10:31.968 6033-6033/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 2021-02-21 12:10:31.972 6031-6031/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) --------- beginning of crash 2021-02-21 12:10:31.972 5923-6028/net.activitywatch.android.debug A/libc: Fatal signal 31 (SIGSYS), code -6 (SI_TKILL) in tid 6028 (AsyncTask #1), pid 5923 (h.android.debug) 2021-02-21 12:10:31.983 6038-6038/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 2021-02-21 12:10:31.985 6034-6034/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 2021-02-21 12:10:31.987 6040-6040/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 2021-02-21 12:10:31.991 5923-6013/net.activitywatch.android.debug I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es 2021-02-21 12:10:32.000 6044-6044/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default) 2021-02-21 12:10:32.018 6045-6045/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone 2021-02-21 12:10:32.018 281-281/? I/tombstoned: received crash request for pid 6028 2021-02-21 12:10:32.019 6045-6045/? I/crash_dump32: performing dump of process 5923 (target tid = 6028) 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86/generic_x86_arm:11/RSR1.201013.001/6903271:user/release-keys' 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: Revision: '0' 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: ABI: 'x86' 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: Timestamp: 2021-02-21 12:10:32+0100 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: pid: 5923, tid: 6028, name: AsyncTask #1 >>> net.activitywatch.android.debug <<< 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: uid: 10154 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: signal 31 (SIGSYS), code -6 (SI_TKILL), fault addr -------- 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: eax 0000016c ebx 00000089 ecx b7206f80 edx b7206f3c 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: edi eae5e3dc esi 00080000 2021-02-21 12:10:32.024 6045-6045/? A/DEBUG: ebp 00000081 esp b7206ee8 eip ebb6fb99 2021-02-21 12:10:32.027 5923-6013/net.activitywatch.android.debug W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device. 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: backtrace: 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #00 pc 00000b99 [vdso] (__kernel_vsyscall+9) 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #01 pc 0005ad68 /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #02 pc 0040889d /data/app/~~Q0hPVXZveUCaNV_1ZUDEAw==/net.activitywatch.android.debug-P4MFY5g6_CckdrcRtn6fiQ==/base.apk (offset 0xa1f000) (std::net::tcp::TcpListener::accept::hc8f12c940e8194bb+125) 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #03 pc 0037bbc1 /data/app/~~Q0hPVXZveUCaNV_1ZUDEAw==/net.activitywatch.android.debug-P4MFY5g6_CckdrcRtn6fiQ==/base.apk (offset 0xa1f000) (hyper::server::listener::spawn_with::_$u7b$$u7b$closure$u7d$$u7d$::h6a94fcb160c9308a+113) 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #04 pc 0037a15d /data/app/~~Q0hPVXZveUCaNV_1ZUDEAw==/net.activitywatch.android.debug-P4MFY5g6_CckdrcRtn6fiQ==/base.apk (offset 0xa1f000) (std::sys_common::backtrace::__rust_begin_short_backtrace::h1003f00a26524d37+93) 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #05 pc 00396ffa /data/app/~~Q0hPVXZveUCaNV_1ZUDEAw==/net.activitywatch.android.debug-P4MFY5g6_CckdrcRtn6fiQ==/base.apk (offset 0xa1f000) (core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h959b51a0670da118+218) 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #06 pc 00410584 /data/app/~~Q0hPVXZveUCaNV_1ZUDEAw==/net.activitywatch.android.debug-P4MFY5g6_CckdrcRtn6fiQ==/base.apk (offset 0xa1f000) (std::sys::unix::thread::Thread::new::thread_start::h15cea1674342ff1f+36) 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #07 pc 000e6974 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+100) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) 2021-02-21 12:10:32.034 6045-6045/? A/DEBUG: #08 pc 00078567 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: 6e3a0180fa6637b68c0d181c343e6806) ```

Looks like it can't listen to the port? But it's a bit weird because right before I see this in the logs:

I/aw-server-rust: rocket::rocket: Rocket has launched from http://127.0.0.1:5600

But maybe that's just a premature assumption that rocket has started listening?

I also noticed this happened right before the crash:

12984-12984/? A/crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib/libharfbuzz_ng.so in namespace (default)

From a quick search it looks like I might need to update the NDK. (edit: I did, but didn't make a difference it seems...)

eamon0989 commented 3 years ago

It's crashing for me on Android 11, I got it from the Play store, is there anything I can do to help? I assume a solution hasn't been found yet

ErikBjare commented 3 years ago

@eamon0989 Unfortunately I got stuck on this issue. I'm not quite sure what to do about it at this point, might ask on StackOverflow or similar to see if some Android NDK expert can chime in.

yshalsager commented 3 years ago

Installed today from play store and facing the same issue :(

ErikBjare commented 3 years ago

Weirdly enough, it works on my (and I think also @johan-bjareholt's) Android 11 phone (mine is Poco F3, so not-so-stock Android), so at least it isn't broken for all Android 11 phones...

It would be helpful if people could provide what Android 11 phones they have. That might help us figure out what the real discriminator is.

What we know so far: It doesn't work in the Android 11 emulator (and which phones?).

yshalsager commented 3 years ago

Weirdly enough, it works on my (and I think also @johan-bjareholt's) Android 11 phone (mine is Poco F3, so not-so-stock Android), so at least it isn't broken for all Android 11 phones...

It would be helpful if people could provide what Android 11 phones they have. That might help us figure out what the real discriminator is.

What we know so far: It doesn't work in the Android 11 emulator (and which phones?).

POCO X3 NFC (surya) running custom AOSP ROM (crdroid) here. I can grab logs if they are needed.

ErikBjare commented 3 years ago

@yshalsager I'm assuming you'll see the same logs as the one I posted above, but if you could confirm that is the case then that would give us some confidence in where the issue stems from :)

VladPetryshyn commented 3 years ago

Same error on Redmi Note 8t (SparkOs)

VladPetryshyn commented 3 years ago

Works on potato open source project and lineage os. Both on android 11

ErikBjare commented 3 months ago

Old issue, has since been fixed.