Search Unity

UWP not deploying on Xbox One (package is not compatible with the device)

Discussion in 'Windows' started by FennecMoon, Sep 1, 2021.

  1. FennecMoon

    FennecMoon

    Joined:
    Aug 12, 2015
    Posts:
    13
    Hello, I'm sorry if this is an issue that has been solved elsewhere, I've been searching and can not find the answer. For quite some time I have had no problem building to UWP and then deploying on Xbox One, but within the last 2 weeks whenever I try to deploy on the Xbox One I just get a black screen for a few minutes then the Xbox returns to the Developer Homescreen. It's a game that I'm up to the 40th build on, and the first 39 ran on the Xbox One with no problems, and the only changes made have been purely level design. I tried deploying the game on my Windows 10 machine to determine what the problem may be and I get a message that it can't be deployed "because this package is not compatible with the device. The package can only be installed of the following device families: Windows.Xbox". I found an answer that it may be due to the certificate assigned to the app so I've changed that a couple different times with no success. I read somewhere that the "Minimum Platform Version" must be at least 10.0.14393.0, so I have tried building the UWP using every version available up to 10.0.19041.0 and continue to get the error message. The game runs fine in the editor, and appears to build appropriately to UWP. Has anyone else encountered this issue? Any help will be greatly appreciated. Thank you.
     
  2. timke

    timke

    Joined:
    Nov 30, 2017
    Posts:
    407
    Hey,

    That's a pretty strange issue, and I haven't seen or heard anything like that. There was a recent Xbox One update (last week I think), did you notice if the problem started after the update by any chance?

    Some follow-up questions:

    - How are you deploying the app package: Visual Studio, Device Portal, or Unity's Build & Run (via Device Portal)?
    Could you try deploying through a different means and see if that changes or try debugging with Visual Studio?

    - The "black screen" seems to indicate the app is crashing; can you check if there are any crash dumps?

    I recommend creating an new, empty Unity project and build/deploy that to Xbox. This will determine if the problem is with the app (or Unity) or a problem with Xbox deployment itself.

    You can edit your Package.appxmanifest so it'll install/run on Windows; it's just an XML file and can be modified outside of Visual Studio.

    Change the <TargetDeviceFamily> tag to something like this:

    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.14393.0" MaxVersionTested="10.0.19041.0" />


    Specifically, use "Windows.Universal" instead of "Windows.Xbox". So long as you're not using Xbox specific APIs, your app should install and run on any Windows 10 device.
     
  3. FennecMoon

    FennecMoon

    Joined:
    Aug 12, 2015
    Posts:
    13
    Thank you so much for this. I think I've found the problem but am still at a loss as to how to fix it. What appears to be happening is when I build the sideload project in Visual Studio it resets the MinVersion in the AppxManifest to 10.0.10240.0. I have tried manually changing this back to 10.0.14393.0 in the AppxManifest file found in the x64 folder as well as the AppxManifest file found in the Master folder, and also correct the Package.APPXMANIFEST file. Once I've done this, then go to Visual Studio, load the solution and build as a sideload project, the 2 AppxManifest files then reset to the wrong MinVersion, but the Package.APPXMANIFEST file stays the correct MinVersion. I'm now able to play the game on the computer without an issue, but when I sideload and try to run it on the Xbox it gets as far as flashing the Unity logo then goes to black screen for a moment then returns to the Dev home screen. Is there another place I should be updating the MinVersion?

    Also, I have tried to sideload the prior builds, and now when I launch those I immediately get the message "Sorry, we can't launch this, try uninstalling and reinstalling". So within the last 2 weeks (apparently since the recent Xbox update?) I've lost the ability to launch any of my sideloads.
     
    Last edited: Sep 2, 2021
  4. timke

    timke

    Joined:
    Nov 30, 2017
    Posts:
    407
    That's almost certainly a crash.
    Unfortunately, I can't comment on the wonky VS behavior.

    If you don't mind, could you please file a bug? This seems like something we should investigate, even if it turns our to be Microsoft issue.

    If you can find and retrieve a crash dump (for the app going black) that would be great and really help us identify the core issue. The other versioning issues could just be red herrings.
     
  5. FennecMoon

    FennecMoon

    Joined:
    Aug 12, 2015
    Posts:
    13
    Thank you. How do I file a bug? The crash dump file shows

    "Dump Summary
    ------------
    Dump File: CBR.exe.1196.dmp : C:\Users\conta\Downloads\CBR.exe.1196.dmp
    Last Write Time: 9/2/2021 11:12:54 AM
    Process Name: CBR.exe : S:\Program Files\WindowsApps\CBR_1.0.49.0_x64__sn07tyzxpy95c\CBR.exe
    Process Architecture: x64
    Exception Code: 0xC0000005
    Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
    Heap Information: Present

    System Information
    ------------------
    OS Version: 10.0.22000
    CLR Version(s):"

    I tried searching for the exception code but everything I find is in regards to games crashing in Windows.
     
  6. timke

    timke

    Joined:
    Nov 30, 2017
    Posts:
    407
    In the Editor, go to Help -> "Report a bug..." to bring up the Bug Reporter tool. Fill out the dialogue with as much information as possible (use Add File option to include the crash dump file). You can expect QA to contact you either with an update or request for more information.

    Also, if you don't mind, you can post the crash dump file to this thread?
    I can debug the dump and possibly find some clue to the problem.
     
  7. FennecMoon

    FennecMoon

    Joined:
    Aug 12, 2015
    Posts:
    13
    Sorry about the VERY delayed response, I’ve spent all my free time trying to figure this issue out, and finally figured it out. Apparently I had too many objects trying to load at the start of the game. So I have broken the rather large word into multiple pieces which are all off at the start of the game, and I turn them on 1 piece at a time, then turn the camera on, and all is well. Thank you again for your help with this, it was greatly appreciated.
     
  8. timke

    timke

    Joined:
    Nov 30, 2017
    Posts:
    407
    I'm glad you figured it out, but it still sounds likes there's a Unity bug in there; the game shouldn't crash like that, except maybe if you ran out of video RAM.

    Did you end up filing a bug? If not I'd still encourage you to do so.
     
  9. FennecMoon

    FennecMoon

    Joined:
    Aug 12, 2015
    Posts:
    13
    I haven't filed a bug yet, but definitely will.