I’ve built a game (C#, UWP, Monogame) and want to integrate it with Xbox Live SDK (Microsoft.Xbox.Live.SDK.WinRT.UWP from NuGet).
Already got auth working but experiencing some problems with StatisticManager/Leaderboard.
What exactly am I doing:
Add user with StatisticManager.AddLocalUser(user) and wait for StatisticEventType.LocalUserAdded event from DoWork
Save score with StatisticManager.SetStatisticNumberData(user, leaderboardName, data) and wait for StatisticEventType.StatisticUpdateComplete event from DoWork
Get the leaderboard with StatisticManager.GetLeaderboard(user, leaderboardName, query) and wait for StatisticEventType.GetLeaderboardComplete event from DoWork
On step 3 I get a C++ exception:
“Not found (404)”.
[This looks very similar to this issue](Exceptions and Error 404 when using StatsManager
).
So I’ve already checked the sandbox ID, config file and leaderboard ID but still get the same result.
I did capture the traffic from HTTP monitoring and I see URL like:
"https://leaderboards.xboxlive.com/scids/{scid}/leaderboards/stat({leaderboardId})?xuid={myXboxId}&maxItems=5"
under development, you must change your Xbox SANDBOX from RETAIL to {your sandbox} using XboxLiveTools (you can find it in github).
after published you can switch it back to RETAIL,and if there is no data in leaderboard return result with zero row no exception throw
I fixed the same problem by myself
Related
I have a issue with play games services and unity.
I've done everything by the documentation. I'm a tester, testing is allowed and I've changed the sha1 in api console to the one used by the app. I'm using code from the docs and examples so here is a brief:
PlayGamesClientConfiguration conf = new PlayGamesClientConfiguration.Builder().Build();
PlayGamesPlatform.InitializeInstance(conf);
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
Debug.Log("Authenticating...");
Social.localUser.Authenticate((bool success) =>
{
if (success)
{
Debug.Log("Welcome " + Social.localUser.userName);
}
else
{
Debug.Log("Authentication failed.");
}
});
When I build the app in development mode the Play Games popup appears, starts loading and disappears and gives me a Authentication failed message. But when I build the app without the development mode nothing happens and I get the authentication failed message instantly. And yes I'm the correct sha1 key.
Please help me
I did a number of things and finally got it to work. I cannot be sure if they all contributed to solving this issue so here I will list what I did, from greatest to least of my guess of their relevance:
Match the SHA-1 certificates. If you are using an app downloaded from Play Store use the "app signing certificate", else use the upload certificate. These are found in the Play Console under YourApp/Release Management/App Signing. As a note, if you are building from Unity directly to your device, you should make sure that you are building with the same key used to upload to Google Play. More info here
If you are using a custom config and are requesting things such .RequestServerAuthCode(false), you must create an additional Web App. Go to your console project, and under create credentials choose OAuth client ID, and then select Web App.
If using internal testing, make sure to authorize accounts in the Play Console under Game Services/Your App/Testing.
Try disabling Anti-Piracy in the Play Console under Game Services/Your App/Linked Apps/Your App. Only do this if you are testing app outside Google Play. I think if you are logging in using verified test accounts this doesn't matter.
Edit: Publishing Game Services is required even for testing.. at least that seemed to be the case for me to get it working.
Try clearing the cache of your App on your device, I ran into this problem again and this solved it for me.
I finally think I have got it fixed for good.. after nearly a month later. :o Hope this helps.
Google Services can be published/unpublished separately from your app.
Check if they are correctly published doing the following:
Google Play Console
Game services
Select your game
Publishing
Check if Game Services are published.
I’m trying to log some stuff to ETW on my UWP application deployed to RPI2 (Windows IOT v.10.0.15063.0). On device portal I can see new logs but message is empty (payload gives me: “stringmessage:,”)
var _loggingChannel = new LoggingChannel("HA4IoT", null, new Guid("4bd2826e-54a1-4ba9-bf63-92b73ea1ac4a"));
_loggingChannel.LogMessage("Test", LoggingLevel.Information);
I’m trying to use LogEvent instead but any string field behaves like that - values logged are empty and saved CSV also have no data about logged stuff.
Sorry you hit this - there's a known regression in the ETW parsing logic in the Creator's Update for Device Portal that we're working to fix. Right now we don't have a workaround except to write a WPR profile and collect an ETL, and use the ETL to collect your logs.
You can track our fix here: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/18591439-loggingchannel-not-showing-string-message-content
I'll update it when the code is fixed in an Insiders flight, and then once we know if the fix can be backported.
Update: This is fixed in the Fall Creators Update, and has been in flights for a couple months. Expect to see it in the next update of Windows across platforms.
On my Raspberry Pi2 it works. I copied your code and executed it.
My Windows IoT Core 10 version is: 10.0.14393.67
The result looks like this:
I set the target version of the IoT background application to the following:
The CSV export also looks fine on my machine:
Timestamp,Provider,ID
04/27/2017-21:23:36.8150656,HA4IoT,0,Keyword:1,Level:4,ProviderName:HA4IoT,StringMessage:Test,TaskName:LogMsgInformation,WebbCompletePayload:stringmessage:test,
Best regards,
Christian
I have small application which calls phone numbers in Skype and allows to record conversations.
But it doesn't work with Skype versions after 7.5. I tried both Skype4COM and direct API:
For Skype4COM call always gets status clsCancelled, FailureReason is cfrMiscError. Below example code:
Skype skype = new SKYPE4COMLib.Skype();
if (!skype.Client.IsRunning)
{
skype.Client.Start(true, true);
}
skype.Attach(skype.Protocol, true);
Call call = skype.PlaceCall("+17606604690");
For direct API call status is MISSED. I'm using following command to start a call CALL +17606604690. It is possible to start call with somebody from your contact list by starting IM with him and bringing Skype client in focus, but this approach doesn't work for mobile numbers.
I guess Skype API changed after version 7.5, because I see that other applications still able to place calls. I'm also aware about Skype URLs, but they have big delays and won't let you know if call fails.
There is some discussion of this problem here, with a work‐around:
I made a shortcut to only call the skypecall part and surprisingly, if i spam it, it starts in. A triple try-catch cycle does the trick, but to make sure, i just applied force retry until its status becomes "ringing"
I've been working to try and convert Microsoft's EWS Streaming Notification Example to a service
( MS source http://www.microsoft.com/en-us/download/details.aspx?id=27154).
I tested it as a console app. I then used a generic service template and got it to the point it would compile, install, and start. It stops after about 10 seconds with the ubiquitous "the service on local computer started and then stopped."
So I went back in and upgraded to C# 2013 express and used NLog to put a bunch of log trace commands to so I could see where it was when it exited.
The last place I can find it is in the example code, SynchronizationChanges function,
public static void SynchronizeChanges(FolderId folderId)
{
logger.Trace("Entering SynchronizeChanges");
bool moreChangesAvailable;
do
{
logger.Trace("Synchronizing changes...");
//Console.WriteLine("Synchronizing changes...");
// Get all changes since the last call. The synchronization cookie is stored in the
// _SynchronizationState field.
// Only the the ids are requested. Additional properties should be fetched via GetItem
//calls.
logger.Trace("Getting changes into var changes.");
var changes = _ExchangeService.SyncFolderItems(folderId, PropertySet.IdOnly, null, 512,
SyncFolderItemsScope.NormalItems,
_SynchronizationState);
// Update the synchronization cookie
logger.Trace("Updating _SynchronizationState");
the log file shows the trace message ""Getting changes into var changes." but not the "Updating _SynchronizationState" message.
so it never gets past var changes = _ExchangeService.SyncFolderItems
I cannot for the life figure out why its just exiting. There are many examples of EWS streaming notifications. I have 3 that compile and run just fine but nobody as far as I can tell has posted an example of it done as a service.
If you don't see the "Updating..." message it's likely the sync threw an exception. Wrap it in a try/catch.
OK, so now that I see the error, this looks like your garden-variety permissions problem. When you ran this as a console app, you likely presented the default credentials to Exchange, which were for your login ID. For a Windows service, if you're running the service with one of the built-in accounts (e.g. Local System), your default credentials will not have access to Exchange.
To rectify, either (1) run the service under the account you did the console app with, or (2) add those credentials to the Exchange Service object.
I am using the Mathematica .Net/Link platform to create a web service to format and calculate math problems. However I am unable to get it working.
I create it using this code:
_Log.IpDebug("Starting the Kernel Link");
if (string.IsNullOrEmpty(_MathLinkArguments))
_InternelKernel = MathLinkFactory.CreateKernelLink();
else
_InternelKernel = MathLinkFactory.CreateKernelLink(_MathLinkArguments);
_Log.IpDebug("Kernel Link Started");
_InternelKernel.WaitAndDiscardAnswer();
The value of _MathLinkArguments is -linkmode launch -linkname \"C:\\Program Files\\Wolfram Research\\Mathematica\\7.0\\Math.exe\".
This piece of code is called from the Application_Start method of the global.asax.cs file.
When it gets to the WaitAndDiscardAnswer() call it gives the server error:
Error code: 11. Connected MathLink program has closed the link, but there might still be data underway.
Note: The SampleCode given with the .NET/Link package (both a console app and a WinForms app) works.
Edit:
I copied the console app sample code given with Mathematica into an asp.net page and it gave me the same error the first load and then on subsequent loads it gave me:
Error code: 1. MathLink connection was lost.
Edit2:
I forgot to mention that when I have procmon and task manager open while running my app, I can tell that Math.exe starts but it immediately exits, which makes those error code make complete sense...but doesn't explain why that happened.
To allow the .Net/Link to work in Asp.net (at least in IIS 7.5) you need to enable the property loadUserProfile on the app pool for the web site.
I am not entirely sure why this is the case, but from what I found while trying to debug this, there are some things that are gotten from the user's profile. I know for a fact that the default location of the kernel is, which explains why I couldn't use it with no arguments, and so I can only assume that other things are needed as well and without the profile it couldn't determine that.
But whatever the reason is this is required, it is, or at least it is a fix if you are getting similar problems like this in your own application.
I got the same error in a .Net WinForm application.
mathKernel = new MathKernel();
mathKernel.Compute("<< XYZ`XYZGraphs`");
The error occurred on loading the package straight after instantiating the MathKernel.
To resolve it you can wait a couple of seconds and then instantiating the MathKernel works fine. During this state where there might still be data underway the following conditions are both false:
if (!MathKernel.IsConnected)
{
MathKernel.Connect();
}
if (MathKernel.IsComputing)
{
MathKernel.Abort();
}
Edit:
I've recieved the error again and this time was able to determine the problem.
Using a command line open the MathKernel.exe and view the error message: