After downloading the source, I ran setup, then executed the GetXboxLiveSDK script with the newer version. When I ran GenerateProjectFiles it reported that the SDK wasn’t installed:
But the Microsoft.Xbox.Live.SDK.<> directories are present. Is this a false error or is it the source of my problem with the new SDK?
[EDIT]
The phrase only occurs in OnlineSubsystemLive.Build.cs:
string NugetPathChunk = Path.Combine(PackageFolder, "build", "native", PlatformArchAndCompilerPathChunk, "release");
string XSAPISubDir = Path.Combine("XSAPI", NugetPathChunk);
if (!AddWinRTDllReference(XSAPISubDir, "Microsoft.Xbox.Services"))
{
Log.TraceError("Error: Xbox Live SDK not found. Run Engine/Plugins/Online/XboxOne/OnlineSubsystemLive/GetXboxLiveSDK.bat");
}
The build of the Engine is successful.
The project DLL’s are created without error.
The Editor and operates as normal.
Visual Studio Solution is created.
Build and Debugging works with Win64 Development Editor.
Yes, that message is directly related to your build errors. It’s generated when the OnlineSubsystemLive.build.cs can’t find the Microsoft.Xbox.Services.winmd file, which is needed to resolve the references to WinRT types in Microsoft::Xbox::Services.
Looks like this is because the structure of the NuGet package has changed recently, and the GetXboxLiveSDK script needs changing to match. Maybe a change to the way ‘actualPath’ is formed inside Install-LivePackage?
@ - Would you please clarify (again) if OnlineSubsystemUtils is needed or not. It was my understanding that it wasn’t needed and so I don’t have the plugin enabled. However, the OnlineSubsystemLive.Build.cs includes it:
OnlineSubsystemUtils is probably a good idea - in particular it contains the platform-independent Blueprint interface to the OnlineSubsystem. But if your build succeeds without it then it’s not essential - it certainly isn’t related to your sign-in problem.
That dll is manually loaded (since it’s in an odd path), so the filename matters. You could rename your manual copy :). Alternatively there’s a hard reference to cpprest_140_2_8.dll in OnlineSubsystemLive.build.cs. If you change that to 2_9 and build (shouldn’t need a full rebuild, just incremental) then that will get the new version packaged and loaded in the ‘proper’ way.
1. Microsoft Server is way, way, way out :D
2. We need the latest $xsapiVersionUwp = "2017.05.20170517.001"
3. A change to Install-LivePackage is needed:
$nativeReleasePackage = $installLocation + "\" + $packageName + ".Native.Release." + $packageVersion
if (Test-Path $nativeReleasePackage)
{
$actualPath = $nativeReleasePackage
}
else
{
$actualPath = $installLocation + "\" + $packageName + "." + $packageVersion
}
4. OnlineSubsystemLive.build.cs needs to be changed:
const string CppRestVersion = "2_9";
@ - After logging in, an exception was thrown in UWP code. I’m not exactly sure where, as I continued my application wanting to see if my callback was called. It was, but PlayerId was null.
Unfortunately I’m not able to login again, the call to ShowLoginUI is ignored, even after stopping and restarting the debugger, the UI is not displayed.
Do I need to Logout first?
Is there a way to always show the UI so that players can change to a different gamertag?
[EDIT]
Even after a complete reboot the UI doesn’t show. Is it that since I’m already logged in the Xbox Live services already know the account info?
That summary looks right to me. I will make sure to apply those changes next time I have a chance to get the fork updated. Thanks again for working through them with me, and your patience!
To log out you can use the Windows 10 Xbox app. After logging out there and then relaunching your game it should trigger the UI again. There is also a method in the core Xbox Live SDK that supports changing user in-game, but there’s no wrapper for it in OnlineSubsystemLive currently.
As for exceptions, note that there are some internal retry paths where the Xbox Live SDK code may throw an exception, catch it itself, and ultimately return a successful result from an API. Though if you’re getting a null user id it sounds as though this isn’t one of those cases.
Given this, the PickedUser is never set. Where is the log written to? It wasn’t in AppData\Local, and I didn’t see it under Binaries, and Saved\Logs don’t seem to have the SystemUI error in it.
If you’re running with latest and using cookonthefly, the logs get written through the cook server connection and land in (the slightly odd) Saved/Cooked/UWP64/[Game]/UWPLocalAppData folder. With pre-cooked content they get written to the standard UWP local appdata directory: %localappdata%/Packages/[Package_Family_Name]/LocalState
Given your symptoms, the core sign in seems to be going through (and so getting cached, preventing UI from showing up subsequently), but the follow-up operation that retrieves the user’s Xbox Live profile is failing. Some of this code lives in OnlineSubsystemLive/ThirdParty/EraAdapter/Source/SystemUI.cpp and OnlineSubsystemLive/ThirdParty/EraAdapter/User.cpp.
That line is emitted at ‘Log’ level, which might be filtered out before it reaches the file. 0x80070057 is a credible code though - it is of course ‘invalid parameter’.
One thought on where this might be coming from - the EraAdapter library has some dependencies on the public interface exposed by XSAPI. It may need a rebuild to pick up changes in the new Live SDK version you’re using. The vcxproj is part of the fork in the OnlineSubsystemLive/ThirdParty/EraAdapter/Source folder, but it will need some tweaking to account for that XSAPI path change you ran into earlier. If you get a building version, you should drop the output .dll and .winmd in the OnlineSubsystemLive/ThirdParty/EraAdapter/Binaries/UWPxx folders.
I wasn’t able to add the EraAdapter project file to the UEUWP solution. Also, when I tried to double-click on it Visual Studio couldn’t determine the type it is. Now I’m looking at the Xml Settings of the project to see if I can recreate a new solution for it, then add the source files for it.
If I understand you correctly, copy the files from a successful build to the directory listed above.
Right, I wouldn’t try to add it to the UE4 sln, just build it independently and copy the binaries. I found it wouldn’t open in VS2017 for some reason, but VS2015 was able to open the vcxproj. Anyway, as you fix up the MSBuild xml you’ll want to deal with the HintPath in the reference to Microsoft.Xbox.Services - it’s using an old path structure to locate XSAPI and will need edits to find your new Live SDK version.