Deploying Unity app with AWS doesn't work on Hololens 2

Sergio Pinto 5 Reputation points
2024-02-29T13:15:03.5066667+00:00

I am developing an app, using Unity 2021.3.14, for the Hololens 2. It has authentication features in it, using the Amazon AWS libraries. I managed to make it work in Unity Editor, I get the token response for successful authentication, but only when pressing the Play button in the editor. When I build the app for Hololens, I don't get any errors, but when I deploy the solution on the Hololens, the token isn't showing, meaning that the authentication failed. I have tried to debug it, but the only "error" it shows in Visual Studio is this one: Exception thrown at 0x00007FFF889178C0 in HoloTest.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0000008C582FAE20. I've been trying to figure it out, but I can't seem to fix it. What can I be doing wrong? EDIT: I did copy the dll's into a plugins folder inside the assets folder in Unity

HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
400 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sergio Pinto 5 Reputation points
    2024-03-01T14:57:57.0633333+00:00

    I managed to randomly fix it. I had already selected the internetClient capability in the Publishing Settings, but for some reason, apparently it didn't got added to the Package.appxmanifest in the builds folder.

    I just added a new line in there with the internetClient capability, and it started working!

    1 person found this answer helpful.

  2. Ying Li - MSFT 1,200 Reputation points Microsoft Vendor
    2024-03-01T08:02:38.5566667+00:00

    Hello, Welcome to Microsoft Q&A,

    There isn't enough information to go on to tell what is going on exactly. You mentioned that it worked in the Unity Editor. I assume that there may be some steps missed out to cause code stripping when using AWS SDK with IL2CPP build. I am not familiar with AWS SDK. I recommend you check AWS SDK developer Guide documents for information on using IL2CPP to build the Unity project with AWS SDK.

    A managed stack trace could help you understand the cause of this exception. To find the player log file, please navigate to Device Portal->System->File explorer->LocalAppData->[ProjectName]->TempState->UnityPlayer.log.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.