App won't run or preview on Oreo Pixel XL


#1

Fuse seems to have an issue with Android Oreo. Was modifying code in the app start up phase and just spent a few hours trying to debug an Android app that wouldn’t start. Eventually rolled back to an old build with same result. Tried a phone running Nougat and it worked fine.

FYI: I changed the package name at one point so one of the stack traces shows a brief name - I was wondering if there was a problem with the package name. Desperate times :wink:

When trying a preview app on Android Oreo I get this from the command line

MattMac:NDSDriverTracker matt$ fuse preview -t=android
Fuse 1.2.1 (build 13974)
Configuring (1.1 s)
Compiling syntax tree (2.7 s)
Generating code and data (8.9 s)
Building Android app
2/2: NDSDriverTracker.apk
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
(23.0 s)

Build completed in 35.70 seconds
Installing APK on 1 device(s)
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: com.lineten.nds
	at com.android.server.pm.Settings.isOrphaned(Settings.java:4400)
	at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:21369)
	at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:18443)
	at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:913)
	at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:912)
	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:134)
	at android.os.ShellCommand.exec(ShellCommand.java:96)
	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21668)
	at android.os.Binder.shellCommand(Binder.java:573)
	at android.os.Binder.onTransact(Binder.java:473)
	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2642)
	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3485)
	at android.os.Binder.execTransact(Binder.java:674)

ERROR: Process has exited, so the requested information is not available. (pass --trace for stack trace)
fuse: Android run failed

This is the logcat of one of the crashes I got

09-08 13:52:21.806 10820 10820 E NDSDriverTracker: Uno.NullReferenceException: Object reference was null
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Uno.Collections.List`1.AddRange(Uno.Collections.IEnumerable<T>)
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Fuse.Internal.AndroidSystemFont.GetFallback(Uno.UX.FileSource)
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Fuse.Internal.SystemFont.GetFallback(Uno.UX.FileSource)
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Fuse.Font..ctor(Uno.UX.FileSource)
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Outracks.Simulator.Runtime.TryInvokeExtension.TryInvoke(Uno.Reflection.IFunction,object,object[])
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Outracks.Simulator.Runtime.NativeReflection.CallStatic(Outracks.Simulator.Bytecode.TypeName,Outracks.Simulator.Bytecode.TypeMemberName,object[])
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Outracks.Simulator.Runtime.NativeReflection.Instantiate(Outracks.Simulator.Bytecode.TypeName,object[])
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Outracks.Simulator.Bytecode.Instantiate)
09-08 13:52:21.806 10820 10820 E NDSDriverTracker:    at Outracks.Simulator.Bytecode.Expression.Match`1(Uno.Func<Outracks.Simulator.Bytecode.ReadVariable, T>,Uno.Func<Outracks.Simulator.Bytecode.Literal, T>,Uno.Func<Outracks.Simulator.Bytecode.Lambda, T>,Uno.Func<Outracks.Simulator.Bytecode.MethodGroup, T>,Uno.Func<O
09-08 13:52:21.832 10905 11040 I FirebaseCrash: Sending crashes

When I try and run a release build I get this

09-08 13:57:09.864   939   954 I ActivityManager: Start proc 11596:com.lineten.nds.xencouriers/u0a238 for activity com.lineten.nds.xencouriers/.NDSDriverTracker
09-08 13:57:09.955 11596 11596 D NDSDriverTracker: SDK: 26
09-08 13:57:09.998 11596 11596 I Adreno  : QUALCOMM build                   : 7142022, Ib5823dd10c
09-08 13:57:09.998 11596 11596 I Adreno  : Build Date                       : 06/23/17
09-08 13:57:09.998 11596 11596 I Adreno  : OpenGL ES Shader Compiler Version: EV031.18.00.00
09-08 13:57:09.998 11596 11596 I Adreno  : Local Branch                     : O11A
09-08 13:57:09.998 11596 11596 I Adreno  : Remote Branch                    : 
09-08 13:57:09.998 11596 11596 I Adreno  : Remote Branch                    : 
09-08 13:57:09.998 11596 11596 I Adreno  : Reconstruct Branch               : 
09-08 13:57:10.003 11596 11596 I Adreno  : PFP: 0x005ff087, ME: 0x005ff063
09-08 13:57:10.004   939  1168 W AppOps  : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
09-08 13:57:10.106 11596 11596 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 11596 (nds.xencouriers)
09-08 13:57:10.147 11616 11616 I crash_dump32: obtaining output fd from tombstoned
09-08 13:57:10.148   721   721 I /system/bin/tombstoned: received crash request for pid 11596
09-08 13:57:10.151 11616 11616 I crash_dump32: performing dump of process 11596 (target tid = 11596)
09-08 13:57:10.151 11616 11616 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-08 13:57:10.151 11616 11616 F DEBUG   : Build fingerprint: 'google/marlin/marlin:8.0.0/OPR6.170623.012/4283428:user/release-keys'
09-08 13:57:10.151 11616 11616 F DEBUG   : Revision: '0'
09-08 13:57:10.152 11616 11616 F DEBUG   : ABI: 'arm'
09-08 13:57:10.152 11616 11616 F DEBUG   : pid: 11596, tid: 11596, name: nds.xencouriers  >>> com.lineten.nds.xencouriers <<<
09-08 13:57:10.152 11616 11616 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
09-08 13:57:10.152 11616 11616 F DEBUG   :     r0 00000000  r1 00002d4c  r2 00000006  r3 00000008
09-08 13:57:10.152 11616 11616 F DEBUG   :     r4 00002d4c  r5 00002d4c  r6 ff97d9f8  r7 0000010c
09-08 13:57:10.152 11616 11616 F DEBUG   :     r8 cad5df70  r9 cbed18e4  sl 00000000  fp ff97de54
09-08 13:57:10.152 11616 11616 F DEBUG   :     ip 00000000  sp ff97d9e8  lr e9e9d537  pc e9ecdc0c  cpsr 200f0010
09-08 13:57:10.157 11616 11616 F DEBUG   : 
09-08 13:57:10.157 11616 11616 F DEBUG   : backtrace:
09-08 13:57:10.157 11616 11616 F DEBUG   :     #00 pc 0004ac0c  /system/lib/libc.so (tgkill+12)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #01 pc 0001a533  /system/lib/libc.so (abort+54)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #02 pc 00050f5b  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libgnustl_shared.so (_ZN9__gnu_cxx27__verbose_terminate_handlerEv+226)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #03 pc 0004f8ed  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libgnustl_shared.so (_ZN10__cxxabiv111__terminateEPFvvE+4)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #04 pc 0004f961  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libgnustl_shared.so (_ZSt9terminatev+8)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #05 pc 0004fbbd  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libgnustl_shared.so (__cxa_throw+120)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #06 pc 0032be05  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN10uThrowable18ThrowNullReferenceEPKci+68)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #07 pc 0032d81d  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_Z4uPtrIP7uObjectET_RKS2_+28)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #08 pc 003a1b29  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN1g3Uno11Collections4List8AddRangeEP7uObject+200)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #09 pc 004948e3  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN1g4Fuse8Internal17AndroidSystemFont11GetFallbackEPNS_3Uno2UX10FileSourceE+78)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #10 pc 004a40cd  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN1g4Fuse8Internal10SystemFont11GetFallbackEPNS_3Uno2UX10FileSourceE+12)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #11 pc 0043529d  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN1g4Fuse4Font6ctor_1EPNS_3Uno2UX10FileSourceE+24)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #12 pc 004353bb  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN1g4Fuse4Font4New2EPNS_3Uno2UX10FileSourceE+24)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #13 pc 0035aa15  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so
09-08 13:57:10.157 11616 11616 F DEBUG   :     #14 pc 0032c30d  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN5uType4InitEv+328)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #15 pc 00329bd1  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so
09-08 13:57:10.157 11616 11616 F DEBUG   :     #16 pc 00329b79  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_Z4uNewP5uType+50)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #17 pc 0035b00f  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN1g8MainView4New1Ev+10)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #18 pc 00328b1b  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_Z9uStartAppv+6)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #19 pc 003d79d7  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (_ZN1g3Uno8Platform7CoreApp5StartEv+62)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #20 pc 003311cb  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/lib/arm/libNDSDriverTracker.so (cppOnCreate+58)
09-08 13:57:10.157 11616 11616 F DEBUG   :     #21 pc 00015f91  /data/app/com.lineten.nds.xencouriers-upCTvxjiNtfJSVLx-HL8hw==/oat/arm/base.odex (offset 0x10000)
09-08 13:57:10.492   721   721 E /system/bin/tombstoned: Tombstone written to: /data/tombstones//tombstone_09
09-08 13:57:10.494   939 11617 W ActivityManager:   Force finishing activity com.lineten.nds.xencouriers/.NDSDriverTracker
09-08 13:57:10.495   939   972 I BootReceiver: Copying /data/tombstones/tombstone_09 to DropBox (SYSTEM_TOMBSTONE)
09-08 13:57:10.501   939   964 I ActivityManager: Showing crash dialog for package com.lineten.nds.xencouriers u0
09-08 13:57:10.503   670   670 E lowmemorykiller: Error writing /proc/11596/oom_score_adj; errno=22
09-08 13:57:10.509   939 14803 I ActivityManager: Process com.lineten.nds.xencouriers (pid 11596) has died: vis  +99TOP 
0

#2

Thankyou Matt,

I’ll get back to you as soon as I have some news. Realistically this will be Monday as we are fast running out of Friday.


#3

Hi again Matt,
So far I have reproduced the java.lang.IllegalArgumentException: Unknown package: issue so I will focus on that first.

So at first I get the same issue. I seem to be able to get it to work by running uno clean && fuse build -tandroid -cdebug -d and then running it from Android Studio. Which is strange is that after this I can build it from the command like (and the Fuse designer) without issue.

Whilst I dig into what that could be would you mind trying out browsing to the directory containing your unoproj file and running:

uno clean && fuse build -tandroid -cdebug -d

You will be asked to convert the project by Android Studio and you should accept that.

My guess is that whatever that convert step does is solving the issue, and that once the app is installed once re-installs have some more lenient process. This theory is supported by the fact that if I uninstall the app the original problem is restored.

More details coming as they are uncovered :slight_smile:


#4

Thanks.

Didn’t seem to make a difference but I’m updating everything to make sure I’m not running old versions anywhere and I’ll try again.


#5

That would be good data. I’m also testing a vert simple example app so there are potentially other issues as well. But this first one will be enough of a blocker for many that I’d like to kill it first. We’ll see how that goes today.


#6

Gah I’m a dummy. I should have read the logs better. The issue is on uninstall, which means that the most recent android versions have got stricter. Previously requesting the uninstall of a package that didnt exist failed silently, now it throws an exception.

I’ll get this fixed asap and then we can start testing more complicated projects


#7

:slight_smile: When I load the project into Android Studio this is the error I get.

file


#8

One bug down. Bigger project time


#9

weird that looks like what happens when the build directory is moved. Would you mind sending up a zip of your fuse project? We have this dropbox for sending us projects https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK this would let me test your exact code which should resolve your issue faster


#10

If it helps I don’t mind privately sharing this project.


#11

haha you beat me too it. Thanks, that will be helpful


#12

uploading now


#13

Minimal test case:

<App>
	<Font File="Roboto-Regular.ttf" ux:Global="Regular" />
	<Panel Height="10%" Color="#0008" Alignment="Bottom">
		<Text Value="Foo" Font="Regular" Margin="20" TextColor="#fff" Alignment="Center" />
	</Panel>
</App>

This crashes on Android Oreo. I’ve tested with different font files but this is clearly just related to Uno. I’ll raise a ticket for this internally and get back to you with news as we progress.

The simplest ‘gotta get some work done’ hack for now is to not use fonts. That will at least let you test functionality on the device. This is high priority to us though so I expect some real solution for this soon.


#14

Superb, thank you.


#15

Issue found. We assume a default system font being known at a certain point in our font code and it freaks out if it is null.

I’ve put in a PR handling this and it looks like something that should be trivial to get merged.

Thanks for the all the help in tracking this down. It’s good to see your app happily running on our Nexus 5X


#16

Hi there,

We are currently running into what I assume to be this issue as well. Using custom fonts on an existing app, but crashes on Oreo - release & preview.

Is there a Fuse release coming soon for this issue? We’re unable to get our existing apps to work on Oreo as it stands now.

Thanks!!


#17

Yeah, I just sent a PR that fixes the issue for me. Hopefully, this is the end of the story.


#18

Hi Chris, I’ve been encountering a very similar issue with Android 8.1. The app won’t just run. Where do I send you the error log files?

Update: After few retries today the app started working fine. So I assume it was something a temporary glitch.


#19

@Garry Joshi: since the originally reported issue was likely already fixed, you might be facing an entirely different issue even if it looks the same.

Please make a new forum post with all the relevant details.