O365 subscription renewal is throwing unknown exception - microsoft-graph-api

I'm working on a sync server that keeps the Office 365 events and my calendering app in sync. Service subscribes to a push notification for user's event calendar that has a custom single extended property.
The subscription is renewed every two days to keep the subscription active. Recently we started observing errors in subscription renew API and the exception doesn't have much details. These errors are happening for lot of subscriptions (> 1000) Any idea why these errors are observed.
Error response received for url
PATCH https://graph.microsoft.com/v1.0/subscriptions/<subscriptionId>
Sample request body
{
"expirationDateTime" :"2018-11-01T04:55:54.304Z"
}
Response code 500 Body
{
"error": {
"code": "UnknownError",
"message": "An unknown error occurred.",
"innerError": {
"request-id": "<request_id>",
"date": "2018-10-28T08:31:40"
}
}
}

We had observed a partial outage of Microsoft Graph Subscription Service for few Azure Instances in US starting Friday, 26th October 4 PM PDT.
We discovered these intermittent failures on Monday, October 29th evening and successfully fixed the issues by 8 PM PDT on same day.
This should not cause the Subscription data corruption. You should be able to use all your active subscriptions.
We regret the inconvenience caused and we are working with very high priority to discover these issues proactively & fix sooner.
Please let us know if you still see any issues.
Thank you.

Related

Microsoft graph api is sending multiple duplicate "created" notifications on a message resource

The exact POST I made to create exactly 1 subscription on 1 resource:
POST https://graph.microsoft.com/v1.0/subscriptions
Content-Type: application/json
{
"changeType": "created",
"notificationUrl": "https://myurl.com/endpoint",
"resource": "/me/mailfolders('inbox')/messages",
"expirationDateTime": "{{addMinutes(now; 4225)}}",
"clientState": "{{uuid}}"
}
Microsoft Graph notifications for changes in resource data Doc
What's weird is that sometimes it sends the same data to my URL 2 times, sometimes just 1, sometimes 3. I know they're duplicated because they're completely the same (I used a difftool).
I've read this, that, and this but I just couldn't understand why its possible to send out more than 1 webhook for a "created" notification. I'm responding with a 202 as soon as I get the POST and these duplicated POSTS are not even 1 second apart so not sure if I could store the "#odata.etag" and check if its already in a database as I use integromat to receive these change notifications.
So what gives? How can I make it so that I only receive 1 notification? Does it have something to do with how the mailbox is setup? Is storing the #odata.etag really the proper way to handle this? Really absurd if that's the case.
This might be due to the known issues in Change notifications:
For information:https://learn.microsoft.com/en-us/graph/known-issues#change-notifications

iOS in-App Purchase failure due to "Strong customer authentication transactions in European Economic Area"

In our iOS app, in-App purchase(auto-renewable subscriptions) was working very well, but from January this year due to some unknown reason in-App purchase getting failed for European Customers mainly from country "Denmark".
For "Strong customer authentication transactions in European Economic Area" , Now users are moved to outside of the App for Strong Authentication as per new European law (ref: https://developer.apple.com/support/psd2/) and then need to enter NemID etc. and when the User is moving back to the App, I'm getting this error
A. “Purchase failed“ . B. The action could not be performed. C.
SKErrorDomain error 0.
One thing to mention as I'm using SwiftyStoreKit POD for in-App purchase, and Transaction observer is already added in AppDelegate by calling SwiftyStoreKit.CompleteTransaction(atomically: true) as suggested by Apple(Transaction Observer).
#sca(Strong Customer Authentication) #EuropeanUnionregulation
If anyone faced same issue, any help would be great.
Here is the transaction failed screenshot after moving back to my app from strong authentication process:
Indeed since January in Europe they're is a new regulation regarding to transaction security. You can find more details there : https://developer.apple.com/support/psd2/
Lot of apps undergo the same problem. Indeed, even if the documentation says that the transaction observer may receive a "failed" or "deferred" state we can expect that failed state will be only for iOS version that doesn't support the "deferred" state (so iOS versions <=7). Indeed the deferred state case is available since iOS 8.0.
However in reality even on iOS 14 the app transaction observer receive a failed state which results in an error pop-up displayed by a lot of app when they do the error management. Even if at the end the purchase succeed once user come back to the app (after validated the transaction with his bank app), it would be FAR better if iOS can return a "deferred" state to avoid an error pop-up while keeping the error management. And it will be more consistent with what it's happening.
In fact once the security process is completed your app's transaction observer must immediately receive a new transaction with a state purchased so in finality everything should be okay but with an unexpected error pop-up displayed for no real reason.
The only choice we have is let the error be displayed awaiting the end of process or discard the error management. I think the first choice is better and if an iOS version update the statement received it will be going fine without any app update.

Firebase Phone Authentication Error: Invalid Token (Even after replacing APNs Key)

Today may production app started having issues on Phone Authentication through Firebase on several devices (but not all).
When I make the call PhoneAuthProvider.provider().verifyPhoneNumber(phoneNumber: uiDelegate:) I get the following error:
Error Domain=FIRAuthErrorDomain Code=17048 "Invalid token." UserInfo={NSLocalizedDescription=Invalid token., error_name=INVALID_APP_CREDENTIAL
As per Firebase documentation, this code indicates that an invalid APNS device token was used in the verifyClient request.
Nothing in my app code has changed, yet this error is occurring. I uploaded a new APNs Key and .p8 file as other StackOverflow posts have suggested, with no luck.
I have tried the suggestions in this similar post.
I am also able to receive push notifications from my app to this device, so it isn't like my push notifications aren't working.
Could anyone suggest ways of debugging his?
Edit: This is the method I am calling:
func sendVerificationCode(to phoneNumber: String, _ completion: #escaping (Error?)->Void) {
PhoneAuthProvider.provider().verifyPhoneNumber(phoneNumber, uiDelegate: nil) { (verificationID, error) in
/* store verificationID locally if exists */
completion(error)
}
}
firebaser here
There was an issue where iOS clients were not receiving the text messages required for one-time password authentication. Its status is being tracked here: https://status.firebase.google.com/incident/Authentication/18006
From there:
We are investigating an issue with Firebase Phone authentication that affects iOS devices. Affected customers may see "invalid token" error during OTP verification.
This issue has been fixed, since 11:15 am pacific time. If you're still seeing similar problems, reach out to Firebase support for personalized help in troubleshooting.

Handling IAP Fullfilment results for Windows 10 Store

When providing consumable In App Purchases on the Windows 10 Store, there are FullfillmentResults when ReportConsumableFullfillmentAsync is called.
The user of my app has had their IAP fullfilled by the time I get this result. This means they have their Coins/Gems/Potatoes.
But if I receive FulfillmentResult.PurchaseReverted, then what happened? How did the user just revert the purchase? Am I meant to withdraw their Coins/Gems/Potatoes?
What are scenarios behind the other error messages?
Note: I'm working with using Windows.ApplicationModel.Store
But if I receive FulfillmentResult.PurchaseReverted, then what
happened? How did the user just revert the purchase? Am I meant to
withdraw their Coins/Gems/Potatoes?
The value PurchaseReverted means the transaction is canceled on the backend and users get their money back. So you should disable the user's access to the cosumable content (withdraw the Coins/Gems/Potatoes) as necessary.
What are scenarios behind the other error messages?
NothingToFulfill : The transaction id has been fulfilled or is otherwise complete
PurchasePending: The purchase is not complete. At this point it is still possible for the transaction to be reversed due to provider failures and/or risk checks. It means the purchase has not yet cleared and could still be revoked.
ServerError: There was an issue receiving fulfillment status. It might be the problem from the Store.
Succeed: The fulfillment is complete and your Coins/Gems/Potatoes can be offered again.
Here is the documentation about FulfillmentResult Enum

Mandrill api log says message is sent, but I don't receive it, and it doesn't show in activity

Using a production key on Mandrill I am attempting to send an email. Previously this has worked without issue. However now, despite receiving a successful response from the API, visible in the api log, no email is being sent, and nothing is present in the outbound activity log.
If I check the api log for the message which appeared to fail it displays:
[
{
"email": [email_address],
"status": "sent",
"_id": [id],
"reject_reason": null
}
]
Replacing the id in the content view of a sent email, with the id from a failed one displays a correctly formatted email:
e.g. https://mandrillapp.com/activity/content?id=20151214_[put_the_id_here]
Is this a bug? What is causing it? Where can I see more information about what happened? How can I monitor if this happens again in the future? How can I prevent it from happening in the future?
I have been in contact with Mandrill support regarding the issue, which they described as 'very strange indeed'. Deleting the API key and generating a new one fixed the issue, but there is no explanation as to why this is they case, how to detect the problem, or how to stop it from happening again in the future.
The messages in question were never actually sent by Mandrill, and displayed no SMTP events, despite reporting as sent by their API
Something else to check is to make sure you're using a working API key instead of a test one. As the name suggests, test keys are designed to work just like a regular key, so the feedback to your program will be identical, but the messages won't actually be sent.
You can see if this is the problem by going to the Mandrill settings and looking at the list of API keys. Test keys have a very clear This is a test key message listed.
This probably won't be an issue if you generated the key yourself, but if you inherited this project it's worth taking a look.
I have faced a similar issue like this last week. The "sent" status only indicates that Mandrill sent it. But reception of the email message is confirmed only if there is a SMTP event corresponding to it with code starting with 2, (example 250 etc), in the info api response, like the following:
"smtp_events": [
{
"ts": 1442448422,
"type": "sent",
"diag": "250 SmtpThread-4622542-14682902148#ps-they-19.uk.miplecast.lan Received OK",
"source_ip": "505.207.171.171",
"destination_ip": "705.139.255.221",
"size": 29501
}
check this link for more info.
https://mandrill.zendesk.com/hc/en-us/articles/205582697-How-to-Confirm-If-an-Email-Was-Actually-Delivered
the issue could be on the recipient server as well, due which delivery could be delayed. In our experience last week, the message was delivered 4 hours after being Sent. we were not able to establish the reason yet why, this delay happened.
HTH,

Resources