Forum Xamarin.Forms

[UWP] Excep_FromHResult 0x8007007E

leeyoleeyo USMember ✭✭

Hello,

I'm having troubles to deploy my app on some UWP devices. It works as it should on computers that have Visual Studio installed on it but fails on the other ones.

What I did :

  • I turned "Dev mode" on (because I'm using a non-signed test deployment)
  • I installed "build joined" dependencies (Microsoft.NET.Native.Framework.1.7, Microsoft.NET.Native.Runtime.1.7, Microsoft.VCLibs.x64.14.00)

What seems to go wrong :

  • At launch, app loads some packages like SQLite and it obviously causes no trouble
  • After login, every other packages are loaded (ZXing, Skiasharp, Splat, Newtonsoft.Json, PCLStorage, ...) and it seems to be the reason that causes the "0x8007007E" exception, but I couldn't figure out why it does and I don't even know how to identify the problem

When I search about the famous "0x8007007E" exception on Google, much people are talking about SQLite causing it, but I guess it's not the case for my app as this package is loaded at launch and will not cause any trouble.

Thanks for you help/advices.

Posts

  • leeyoleeyo USMember ✭✭

    Hello,

    I just figured out it was caused by Xam.Plugin.SimpleAudioPlayer after commenting each packages call blocks, one by one.

    @Adrian.Stevens if you've got an idea, it would be really appreciated.

    Thanks.

  • Adrian.StevensAdrian.Stevens USXamarin Team, University, XamUProfessors, Developer Group Leader Xamurai

    Strange, off the top of my head I don't have any ideas. I have used SimpleAudioPlayer on UWP IOT devices successfully but I haven't specifically tried it on a Windows 10 desktop without Visual Studio.

    I'll test it today and report back.

  • JohnHardmanJohnHardman GBUniversity mod
    edited August 2017

    @leeyo - Are you running a debug build on the machines with Visual Studio and a release build on the other machines?

    The HRESULT you mentioned is basically module not found.

    As you mentioned "After login", I will assume that means your code got past Forms.Init.

    If you add an UnhandledException handler to your UWP app.xaml.cs, does it give you details of which module failed to load?
    Alternatively, if runnning on a desktop, does eventvwr provide any information about which module failed to load?
    I've never tried it on a UWP app, but I wonder if SysInternals procmon can be used to identify what is failing to load (it may be that it cannot do UWP apps).
    Similarly, it might be worth firing up DependencyWalker, but again I don't know if it would work on a UWP app.
    Do you have Xamarin.Insights, HockeyApp or Mobile Center integrated with your app. If so, do they provide any details?

  • leeyoleeyo USMember ✭✭

    @Adrian.Stevens I guess some dependencies are installed through Visual Studio installer but ain't available on a clean Windows 10 installation... :open_mouth:

    @JohnHardman I'm running the same release build on both of them. The failing one is a Zotac btw, I couldn't find any desktop with UWP "on" and VS "off" around me, but I don't think it would matter. I even went to install a codec pack on Zotac to be sure it wasn't an issue of that kind.

    At the moment, app runs well as I've commented every calls to the SimpleAudioPlayer. The global call from PCL was already in a try/catch, catching a basic « Exception », so I could see the "module not found" error but there was no precision about the module/dll name.

    I don't have any of these packages integrated... :-/

    By the way I'm using "Xamarin.Forms.Forms.Init(e, assembliesToInclude)" in app.xaml.cs, it was needed for Oxyplot modules. Do you think I should try to add SimpleAudioPlayer there somehow ?

    Thanks for help !

  • JohnHardmanJohnHardman GBUniversity mod

    @leeyo - Some of us pressed Xamarin in another thread to provide some guidance about how to identify which assemblies to include in the second parameter of Forms.Init . Unfortunately, we never got a satisfactory answer. Ideally, there should be something along the lines of DependencyWalker provided as part of the Xamarin installation in order to identify (as far as possible) all assemblies referenced by an app. One day perhaps...

    It would not hurt to add SimpleAudioPlayer to the collection of assemblies passed to Forms.Init, but there's no guarantee that it would solve your current problem.

    I've just had a look in eventvwr on my PC. It does show some information from UWP apps. If you start eventvwr (Event Viewer) and navigate to Event Viewer (Local) > Windows Logs > Application, then search for your app name, you will hopefully glean some useful information.

  • leeyoleeyo USMember ✭✭
    edited August 2017

    @Adrian.Stevens @JohnHardman Today I noticed that Zotac was running a "N" version of Windows, so I'm wondering if it won't cause the troubles with SimpleAudioPlayer. I had a try on a friend's computer with no Visual Studio installed on it, and there was no error about SimpleAudioPlayer, so I'll let you know when it gets more clear.

    As another issue that I discovered today occurs on UWP aswell, I'll bring it to you in this thread. My application is using ZXing (.Forms) and the scanner runs well on UWP devices that have Visual Studio installed on it but won't show on other ones. There is no error or exception though, it just won't show. Again I'll let you know when it gets more precise.

    EDIT : including "assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingScannerViewRenderer).GetTypeInfo().Assembly);" in the UWP project fixed ZXing bug. I had already tried it earlier today on the Zotac (with Windows 10 "N") but app crashed on scanner opening, so I thought it was not a good idea. So there might be two conclusions : Zotac is crappy and that's it, or Windows "N" is really not a good solution for most Xamarin.UWP applications. I'll let you know when a classic Windows gets installed on this device.

    Until then, I thank you again for past and future help.

  • leeyoleeyo USMember ✭✭

    Just so you know, both bugs disappeared when I installed a "non-N" Windows version on Zotac, so I guess these versions of Windows will cause troubles with Xamarin.UWP. Even though you can still install the "Media pack" from Microsoft on a "N" version, it didn't fix my bugs.

  • Adrian.StevensAdrian.Stevens USXamarin Team, University, XamUProfessors, Developer Group Leader Xamurai

    Thanks @leeyo - that's a surprising, perhaps missing a lib for the MediaElement - but really great to know

    I did some testing over the weekend after (finally) getting a Windows 10 machine cleaned and updated and I didn't have any issues.

    Cheers!

Sign In or Register to comment.