Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A sample app stops working after the 1st run #23374

Closed
lszl84 opened this issue Jul 1, 2024 · 16 comments
Closed

A sample app stops working after the 1st run #23374

lszl84 opened this issue Jul 1, 2024 · 16 comments
Labels
area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events platform/android 🤖 s/needs-info Issue needs more info from the author s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@lszl84
Copy link

lszl84 commented Jul 1, 2024

Description

Running a sample MAUI app on a physical Android 9 device works only the 1st time. Subsequent runs crash the app (when run from vscode) or hang the app (when run manually from home screen). Reinstalling does not help. Only cleaning with dotnet clean and rm -rf bin obj.

Steps to Reproduce

  1. dotnet new maui
  2. code .
  3. Select the physical Android device
  4. Run with F5
  5. Stop debugging
  6. F5 again - the app crashes immediately

When trying to run the app manually by touching the icon on the home screen, the app opens up but is stuck on the splash screen.

You can see the problem in this video: https://www.dropbox.com/scl/fi/75fkq7js992vulneyyic5/IMG_0235.MOV?rlkey=lcccgyyuvzsf6szzoi7eour0w&st=4vryubyv&dl=0

Device details:
HUAWEI M5 SHT-W09
EMUI version 9.1.0
Android version 9

Link to public reproduction project repository

No response

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 9

Did you find any workaround?

No

Relevant log output

07-01 11:37:23.547  1760  1863 D PG_DBS_MAIN: EVENT_DELAY_REMOVE_PKG_STATS, pkgName: com.companyname.mauisample, uid: 10157
07-01 11:37:25.644  1263  1306 D PackageManager: installPackageLI-> install derivePackageAbi case, pkg=Package{e73f390 com.companyname.mauisample}, primaryCpuAbi=arm64-v8a
07-01 11:37:25.655  1263  1306 D PackageManager: mFrozenPackages add package:com.companyname.mauisample
07-01 11:37:26.080   630 12730 W cutils  : Expected path /data/data/com.companyname.mauisample with owner 10158 mode 700 but found -1941885376 2610,to be fixed...
07-01 11:37:26.081   630 12730 W cutils  : path /data/data/com.companyname.mauisample fix completed
07-01 11:37:26.084   630 12730 W cutils  : Expected path /data/user_de/0/com.companyname.mauisample with owner 10158 mode 700 but found -1941885392 4005,to be fixed...
07-01 11:37:26.084   630 12730 W cutils  : path /data/user_de/0/com.companyname.mauisample fix completed
07-01 11:37:26.087  1263  1306 D PackageManager: mFrozenPackages remove package:com.companyname.mauisample
07-01 11:37:26.095  1263  1306 V BackupManagerService: restoreAtInstall pkg=com.companyname.mauisample token=2b restoreSet=0
07-01 11:37:26.096  1263  1306 W HwAppAuthManager: Cannot find pacakge : com.companyname.mauisample
07-01 11:37:26.097  1263  1306 W HwAppAuthManager: Cannot find pacakge : com.companyname.mauisample
07-01 11:37:26.101  1263  1306 V HwPackageManagerServiceEx: POST_INSTALL:  pkgName = com.companyname.mauisample, pkgUri = /data/app/vmdl1570322742.tmp;, pkgInstalledPath = /data/app/vmdl1570322742.tmp, pkgInstallerPackageName = , pkgVerName = 1.0, pkgVerCode = 1, resultCode = 1, pkgUpdate = false
07-01 11:37:26.114  1777  1777 D ImsResolver: maybeAddedImsService, packageName: com.companyname.mauisample
07-01 11:37:26.115  1760  2045 I hibernation: reInit  SystemCoreApps for install: com.companyname.mauisample
07-01 11:37:26.140   625  1291 D dubaid  : [SystemHandler.cpp] onPackageAddedMessage# Add uid: 10158, package: com.companyname.mauisample, version: 1.0
07-01 11:37:26.141  1685  2160 D XEngineProcessor: onPackageChanged, actionId: 1, pkgName:com.companyname.mauisample
07-01 11:37:26.141  1685  2160 D XEngineProcessor: handlePackageChanged  type = 1 packageName = com.companyname.mauisample
07-01 11:37:26.141  1685  2160 D DaemonMessageAdapter: onPackageChanged, actionId: 1, pkgName:com.companyname.mauisample
07-01 11:37:26.141  1685  2160 D Hicom_SysEnvMonitor: onPackageChanged, actionId: 1, pkgName:com.companyname.mauisample
07-01 11:37:26.141  1685  2160 D Hicom_PolicyCenterService: handlePackageAdded. pkgName: com.companyname.mauisample
07-01 11:37:26.157   645 14576 D AwareLog: processMsg_fn msg 601,fd 39,package name com.companyname.mauisample
07-01 11:37:26.157   645 14576 D         : gmr: processGameMsg fd 39,com.companyname.mauisample,29
07-01 11:37:26.158   645 14576 D         : gmr: getPackagePath Successfully path,com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==
07-01 11:37:26.187 20599 20599 I Finsky  : [1] kzf.f(9): AIM: AppInfoCacheUpdater -> invalidating apps: [com.companyname.mauisample]
07-01 11:37:26.197 20599 20639 I Finsky  : [1515] lau.a(55): AIM: AppInfoManager-Perf > OnDeviceAppInfo > cacheHitCount=0, cacheMissCount=1. Missed  in cache (limit 10) : [com.companyname.mauisample]
07-01 11:37:26.201   645 14582 D AwareLog: processMsg_fn msg 601,fd 39,package name com.companyname.mauisample
07-01 11:37:26.201   645 14582 D         : gmr: processGameMsg fd 39,com.companyname.mauisample,29
07-01 11:37:26.201   645 14582 D         : gmr: getPackagePath Successfully path,com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==
07-01 11:37:26.239  1263  1632 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.companyname.mauisample flg=0x4000010 (has extras) } to com.android.vending/com.google.android.finsky.packagemonitor.impl.PackageMonitorReceiverImpl$RegisteredReceiver
07-01 11:37:26.244  1263  1282 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.companyname.mauisample flg=0x4000010 (has extras) } to com.android.vending/com.google.android.finsky.packagemonitor.backgroundimpl.BackgroundPackageMonitorReceiverImpl$RegisteredReceiver
07-01 11:37:26.258  1263  3129 D SecurityProfileService: removeLabel:com.companyname.mauisample
07-01 11:37:26.266  1646  2035 W HSM_BG  : getSignaturesCode:package com.companyname.mauisample has no signatures.
07-01 11:37:26.268  1263  1279 I UKeyManagerService: app is added. The packageName is : com.companyname.mauisampleuid = 10158
07-01 11:37:26.268  1797  1797 I HwLauncher: Model onPackageAdded packageName = com.companyname.mauisample user = UserHandle{0}
07-01 11:37:26.274  1797  1797 I HwLauncher: Model findCloudAppInfoInDB : found 0 shortcutInfo for package[com.companyname.mauisample] in db
07-01 11:37:26.274  1797  1797 I HwLauncher: PowerSaveLauncherModel onPackageAdded packageName = com.companyname.mauisample user = UserHandle{0}
07-01 11:37:26.274  1797  1797 I HwLauncher: StreetModeLauncherModel onPackageAdded packageName = com.companyname.mauisample user = UserHandle{0}
07-01 11:37:26.276 20599 20631 I Finsky  : [1506] lau.a(55): AIM: AppInfoManager-Perf > OnDeviceAppInfo > cacheHitCount=0, cacheMissCount=1. Missed  in cache (limit 10) : [com.companyname.mauisample]
07-01 11:37:26.296  1797  1945 I HwLauncher: AllIdleAppsList addPackage: add new shortcut is {ShortcutInfo: title: maui-sample, component: ComponentInfo{com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity}}
07-01 11:37:26.313  1646  2034 W HSM_BG  : getSignaturesCode:package com.companyname.mauisample has no signatures.
07-01 11:37:26.344 20059 20278 D WorkSource: i1=1 i2=0 N1=1: insert 10156 com.companyname.mauisample
07-01 11:37:26.344 20059 20278 D WorkSource: Insert in WorkSource{10114 com.google.android.gms} @ 1 uid 10156 name com.companyname.mauisample
07-01 11:37:26.348 20094 14588 W GCM     : Unexpected forwarded intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.companyname.mauisample flg=0x4000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.PersistentIntentOperationService (has extras) }
07-01 11:37:26.353 20094 14604 W NetworkScheduler: Unexpected forwarded intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.companyname.mauisample flg=0x4000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.PersistentIntentOperationService (has extras) }
07-01 11:37:26.360 20094 14605 W GCM     : Unexpected forwarded intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.companyname.mauisample flg=0x4000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.PersistentIntentOperationService (has extras) }
07-01 11:37:26.361 20094 14355 W NetworkScheduler: Unexpected forwarded intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.companyname.mauisample flg=0x4000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.PersistentIntentOperationService (has extras) }
07-01 11:37:26.368  1869  1869 I HwGameAssistant-9.0.1.306-InstallPackageIntentReceiver: packagename=com.companyname.mauisample
07-01 11:37:26.372  3550  3550 I [HwRecSys]PackageRecevier: PackageReceiver: action is: android.intent.action.PACKAGE_ADDED, pkg:com.companyname.mauisample
07-01 11:37:26.379  1760  1863 D PG_DBS_MAIN: ID_PACKAGE_ADDED, pkgName: com.companyname.mauisample, uid: 10158
07-01 11:37:26.387  1760  2001 I AppInfoMgr: Write app info to db : com.companyname.mauisample type: -1
07-01 11:37:26.429  1263  7436 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.companyname.mauisample flg=0x4000010 (has extras) } to com.zhiliaoapp.musically/com.ss.android.common.applog.HotsoonReceiver
07-01 11:37:26.587  1760  1863 I ApplistMgr: Standby unprotected apps: [com.ebay.mobile, com.huawei.tips, com.android.systemui.feature_cover, com.android.gallery3d, com.microsoft.office.excel, com.google.android.apps.docs, com.gameloft.android.GloftDBMF, com.gameloft.android.GloftPDMF, com.gameloft.android.GloftANPH, com.huawei.gameassistant, com.google.android.videos, com.huawei.kidsmode.kidspaint, com.google.android.apps.maps, com.instagram.android, com.android.egg, com.huawei.android.tips, com.android.chrome, com.gameloft.android.GloftDMKF, com.netflix.mediaclient, com.android.storagemanager, com.huawei.android.totemweather, com.google.android.apps.photos, com.ebay.carrier, com.android.dreams.basic, com.facebook.katana, com.huawei.featurelayer.sharedfeature.map, com.gameloft.android.GloftSMIF, com.android.simappdialog, com.android.calculator2, com.google.android.music, com.android.hwmirror, com.huawei.compass, com.microsoft.office.word, com.booking, com.android.soundrecorder, com.netflix.partner.activation, com.microsoft.office.outlook, com.android.wallpaperbackup, com.microsoft.office.powerpoint, com.google.android.youtube, com.huawei.hidisk, com.google.android.gm, com.nordvpn.android, com.zhiliaoapp.musically, com.companyname.mauisample]
07-01 11:37:31.304  1760  1863 I ApplistMgr: mSmartOptimizeApps : [com.google.android.youtube, com.huawei.android.tips, com.huawei.kidsmode.kidspaint, com.huawei.android.totemweather, com.huawei.gameassistant, com.ebay.carrier, com.huawei.screenrecorder, com.netflix.partner.activation, com.huawei.kidsmode, com.microsoft.office.excel, com.huawei.KoBackup, com.android.simappdialog, com.huawei.tips, com.gameloft.android.GloftANPH, com.gameloft.android.GloftDBMF, com.gameloft.android.GloftDMKF, com.gameloft.android.GloftPDMF, com.gameloft.android.GloftSMIF, com.android.egg, com.instagram.android, com.google.android.gm, com.microsoft.office.outlook, com.google.android.music, com.huawei.featurelayer.sharedfeature.map, com.hicloud.android.clone, com.google.android.apps.docs, com.google.android.apps.maps, com.microsoft.office.word, com.microsoft.office.powerpoint, com.nordvpn.android, com.google.android.videos, com.netflix.mediaclient, com.android.systemui.feature_cover, com.zhiliaoapp.musically, com.google.android.apps.photos, com.huawei.compass, com.facebook.katana, com.companyname.mauisample, com.android.calculator2, com.booking, com.android.email, com.ebay.mobile, com.android.hwmirror]
07-01 11:37:48.839  1263  1632 I ActivityManager: Force stopping com.companyname.mauisample appid=10158 user=0: from pid 16126by app
07-01 11:37:48.860  1685  1685 I HwCoreAppHelperService: LocalReceiver receives:android.intent.action.PACKAGE_RESTARTED,pkg:com.companyname.mauisample,uid:10158
07-01 11:37:49.102  1263  1632 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 hwFlg=0x10 cmp=com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity} from uid 2000
07-01 11:37:49.107  1760  2045 I hibernation: front pkg : com.companyname.mauisample launcher: false
07-01 11:37:49.107  1760  2045 I hibernation: above launcher front pkgs: [com.companyname.mauisample]
07-01 11:37:49.111   645   726 D AwareLog: iawared: WorkingsetProcessCommand subCmd = 354, userId=10158, pid=0, com.companyname.mauisample
07-01 11:37:49.111   645   726 D AwareLog: iawared: WorkingsetSendPrereadMsg com.companyname.mauisample
07-01 11:37:49.111   645   726 D AwareLog: iawared: WorkingsetStart com.companyname.mauisample in monitor0
07-01 11:37:49.119  1263  1632 V WindowManager: addAppToken: AppWindowToken{30152cb token=Token{1b0a99a ActivityRecord{f24ee45 u0 com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity t92}}} controller={TaskWindowContainerController taskId=92} at 2147483647
07-01 11:37:49.127  1263  8251 V ActivityManager: startProcess: name=com.companyname.mauisample app=null knownToBeDead=true thread=null pid=-1
07-01 11:37:49.128  1263  8251 V ActivityManager: startProcess: name=com.companyname.mauisample app=ProcessRecord{8ffa0fd 0:com.companyname.mauisample/u0a158} knownToBeDead=true thread=null pid=0
07-01 11:37:49.133  1263  1362 V WindowManager: addWindow: Window{4fbadd8 u0 Splash Screen com.companyname.mauisample}
07-01 11:37:49.134   645   726 D AwareLog: iawared: WorkingsetProcessCommand subCmd = 354, userId=10158, pid=0, com.companyname.mauisample
07-01 11:37:49.134   645   726 D AwareLog: iawared: WorkingsetStart com.companyname.mauisample in monitor0
07-01 11:37:49.139  1263 16129 D HiTouch_PressGestureDetector: onAttached, package=com.companyname.mauisample, windowType=3, mHiTouchRestricted=false
07-01 11:37:49.151  1263  1285 I ActivityManager: Start proc 16130:com.companyname.mauisample/u0a158 for activity com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity
07-01 11:37:49.152   645   726 D AwareLog: iawared: WorkingsetProcessCommand subCmd = 350, userId=10158, pid=16130, com.companyname.mauisample
07-01 11:37:49.153   645   726 D AwareLog: iawared: WorkingsetStart com.companyname.mauisample in monitor0
07-01 11:37:49.227  1263  3129 W HwActivityManagerServiceEx: appSwitch from: com.huawei.android.launcher to: com.companyname.mauisample
07-01 11:37:49.227  1685  1704 D AssistantService-901302: registerHwActivityNotifier call fromPackage:com.huawei.android.launcher, toPackage:com.companyname.mauisample
07-01 11:37:49.227  1685  1704 D AssistantService-901302: getAppSDKType packageName:com.companyname.mauisample, type:0
07-01 11:37:49.228  1760  1863 D ScenarioService: front pkg : com.companyname.mauisample launcher: false
07-01 11:37:49.228  1760  1863 D ScenarioService: new above launcher front pkgs: [com.companyname.mauisample]
07-01 11:37:49.228  1760  1863 I AppManager: handleAppFrontEvent: com.companyname.mauisample
07-01 11:37:49.229  1760  1863 I AppsUsage: scnOff:false FgAPP:com.companyname.mauisample BgAPP:com.huawei.android.launcher
07-01 11:37:49.233  1685  2160 D Hicom_EmcomManagerService: forePackage name is com.companyname.mauisample
07-01 11:37:49.234  1685  2160 D XEngineProcessor: onForegroundAppChanged, pkgName:com.companyname.mauisample
07-01 11:37:49.234  1685  2160 D Hicom_SysEnvMonitor: onForegroundAppChanged, pkgName: com.companyname.mauisample
07-01 11:37:49.234  1685  2160 D XEngineMpipControl: onForegroundAppChanged, pkgName:com.companyname.mauisample
07-01 11:37:49.234  1263  1362 V WindowManager: Check opening app=AppWindowToken{30152cb token=Token{1b0a99a ActivityRecord{f24ee45 u0 com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity t92}}}: allDrawn=false startingDisplayed=true startingMoved=false isRelaunching()=false startingWindow=Window{4fbadd8 u0 Splash Screen com.companyname.mauisample}
07-01 11:37:49.234  1263  1283 D HiDATA_ContentAware: mForegroundAppPackageName: com.companyname.mauisample ,score: 0
07-01 11:37:49.234  1263  1283 D HiDATA  : APP type: -1 appName= com.companyname.mauisample
07-01 11:37:49.234  1263  1283 D HiDATA  : no game, APP_TYPE_GAME, appName =com.companyname.mauisample
07-01 11:37:49.239   620   685 D iTouchService: itouch currentPackageName=com.companyname.mauisample
07-01 11:37:49.239   620   685 D iTouchService: itouch getCurrentParmID tempPkg=com.companyname.xxx
07-01 11:37:49.239   620   685 D iTouchService: itouch:app com.companyname.mauisample is  not game app
07-01 11:37:49.241  1263  1283 I StatusBarDisable: setFlags what=0 which=1 pkg=Window{4fbadd8 u0 Splash Screen com.companyname.mauisample}
07-01 11:37:49.244  1760  2164 I PGServer: report state:10000 event type:1 pid:0 uid:0 pkg:com.companyname.mauisample to pid: 1760
07-01 11:37:49.244  1760  2164 I SceneReceiver: state type: 10000 eventType:1 pid:0 uid:0 pkg:com.companyname.mauisample
07-01 11:37:49.244  1760  2389 D HwThermalStateManager: current foreapp pkg : com.companyname.mauisample
07-01 11:37:49.248 16130 16145 I HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.companyname.mauisample#10158#256
07-01 11:37:49.249 16130 16145 I HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.companyname.mauisample#10158#0
07-01 11:37:49.250  1760  2164 I PGServer: report state:10000 event type:1 pid:0 uid:0 pkg:com.companyname.mauisample to pid: 1263
07-01 11:37:49.517  1263  1283 I StatusBarDisable: setFlags what=0 which=1 pkg=Window{4fbadd8 u0 Splash Screen com.companyname.mauisample}
07-01 11:37:49.523  1263  1283 I StatusBarDisable: setFlags what=0 which=1 pkg=Window{4fbadd8 u0 Splash Screen com.companyname.mauisample}
07-01 11:37:49.534  1263  1283 I StatusBarDisable: setFlags what=0 which=1 pkg=Window{4fbadd8 u0 Splash Screen com.companyname.mauisample}
07-01 11:37:49.536  1263  1283 I StatusBarDisable: setFlags what=0 which=1 pkg=Window{4fbadd8 u0 Splash Screen com.companyname.mauisample}
07-01 11:37:49.659 16130 16145 I AwareBitmapCacher: init processName:com.companyname.mauisample pid=16130 uid=10158
07-01 11:37:49.670 16130 16130 D debug-app-helper: Checking if libmonodroid was unpacked to /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64/libmonodroid.so
07-01 11:37:49.670 16130 16130 D debug-app-helper: Native libs extracted to /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64, assuming application/android:extractNativeLibs == true
07-01 11:37:49.670 16130 16130 D debug-app-helper: Added filesystem DSO lookup location: /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64
07-01 11:37:49.670 16130 16130 W debug-app-helper: Using runtime path: /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64
07-01 11:37:49.670 16130 16130 W debug-app-helper: checking directory: `/data/user/0/com.companyname.mauisample/files/.__override__/lib`
07-01 11:37:49.670 16130 16130 W debug-app-helper: directory does not exist: `/data/user/0/com.companyname.mauisample/files/.__override__/lib`
07-01 11:37:49.670 16130 16130 W debug-app-helper: Checking whether Mono runtime exists at: /data/user/0/com.companyname.mauisample/files/.__override__/libmonosgen-2.0.so
07-01 11:37:49.670 16130 16130 W debug-app-helper: Checking whether Mono runtime exists at: /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64/libmonosgen-2.0.so
07-01 11:37:49.670 16130 16130 I debug-app-helper: Mono runtime found at: /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64/libmonosgen-2.0.so
07-01 11:37:49.678 16130 16130 W monodroid: Creating public update directory: `/data/user/0/com.companyname.mauisample/files/.__override__`
07-01 11:37:50.740  1263  1632 I ActivityManager: Force stopping com.companyname.mauisample appid=10158 user=0: from pid 16159by app
07-01 11:37:50.742  1263  1632 I ActivityManager: Killing 16130:com.companyname.mauisample/u0a158 (adj 0): stop com.companyname.mauisamplefrom pid 16159by app
07-01 11:37:50.743  1263  1632 D ActivityManager: cleanUpApplicationRecord app: ProcessRecord{8ffa0fd 16130:com.companyname.mauisample/u0a158}, app.bad: false, restarting: false, allowRestart: true
07-01 11:37:50.747  1263  1632 V ActivityManager: startProcess: name=com.companyname.mauisample app=null knownToBeDead=true thread=null pid=-1
07-01 11:37:50.752  1263  1632 V ActivityManager: startProcess: name=com.companyname.mauisample app=ProcessRecord{5223d08 0:com.companyname.mauisample/u0a158} knownToBeDead=true thread=null pid=0
07-01 11:37:50.752   645   726 D AwareLog: iawared: WorkingsetProcessCommand subCmd = 354, userId=10158, pid=0, com.companyname.mauisample
07-01 11:37:50.761  1263  1632 I ActivityManager:   finishDisabledPackageActivitiesLocked Force finishing activity ActivityRecord{f24ee45 u0 com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity t92}
07-01 11:37:50.832  1263  1632 I ActivityManager:   finishDisabledPackageActivitiesLocked Force finishing activity ActivityRecord{f24ee45 u0 com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity t92 f}
07-01 11:37:50.832  1263  1632 W ActivityManager: Duplicate finish request for ActivityRecord{f24ee45 u0 com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity t92 f}
07-01 11:37:50.839  1263  1362 V WindowManager: removeIfPossible: Window{4fbadd8 u0 Splash Screen com.companyname.mauisample EXITING}
07-01 11:37:50.840  1263  1362 V WindowManager: Not removing Window{4fbadd8 u0 Splash Screen com.companyname.mauisample EXITING} due to exit animation
07-01 11:37:50.849  1263  1632 W HwActivityManagerServiceEx: setResumedActivityUncheckLocked start call, from: ActivityRecord{f24ee45 u0 com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity t92 f}, to: ActivityRecord{65bd2af u0 com.huawei.android.launcher/.unihome.UniHomeLauncher t1}
07-01 11:37:50.849  1263  1632 W HwActivityManagerServiceEx: appSwitch from: com.companyname.mauisample to: com.huawei.android.launcher
07-01 11:37:50.850  1685  1704 D AssistantService-901302: registerHwActivityNotifier call fromPackage:com.companyname.mauisample, toPackage:com.huawei.android.launcher
07-01 11:37:50.850  1685  1704 D AssistantService-901302: getAppSDKType packageName:com.companyname.mauisample, type:0
07-01 11:37:50.853  1760  1863 I AppsUsage: scnOff:false FgAPP:com.huawei.android.launcher BgAPP:com.companyname.mauisample
07-01 11:37:50.862  1263  1279 D UsageStatsService: LastForegroundedPackage com.companyname.mauisample is not moved to background, so let's report a backgroundEvent to compensate!
07-01 11:37:50.876  1760  2164 I PGServer: report state:10000 event type:2 pid:0 uid:0 pkg:com.companyname.mauisample to pid: 1760
07-01 11:37:50.876  1760  2164 I SceneReceiver: state type: 10000 eventType:2 pid:0 uid:0 pkg:com.companyname.mauisample
07-01 11:37:50.886  1760  2164 I PGServer: report state:10000 event type:2 pid:0 uid:0 pkg:com.companyname.mauisample to pid: 1263
07-01 11:37:50.889  1760  2391 D ThermalTrace_ThermalRaise: current pkg:com.companyname.mauisample
07-01 11:37:50.929  1263  1283 I StatusBarDisable: setFlags what=0 which=1 pkg=Window{4fbadd8 u0 Splash Screen com.companyname.mauisample EXITING}
07-01 11:37:50.932   620   685 D iTouchService: itouch currentPackageName=com.companyname.mauisample
07-01 11:37:50.932   620   685 D iTouchService: itouch getCurrentParmID tempPkg=com.companyname.xxx
07-01 11:37:50.932   620   685 D iTouchService: itouch:app com.companyname.mauisample is  not game app
07-01 11:37:50.947  1263  1285 I ActivityManager: Start proc 16162:com.companyname.mauisample/u0a158 for activity com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity
07-01 11:37:50.949   645   726 D AwareLog: iawared: WorkingsetProcessCommand subCmd = 357, userId=10158, pid=16130, com.companyname.mauisample
07-01 11:37:50.949   645   726 D AwareLog: iawared: WorkingsetPauseCollect com.companyname.mauisample
07-01 11:37:50.950   645   726 D AwareLog: iawared: WorkingsetProcessCommand subCmd = 350, userId=10158, pid=16162, com.companyname.mauisample
07-01 11:37:50.950   645   726 D AwareLog: iawared: WorkingsetStart com.companyname.mauisample in monitor0
07-01 11:37:50.978  1685  1685 I HwCoreAppHelperService: LocalReceiver receives:android.intent.action.PACKAGE_RESTARTED,pkg:com.companyname.mauisample,uid:10158
07-01 11:37:50.984  1797  2566 W ziparchive: Unable to open '/data/app/com.companyname.mauisample-itoDozWqDnTJNHgHBcE8-A==/base.apk': No such file or directory
07-01 11:37:50.984  1797  2566 E ndroid.launche: Failed to open APK '/data/app/com.companyname.mauisample-itoDozWqDnTJNHgHBcE8-A==/base.apk' I/O error
07-01 11:37:50.984  1797  2566 E ResourcesManager: failed to add asset path /data/app/com.companyname.mauisample-itoDozWqDnTJNHgHBcE8-A==/base.apk
07-01 11:37:50.984  1797  2566 W PackageManager: Failure retrieving resources for com.companyname.mauisample
07-01 11:37:51.073 16162 16177 I HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.companyname.mauisample#10158#256
07-01 11:37:51.074 16162 16177 I HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.companyname.mauisample#10158#0
07-01 11:37:51.156  1263  1362 V WindowManager: Exit animation finished in Window{4fbadd8 u0 Splash Screen com.companyname.mauisample EXITING}: remove=true
07-01 11:37:51.156  1263  1362 E WindowManager: win=Window{4fbadd8 u0 Splash Screen com.companyname.mauisample EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true
07-01 11:37:51.157  1263  1362 V WindowManager: postWindowRemoveCleanupLocked: Window{4fbadd8 u0 Splash Screen com.companyname.mauisample}
07-01 11:37:51.157  1263  1362 V WindowManager: Removing Window{4fbadd8 u0 Splash Screen com.companyname.mauisample} from AppWindowToken{30152cb token=Token{1b0a99a ActivityRecord{f24ee45 u0 com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity t92}}}
07-01 11:37:51.178  1263  1282 V WindowManager: removeAppToken: AppWindowToken{30152cb token=Token{1b0a99a ActivityRecord{f24ee45 u0 com.companyname.mauisample/crc64e0fdad38bbaed32e.MainActivity t92}}} delayed=false Callers=com.android.server.wm.DisplayContent.removeAppToken:1086 com.android.server.wm.AppWindowContainerController.removeContainer:315 com.android.server.am.ActivityRecord.removeWindowContainer:1201 com.android.server.am.ActivityStack.removeActivityFromHistoryLocked:4561
07-01 11:37:51.237  1263  1472 D HiDATA  : onForegroundAppWifiSleepChange: config:false, sleeptime:-1,type: -1, appname:com.companyname.mauisample
07-01 11:37:51.237  1263  1472 D HiDATA  : APP type: -1 appName= com.companyname.mauisample
07-01 11:37:51.238  1263  1472 D HiDATA  : no game, APP_TYPE_GAME, appName =com.companyname.mauisample
07-01 11:37:51.469 16162 16177 I AwareBitmapCacher: init processName:com.companyname.mauisample pid=16162 uid=10158
07-01 11:37:51.486 16162 16162 D debug-app-helper: Checking if libmonodroid was unpacked to /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64/libmonodroid.so
07-01 11:37:51.486 16162 16162 D debug-app-helper: Native libs extracted to /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64, assuming application/android:extractNativeLibs == true
07-01 11:37:51.486 16162 16162 D debug-app-helper: Added filesystem DSO lookup location: /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64
07-01 11:37:51.486 16162 16162 W debug-app-helper: Using runtime path: /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64
07-01 11:37:51.486 16162 16162 W debug-app-helper: checking directory: `/data/user/0/com.companyname.mauisample/files/.__override__/lib`
07-01 11:37:51.486 16162 16162 W debug-app-helper: directory does not exist: `/data/user/0/com.companyname.mauisample/files/.__override__/lib`
07-01 11:37:51.486 16162 16162 W debug-app-helper: Checking whether Mono runtime exists at: /data/user/0/com.companyname.mauisample/files/.__override__/libmonosgen-2.0.so
07-01 11:37:51.486 16162 16162 W debug-app-helper: Checking whether Mono runtime exists at: /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64/libmonosgen-2.0.so
07-01 11:37:51.487 16162 16162 I debug-app-helper: Mono runtime found at: /data/app/com.companyname.mauisample-8JBD6h9luTb09emEyhuDHw==/lib/arm64/libmonosgen-2.0.so
07-01 11:37:51.495 16162 16162 W monodroid: Creating public update directory: `/data/user/0/com.companyname.mauisample/files/.__override__`
07-01 11:38:00.951   645   726 D AwareLog: iawared: WorkingsetProcessCommand subCmd = 353, userId=10158, pid=16162, com.companyname.mauisample
07-01 11:38:00.954   645   726 D AwareLog: iawared: WorkingsetAbort com.companyname.mauisample
@lszl84 lszl84 added the t/bug Something isn't working label Jul 1, 2024
Copy link
Contributor

github-actions bot commented Jul 1, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jfversluis jfversluis changed the title A sample app stops working after the 1st run [INSANE] A sample app stops working after the 1st run Jul 1, 2024
@jfversluis
Copy link
Member

Thanks for adding the log! Just to be clear, from which run is this log? I would be very curious about some logcat from when you try to restart the app and it crashes and see what is in there. Is that this log? If not, could you get that and add it please?

I have never seen this happening myself. @jonathanpeppers ?

@jfversluis jfversluis added platform/android 🤖 area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events s/needs-info Issue needs more info from the author labels Jul 1, 2024
@lszl84
Copy link
Author

lszl84 commented Jul 1, 2024

@jfversluis yes, this is the log from step 6: hit F5 to run the app again - the app crashes

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Jul 1, 2024
@jonathanpeppers
Copy link
Member

You can enable more logging with:

# clear the log
adb logcat -c
# enable extra logging
adb shell setprop debug.mono.log default,debugger,assembly,mono_log_level=debug,mono_log_mask=all
# cause the crash
# save the log & share the file here:
adb logcat -d > log.txt

Then the app should print out more info? Usually, it should print out some message that says why it exited.

@mattleibow
Copy link
Member

I see this in the logs:

07-01 11:37:50.984  1797  2566 W ziparchive: Unable to open '/data/app/com.companyname.mauisample-itoDozWqDnTJNHgHBcE8-A==/base.apk': No such file or directory
07-01 11:37:50.984  1797  2566 E ndroid.launche: Failed to open APK '/data/app/com.companyname.mauisample-itoDozWqDnTJNHgHBcE8-A==/base.apk' I/O error
07-01 11:37:50.984  1797  2566 E ResourcesManager: failed to add asset path /data/app/com.companyname.mauisample-itoDozWqDnTJNHgHBcE8-A==/base.apk
07-01 11:37:50.984  1797  2566 W PackageManager: Failure retrieving resources for com.companyname.mauisample

@jonathanpeppers
Copy link
Member

That sounds like adb install partially failed and Android can't open the app.

Is the device close to disk space full? Can you factory reset it?

If it's an emulator, try deleting and recreating it.

@lszl84
Copy link
Author

lszl84 commented Jul 1, 2024

This is a physical device, not an emulator - see the bug description.

The device has around 100GB of free storage. Native Android apps run from Android Studio work without problems. The same goes for Flutter apps.

Attached is the log with mono debugging enabled.

log.txt

@jonathanpeppers
Copy link
Member

@lszl84 it sounds more like "something went wrong installing this one app"

Unrelated to what app framework you were using, did you already try manually uninstalling the app?

@lszl84
Copy link
Author

lszl84 commented Jul 1, 2024

Yes, I manuall uninstalled the app before re-running it from VSCode and capturing the logs.

@jonathanpeppers
Copy link
Member

jonathanpeppers commented Jul 1, 2024

So, let's try one more thing, and save a binary build log: https://aka.ms/binlog

  • Uninstall the app, delete bin/obj folders
  • Deploy command-line dotnet build -f net8.0-android -t:Run -bl -p:_FastDeploymentDiagnosticLogging=true
  • Share the msbuild.binlog file here

Thanks.

@lszl84
Copy link
Author

lszl84 commented Jul 1, 2024

Interestingly, everything seems to work well when running the app with the command you provided.

Can it be a VSCode/MAUI extension issue?

binlogs.zip

@jonathanpeppers
Copy link
Member

It looks like there isn't a way to save a log like this inside VS Code yet:

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 2, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio Code(1.90.2). Can be reproduced on Android(11) device platform.

@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@jfversluis
Copy link
Member

Can you confirm is this is still an issue for you with more recent versions? Did you uncover more information?

@jfversluis jfversluis added s/needs-info Issue needs more info from the author and removed s/needs-attention Issue has more information and needs another look labels Oct 2, 2024
Copy link
Contributor

Hi @lszl84. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@dotnet-policy-service dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label Oct 7, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2024
@dotnet-policy-service dotnet-policy-service bot removed the s/no-recent-activity Issue has had no recent activity label Nov 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events platform/android 🤖 s/needs-info Issue needs more info from the author s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants