Open rgrlaika opened 1 year ago
I still get the issue above error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "errors": [ { "message": "Login Required.", "domain": "global", "reason": "required", "location": "Authorization", "locationType": "header" } ], "status": "UNAUTHENTICATED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "CREDENTIALS_MISSING", "domain": "googleapis.com", "metadata": { "method": "caribou.api.proto.MailboxService.GetMessage", "service": "gmail.googleapis.com" } } ] }
@hieuTranEnouvo For me, it works all good. Have you placed credentials.json correctly in the path you are pointing?
I tried gmail-tester v1.3.8 , yes it does not ask to enter code now but this is more better. You don't need to enter code now, it automatically gets authenticated!
@azadnsu I am facing the same issue as above. In my case it is giving me the following error: FetchError: request to https://gmail.googleapis.com/gmail/v1/users/me/messages/181dc6b25056f876?format=full failed, reason: connect ETIMEDOUT 216.58.209.138:443 Do you have any idea about this? Any help would be appreciated.
@azadnsu The issue still display. It doesn't enter code automatically
@hieuTranEnouvo See your account is actually set up successfully, otherwise, it won't go for email search. Now, regarding the error, your Gmail account might have a quota per minute set to 0. Please try to increase it. Here are some resources about how to do it: https://stackoverflow.com/questions/66785834/quota-exceeded-for-quota-metric-requests-and-limit-requests-per-minute-of-se
Please check what its Request per minute in Quotas in your project Admin in Google cloud something like here: https://console.cloud.google.com/iam-admin/quotas
@azadnsu Thank you for replying I can't find a quota per minute set to increase it.
@hieuTranEnouvo Go to the next pages, Request per minute is there.
@hieuTranEnouvo You can increase quotas from there Or follow this solution posted in another thread: https://github.com/levz0r/gmail-tester/issues/78
@azadnsu here what I found
But I still don't know what the issue is
@hieuTranEnouvo I have no idea as well, your account got connected. Its Gmail API blocking requests which you need to figure out!
OK thank @azadnsu
@hieuTranEnouvo Could you please try with a fresh Gmail account from the scratch. Just to give a try!
@azadnsu let me check now
@azadnsu I used another account but still get the issue
I am sure you need to do this: https://developers.google.com/gmail/api/guides/handle-errors#:~:text=An%20error%20403%20occurs%20when,The%20daily%20limit%20was%20exceeded. @hieuTranEnouvo
View or change usage limits, increase quota To view or change usage limits for your project, or to request an increase to your quota, do the following:
1/If you don't already have a billing account for your project, then create one. 2/Visit the Enabled APIs page of the API library in the API Console, and select an API from the list. 3/To view and change quota-related settings, select Quotas. To view usage statistics, select Usage.
==> I don't know how to "To view usage statistics, select Usage" pls help me that @azadnsu
There should be no quota problem in a normal gmail account. Looks like somehow your account is connected to business account!
@azadnsu I have 3 accounts which are connected to business account? It is same the error for 3 accs
If your mailbox contains 1000s of emails, I guess you just need to limit the result set by using some filtering options like after
.
Did anyone solve or update this for the OOB deprecation?
Error 400: invalid_request
The out-of-band (OOB) flow has been blocked in order to keep users secure. Follow the Out-of-Band (OOB) flow migration guide linked in the developer docs below to migrate your app to an alternative method.
Request details: redirect_uri=urn:ietf:wg:oauth:2.0:oob
Our cypress tests just started failing, and I suspect it is due the the token expiring and we can't generate a new one due to this being deprecated by google
https://developers.google.com/identity/protocols/oauth2/resources/oob-migration
I noticed that google apis deprecated the Out-Of-Band (OOB) which means that credentials created now does not have the
urn:ietf:wg:oauth:2.0:oob
it creates with"redirect_uris":["http://localhost/"]}}
Then I was trying to run the node
node_modules/gmail-tester/init.js cypress/events/gmail/credentials.json cypress/events/gmail/gmail_token.json <account@gmail.com>
Note: the actual email has been omitted
Then it directly opened the page to grant the email and redirected to the : localhost asking to back to the terminal
I back to the terminal but what I had was the prompt below forever:
[gmail] Checking for message from '', to: account@gmail.com, contains '' in subject...
Note: I never asks me to put a code in the terminalI think it has something to do with the deprecation of Out-Of-Band (OOB) https://developers.google.com/identity/protocols/oauth2/resources/oob-migration
I tried to use the latest version of gmail-tester and it does not work.
Indeed it creates the file gmail_token.json (in my case) but if I delete it, when running the tests it opens a new instance of the browser during the cypress test execution, and asks to grant the permission for the email again, hence a manual intervention needed.
Any idea if it's a known issue if it's a workaround?
I also noticed people complaining it here without any answers:
https://github.com/levz0r/gmail-tester/issues/73