Drive API insert permission internal error - google-api

Generally, I don't ask questions to stackoverflow because I always find an answer by searching. But today, we have a very important problem.
We have somes Drive API issues for a few hours.
A lot of 500 Internal Server Error when we want to take the ownership of a document.
We have tested directly with APIs Playground and it's the same :
https://developers.google.com/drive/v2/reference/permissions/insert
{
"role": "owner",
"type": "user",
"value": "blabla#example.com"
}
The big problem is the API return an error but the take ownership is OK. So Google return to us an error whereas the request is passed correctly...
Does it means we can't trust the API ?
We use Python for this application but we have the same issue for the same request in another application in Java...

Drive is having one of its bad hair weeks. They happen from time to time.
To answer "Does it means we can't trust the API ?", well trust is a bit subjective, but we have started to add defensive coding to our apps. So rather than assume the API is working to spec, we assume it isn't and do a double check.
Eg.after an insert we are now re-fetching the inserted file to confirm that it has been correctly inserted. We also track 304 rate limit errors on inserts because sometimes, despite the exception, the file was inserted. (similar to your observation, except you're seeing 500).

Related

How to debug 3DSecureStatus

I am busy with implementing payments using Sage Pay direct protocol 3.0
(4,0 unavailable yet as I understand)
I register transaction using vspdirect-register.vsp
I redirect user to ACSURL with MD, PAReq and TermUrl using POST
I catch user on TermUrl and check transaction status using direct3dcallback.vsp with MD and PARes
BUT on this stage I always get:
STATUS: 'OK'
AVSCV2: 'ALL MATCH',
StatusDetail: '0000 : The Authorisation was Successful.',
AddressResult: 'MATCHED',
PostCodeResult: 'MATCHED',
CV2Result: 'MATCHED',
'3DSecureStatus': 'ERROR'
Using MySagePay tools I get an explanation like :
3D secure status The authentication callback message was MALFORMED. No 3D-Authentication occurred! ERROR
Attempt 1
ECI result Unknown result type
How can I debug this error?
Is it normal that I get status OK even when 3DSecureStatus : ERROR ?
Q1: Why are you getting a 3-D Secure error?
The MALFORMED status points towards SagePay not being able to read your request .. (e.g it's syntactically or structurally invalid etc).
Given the lack of code in the OP, rather than try and guess what you're doing wrong, I'll instead show what we do (which works - we've implemented both v3.00 & 4.00).
We perform an HTTP POST with the following parameters to https://live.sagepay.com/gateway/service/direct3dcallback.vsp (or https://test.sagepay.com/gateway/service/direct3dcallback.vsp in the case of testing):
For direct protocol v3.00
VPSProtocol: "3.00"
MD: MD posted to TermURL (e.g 20156570522002324295)
PARes: "PARes posted to TermURL"
For direct protocol v4.00
VPSProtocol: "4.00"
VPSTxId: VPSTxId from the initial payment response (Note that curly brackets {} need to be removed!!!)
CRes: "CRes that was posted to the ThreeDSNotificationURL"
Q2: Why do you get an OK status when 3-D Secure failed?
I believe this is probably due to your merchant ruleset. You can state what you want to happen with the transaction if 3-D Secure is unavailable or fails.
So, check your ruleset. I believe that we force our consumers through 3-D Secure as our chargeback percentages were quite high otherwise.
Footnote
I would also concur that since you are doing this work, it would probably be more beneficial to implement version 4.00, since that means the majority of your customers should have a better experience, and you'll have a better conversion rate too. Win win.
HTH.
Protocal 4.0 is available on the SagePay test server and you can start working on that already. It needs to be implemented by the 14th of September 2019 and the last info I've got from SagePay support staff is that the protocal 4.0 will be on the live server by the 14th of September 2019.
To your probelm: I call the ACSURL with the added query string for MD, PaReq, TermUrl which works ok.
I see that you posted PAReq. Please note that I use PaReq. A small a instead of a capital A. See page 16 of the Documentation. DIRECT_Integration_and_Protocol_4_Guidelines.pdf
Maybe you could post the complete URL you post to SagePay.
Hope this helps.
Thanks guys!
Sage support have helped me to find issue.
The point was - route 'ThreeDSNotificationURL' make changes in 'CRes' as we have configured some security behaviors, and when we check this key on Sage side - we got an error. so some extra security behaviors for this route have solve the issue.
Thanks guys!

OVER_QUERY_LIMIT using google places

I'm trying to use the google api for auto-complete.
I created a key and did some testing, due to an error in my code, that sent many requests in a short time I had the error: OVER_QUERY_LIMIT
I made the correction of my code, deleted the used key and created a new one. Now I get the following message:
{
"error_message" : "The provided API key is expired.",
"predictions" : [],
"status" : "REQUEST_DENIED"
}
Does anyone have any idea how to solve it?
The Message you are getting seems to be very clear.
You could have a licence an this license seems to be exceeded.
Please read the documentation.
The clarity of the message is quite obvious.
The problem is that google warns you that you have a 100k limit available.
The detail is in: these 100k is only available when billing is activated, without activating billing the limit drops to 1.
I would never imagine that.
But it's settled!
The tip is for anyone to go through the same problem

Error: 5080 : Form transaction registration failed - tried previous answers

I have searched the answers to similar questions asked about this SagePay error, and checked that the fixes don't appear to apply to my problem.
Specifically:
I am using a correct 2-letter country code for BillingCountry and DeliveryCountry.
I am POSTing VPSProtocol, TxType and Vendor as well as the Crypt value.
I have re-checked that I am using the correct encryption key from the MySagePay test portal.
Now I was using http://localhost:8084/app/success and http://localhost:8084/app/failure for my success and failure URLs, since I thought that although these are (obviously) not visible externally, it shouldn't matter since SagePay is re-directing at the end of its part of the transaction. (Is this assumption correct, or do these URLs need to be externally accessible?) Some of the answers have thrown doubt on this, so I changed them to an external website I own, and I still get the same error.
Another line of thought is that the client I am developing for has already gone live, and there seem to be hints that once you have gone live, you no longer have access to the test server (Is this true?)
Is there anything else I should be checking? (Additional info: I'm using the SagePay api (sagepay-api-1.2.2.0.jar and related libraries) to validate the form contents and encrypt them.
I used the integration from https://github.com/tolzhabayev/sagepayForm-php
I had this error (5080) and spoke to SagePay support and they guided me to the MySagePay portal where you can view Invalid transactions to be able to troubleshoot this error easily!
Hope this helps someone.
Chris Rickards
I had exact same problem and I tried everything that you described as well, one day after I found that the problem was in "VendorEMail" field, it had 2 email addresses separated by ;, once I removed second and left only one email everything worked.

"Daily save quota exceeded" after a while using Google Play Android Developer API

After discovering that the Google team upgraded the Android Developer API, I made a script to automatically update all my apps data in multiple languages at once.
However, I've noticed that, when you follow a workflow of:
Ask for Edit ID,
Do all your changes
Commit all your changes
At some point, you get a SocketTimeoutException when you try to update changes. Well, this may be due to a problem in my connection.
So, to solve that, I changed my workflow:
Ask for Edit ID,
Do one change
Commit one change
Repeat from 1 until changes finished
However, following this process, it ends with this when I try to commit after some changes:
{
"code" : 403,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "Daily save quota exceeded.",
"reason" : "publishingDailySaveQuotaExceeded"
} ],
"message" : "Daily save quota exceeded."
}
Looks weird to me, as there is no explanation about save quotas for this API.
Also, after an intense use, the current quota limit keeps frozen at 0/200k, as if I didn't do anything. I didn't use the v1 of this API, so I don't know anything about this.
Do you know if that's the correct behavior?
Unfortunately it looks like their "recommendation" in their API's usage page is the rule.
Do not publish alpha or beta updates more frequently than once a day. (Production apps should be updated even less frequently than that.) Every update costs your users time and possibly money. If you update too frequently, users will start ignoring updates, or even uninstall the product.
Seems odd to me that they hard limit it like this though. It should be explicit at the very least.
Update
To follow up, I'm actually able to publish more than once a day as long as attempted uploads aren't rejected for some reason (such as 401 unauthorized). Haven't tested to see what the upper limit is, but it does make testing this a nuisance if it does heavily rate limit after one bad attempt.
The Google Play Developer API has a default limit of 200,000 queries per day.
For the purpose of enforcing this quota, the day ends at midnight Pacific time (UTC-8 when California is on standard time, UTC-7 when California is on daylight time).
https://developers.google.com/android-publisher/quotas

Cannot re-create app due to error "This Firebase URL is not available"

I decided to try out Firebase hosting and wanted to start fresh so I deleted my one and only app, but when I tried to create a new app with the same name I was unable to due to the error:
"This Firebase URL is not available"
I can only guess this is because of caching of app names/URLs? Hopefully it will become available (unless someone else beats me to it) after some timeout? Any info from others who have experience with this issue or otherwise know the answer is appreciated!
Not sure whether this is the right place to ask although Firebase suggest coming to SO because they apparently monitor Firebase-related questions closely according to their website.
Thanks!
Once you delete a Firebase URL, it is permanently unavailable. It cannot be recovered.
During confirmation, you should see a message like this, which explains in detail:
This stems from a number of abuse vectors that are possible by misappropriating a project id that the prior owner believes is deleted and could still have apps/releases in the wild attached to the defunct backend. Since compliance requires that we purge all data related to the project, including information about ownership, there's not even a way to restore one you personally deleted.

Resources