Open lszl84 opened 3 months ago
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!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
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 yes, this is the log from step 6: hit F5 to run the app again - the app crashes
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.
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
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.
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.
@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?
Yes, I manuall uninstalled the app before re-running it from VSCode and capturing the logs.
So, let's try one more thing, and save a binary build log: https://aka.ms/binlog
bin
/obj
foldersdotnet build -f net8.0-android -t:Run -bl -p:_FastDeploymentDiagnosticLogging=true
msbuild.binlog
file hereThanks.
Interestingly, everything seems to work well when running the app with the command you provided.
Can it be a VSCode/MAUI extension issue?
It looks like there isn't a way to save a log like this inside VS Code yet:
This issue has been verified using Visual Studio Code(1.90.2). Can be reproduced on Android(11) device platform.
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
andrm -rf bin obj
.Steps to Reproduce
dotnet new maui
code .
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