Android Preview fails

Hello!

I’m all new to Fuse, and this evening I tried to compile an example (AttractorMinimal). Before I could compile and do an android preview, Fuse informed me that I didn’t have Android SDK installed. I did the “fuse install android” thing, but it seemed to struggle a bit when trying to download and install some parts:

JDK and Android SDK downloaded and installed fine, Android NDK and Ant, however did not. I manually downloaded the NDK (from http://dl.google.com/android/ndk/android-ndk-r10d-windows-x86.exe) and Ant (from http://www-us.apache.org/dist//ant/binaries/apache-ant-1.9.7-bin.zip) and gave the installer the paths, which worked fine.

Running “fuse install -s android” now gave me “android is installed”. Woo, all is good…?

I then ran another android preview, but after reaching “Building Android app” this error occured: “FATAL ERROR: System.AggregateException: One or more errors occurred. —> System.InvalidOperationException: Cannot load Counter Name data because an invalid index ‘’ was read from the registry” Full stacktrace: http://pastebin.com/bQi1re0W

Local preview works fine, of course. What is happening here? Did stuff go wrong during the installation of Android, even though it found everything and seems to be happy?

I’m using Windows 10 Home.

Hey Mia,

Just to check: which version of Fuse are you using? (fuse --version in terminal or just check the dock icon).

(PS: the problem with installing Ant is on us! We were using hardcoded links for the auto-downloader which is of course a super no-no and will be fixed in an upcoming release – happy to hear you dug up the files yourself though :slight_smile:

I downloaded Fuse yesterday, so I guess it’s the current version (0.12)? I of course can double check this when I get home from work.

It turns out that this is a bug in Fuse. We’ll get a hotfix out asap.

Thanks! Eagerly awaiting the hotfix :slight_smile:

Just an update:

The issue with fuse install android is fixed in 0.12.1 which was released earlier today. If anyone is still seeing this issue, please check that you are on the latest version.

The Android preview crash is unrelated, and unfortunately not yet fixed. Mia has now downgraded to 0.11.1, which doesn’t have the issue. We’re working on getting it solved.

The Android preview crash is now also solved, and the fix will ship shortly, it was due to us not handling a corrupt registry robustly.

Hi Anders,

I have had the same Android preview problem as mia for the last version and waited for the fixed version. Once released, I updated to Fuse’s latest version (0.12.2 (build 6312)) since this morning. Just now I tried running Android preview again but the issue still persists.

Note: I have ran uno clean already and tried it with some fuse examples.

Here is the fatal error log.

Unexpected fatal error! Please report this to us.
Build started: FullCompile
Configuring (8.33s)
Compiling syntax tree (16.08s)
Generating code and data (86.56s)
Building Android app (0.77s)

FATAL ERROR: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: Access is denied
   at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.GetProcessTimes()
   at System.Diagnostics.Process.get_StartTime()
   at Uno.Diagnostics.ProcessExtensions.<>cDisplayClass1_0.<GetParent>b0(Process p) in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\ProcessExtensions.cs:line 43
   at System.Linq.Enumerable.FirstOrDefaultTSource
   at Uno.Diagnostics.ProcessExtensions.GetParent(Process process) in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\ProcessExtensions.cs:line 43
   at Uno.Diagnostics.ProcessExtensions.GetParents(Process process) in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\ProcessExtensions.cs:line 53
   at Uno.Diagnostics.Shell.InitTimer() in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\Shell.cs:line 204
   at Uno.Diagnostics.Shell.CreateProcess(String filename, String args) in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\Shell.cs:line 168
   at Uno.Diagnostics.Shell.<Run>d8.MoveNext() in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\Shell.cs:line 82
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Uno.Diagnostics.Shell.<Run>d7.MoveNext() in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\Shell.cs:line 52
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task1.get_Result()
   at Uno.Build.BuildTarget.Build(BuildContext context) in C:\BuildAgent-1\work\397767071b813b09\Source\Engine\Uno.Build\BuildTarget.cs:line 52
   at Uno.Build.ProjectBuilder.Build(Project project) in C:\BuildAgent-1\work\397767071b813b09\Source\Engine\Uno.Build\ProjectBuilder.cs:line 215
---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): Access is denied
   at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.GetProcessTimes()
   at System.Diagnostics.Process.get_StartTime()
   at Uno.Diagnostics.ProcessExtensions.<>cDisplayClass1_0.<GetParent>b0(Process p) in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\ProcessExtensions.cs:line 43
   at System.Linq.Enumerable.FirstOrDefaultTSource
   at Uno.Diagnostics.ProcessExtensions.GetParent(Process process) in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\ProcessExtensions.cs:line 43
   at Uno.Diagnostics.ProcessExtensions.GetParents(Process process) in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\ProcessExtensions.cs:line 53
   at Uno.Diagnostics.Shell.InitTimer() in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\Shell.cs:line 204
   at Uno.Diagnostics.Shell.CreateProcess(String filename, String args) in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\Shell.cs:line 168
   at Uno.Diagnostics.Shell.<Run>d8.MoveNext() in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\Shell.cs:line 82
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerSer

   vices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Uno.Diagnostics.Shell.<Run>d7.MoveNext() in C:\BuildAgent-1\work\397767071b813b09\Source\Common\Uno.Common\Diagnostics\Shell.cs:line 52<---

Build ended
fuse: Failed to compile project

Please take a look.

Thanks,

Elizabeth

Hi Elizabeth,

This issue does indeed look related to Mia’s issue, but it’s slightly different. It’s from the same area in our code base though, which also was changed recently. I’ll get someone to look at this.

Are you on the community Slack by the way, and if so, what’s your nick?

Hi Anders.

Thank you for getting back to me. I ran Android Preview again today and my issue has somehow seems to be resolved now. I think it has something to do with me restarting my computer and device.

Anyhow, I am getting a lot of unknown build traces when I run the Android Preview, that makes me worry about my app internally. I have posted my concern in another thread to keep the forum clean and help others: https://www.fusetools.com/community/forums/general/numerous_unknown_android_preview_errors.

It would be great if you could post for your team!

*Yes, I have joined the Slack Community! Nick: @elizabeth1688

Cheers,

Elizabeth

Good to hear that you got it working!

The Android logs tend to be a bit noisy, and there’s probably no reason to worry. I’ll get someone with more detailed knowledge to have a look at that thread however.