You do not have sufficient permissions to view this page - google-api

I can't enter Credentials or Consent screen via Google Console Developer
I'm admin, sometimes it's allow but most of the time it not
I don't know why. Have anyone be like this?
NOTE
I also use incognito mode , clear cache, clear data but no hope.

In top left corner there is a spinner for project selection(see the attached image), if you select some other project from the drop down of spinner the issue most probably will be solved.
You can select back your project from that menu.
It solved my problem

Please try logging out all other accounts and login only one account then you try it will work. Even I had the same issue now I'm able to do it. If that doesn't help try to login with some other account and try again.

This is most probably due to dual account access. I had to make sure that I was signed in as the same person (the button next to the minimize button on chrome browser) as the account I was using to login into the developers console to gain access. Hope this helps.

In Apis enable 'Google Play Developer API'. This error disappeared after that for me. Wierd bug

I was able to view the page but unable to create the service account.
Remedied as follows
First sign out of any other account.
Create the service account (you receive the error message)
Refresh the screen and the account is displayed, from the settings tab click to generate the public / private keys.

Inspect the page -> application -> cookies -> right click on the link & then clear. After clearing cookies then reload page & signin again. I hope it works.

May be the connection you are using has proxy settings, I faced the same problem , when connecting via proxy server and when i went back home and used without proxy , the page simply opened.

In case anyone has this problem: If you're using the Moesif Origin & CORS Changer chrome extension, you need to disable it. Otherwise it breaks the console

I faced the same issue, in my case, I had a chrome extension to unblock CORS, when I removed this extension from Chrome. Google started working just fine again.

Related

Test invisible recaptcha

We have integrated invisible recaptcha in one of our websites. Whenever we submit the form it automatically submits.
I read in some google groups that we would get a challenge when accessed on edge browser. But for us, it is automatically submitted.
Any specific steps to test the invisible recaptcha?
You can test invisible recaptcha by using Chrome emulator.
You will need to add a new custom device (BOT) in developer tools, and set User Agent String to Googlebot/2.1 on Desktop. Then use the new BOT device when testing on your site to trigger the recaptcha authentication.
Note: ReCaptcha v3 will still let the google bot pass as it has a score of 0.9 when emulating in Chrome.
V2 INVISIBLE
In this case just use Incognito or Private browsing to see it works.
Here is the testing link where ReCaptcha is working:
https://www.google.com/recaptcha/api2/demo?invisible=true
Please give the credits to the guys in comments below.
I found an excellent answer that works as of 2018-08-27.
In Chrome, hit F12 to open the Developer Console. Next, toggle the Device Toolbar, select a device and click Edit... Now, add a new device with the following configuration:
Once you hit save and use the new device, the ReCaptcha should open a modal requiring the user to match images.
Credit: This answer was originally posted on https://www.tectite.com/fmhowto/test-invisible-recaptcha.php?WWWTECTITE=p32j2na5otc4rmtbmfsmf9rci6
May 2021
Everyone was talking about using the demo page to test it out. What we get after we tested and how it should looks like is what everyone miss out. Or probably thats why most of us are still searching for the answer.
Even though this question is 3yrs old, still its not clear how this recaptcha works. Iam trying my best to break in steps. Let me know if its works for you.
Google Demo page test
Important
Follow the steps below in the Incognito window
with the parameter
Go to this url https://www.google.com/recaptcha/api2/demo?invisible=true (notice the url has ?invisible=true parameter at the end)
You should see nothing but an pre-filled form with an active 'submit' button with no 'checkbox' captcha, instead you will see the badge at the bottom right.
Click the 'Submit' button and you should see something like this. This is the verification check point.
4. Select the relevant image and the page should redirect with the message saying
Verification Success... Hooray!
But what if you didn't see any image?
If you are not seeing any verification image and the form submits with
Verification Success... Hooray!
then either the form is not working (mostly that's not the case) or you need to clear your browser cache and try again.
without the parameter
Go to this url, https://www.google.com/recaptcha/api2/demo (notice, i have removed the ?invisible=true parameter from the url)
You should see the good 'ol robot checkbox captcha above the 'Submit' button.
3. Also you can notice there won't be captcha badge at the bottom right.
Your Website
Try it in the Incognito window
Just like the demo you should get the same result in your website if you use invisible captcha. (Don't worry about the url parameters)
If your page displayed the captcha badge at the bottom right then after clicking the 'submit' button you should see the popup image window.
If you do not get any popup and the form submits then there's an issue with your captcha or could be browser cache.
Not seeing the checkbox ... ?
Here are some notes from reCaptcha help page - https://support.google.com/recaptcha#6223828
If you're seeing this reCAPTCHA challenge, your browser environment doesn't support the reCAPTCHA checkbox widget.
There are a few steps you can take to improve your experience:
Make sure your browser is fully updated (see minimum browser requirements)
Check that JavaScript is enabled in your browser
Try disabling plugins that might conflict with reCAPTCHA
Please note that some sites may have incorrectly integrated with reCAPTCHA - in this case please contact the site's webmaster.
WordPress Contact Form 7 users
You do not need to add the [recaptcha] tag.
reCAPTCHA v3 doesn’t need a CAPTCHA widget (the “I’m not a robot” checkbox used in reCAPTCHA v2) to work, so [recaptcha] form-tags are no longer necessary. If [recaptcha] form-tags are found in a form template, Contact Form 7 5.1 or higher ignores them and replaces them with an empty string.
https://contactform7.com/recaptcha/
As of 2019-06-21, it appears that it is sufficient with Google Chrome (v74.0.3729.169) to bring up a new incognito window to force the recaptcha to execute. (I had needed this for our own recaptcha testing, so I'm glad I found it.)
I am still struggling a little bit with this but I found that the following things make invisible recaptcha puzzle more likely to appear:
Log into the recaptcha admin and set it to maximum security
Open your site from an incognito tab.
Sometimes leaving the login page open and trying to login after some time has passed seems to trigger the recaptcha puzzle.
I must admit though that these don't work all of the times and there are times that I really struggle to get it to work.
Update: It seems a bit strange but I have found that the invisible ReCaptcha is more likely to appear when I submit a form using the Enter key instead of pressing a button with the mouse.
Invisible recaptcha check fails if you try to access your page via automated tests (in my case chrome browser) since chrome has a feature to recognize if the browsers is controlled by such software... so try to create easy tests in Python or Java(+webdriver), to see if recaptcha is implemented correctly.
If you did not implement the code yourself, the first thing to check is the source code, see if reCaptcha is actually loaded. When using a CMS, I search for this line (or similar):
script type='text/javascript' async defer src='https://www.google.com/recaptcha/api.js?onload=renderInvisibleReCaptcha&render=explicit&hl=de-CH'
If you have the luxury of a VPN, switch to a bad rep IP or country or an IP commonly used for P2P. This works for me most of the time.
Go thru the steps to test the re-captcha with dev tools open. Go to the network tab and find the POST where the form is submitted. Right click that line and copy as cURL.
Paste into the CLI and voila, you get the failure and the output of the cURL is the HTML that the server sent back.
2022 Answer that worked for me!
Please do give this one a go as it's the only one that actually worked for me after hours of testing.
Go to your reCAPTCHA admin account: https://www.google.com/recaptcha/admin/
Go to your site settings
Move the "Security Preference" slider all the way to the right to make reCAPTCHA trigger more often
Open an Incognito window, or even better a secure web browser with a built in encrypted proxy (I think this makes reCAPTCHA more suspicious of your browser) - I used a browser call Epic Browser, which is also Chromium based: https://www.epicbrowser.com/. Note: Just using Incognito on Chrome did not work for me, hence why I went to go use Epic.
Attempt to submit your form - you should hopefully receive the popup check!
As others mentioned you can also test if the browser alone triggers reCAPTCHA check by going to https://www.google.com/recaptcha/api2/demo?invisible=true and submitting the form.
This finally helped me as I was going crazy thinking my reCAPTCHA setup was not working and that I coded something wrong... But no, it was working! Just not very suspicious apparently.
I hope this helps someone as it did me!
The way I tackled it:
Go to your POST to google.com/recaptcha/api/siteverify
Before the response is returned, set the success property in the response to false.
I'm using Guzzle in Laravel (thanks to this example):
$response = $client->post('https://www.google.com/recaptcha/api/siteverify', [
'query' => [
'secret' => env('RECAPTCHA_V3_SECRET_KEY'),
'response' => $value,
'remoteip' => $_SERVER['REMOTE_ADDR'],
]
]);
$body = $response->getBody();
$contents = json_decode($body->getContents());
$contents->success = false;
return $contents;

IE11 losing session or cookie info after window.open

Here's my problem
I have a website(X1.com) which contains a login and a button(window.open) after login to open another app (X2.com) in a detached window.
this X2.com has list of items and when I double click an item it is supposed to open X1.com/item1.
All of this was working as expected when I was using IE9, chrome and firefox.
But when updated my IE9 to IE11 double clicking the item on X2.com is taking to the login page of X1.com saying session timed out. Chrome still works fine. When I close/logout and login again to X1.com keeping X2.com window open X2.com is able to open that X1.com/item1 page properly.
Is there an internet option or security setting or a plugin in IE that's blocking X2.com from opening X1.com/item1 page first time?
My company uses IE11 only for operations and that's why I have to get it working. Please ask if my question is not clear. I can provide the exact urls if required.
It's a common issue in IE11, as a workaround add registry entry of value 0 at:
HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/Main/TabProcGrowth

Does Watir-Webdriver support clicking on links where the destination is a javascript?

I am new to Ruby and Watir-Webdriver. I have a suite of automation for our site written in VBScript and I want to convert it to Ruby/Watir because I now have to support Firefox. I've found I really like Ruby, and I'm working on Watir, but I've spent a week now trying to get Webdriver to even display my login screen.
The site begins with a "Warning screen" with an "I agree" area. The user click on the I agree and is presented with a login screen.
<body onload="showMessage('true')"><div id="login"><div id="message"><map name="accept">
<area href="javascript:showLogin();" shape="rect" coords="280,390,384,432" />
</map></div></div></body>
I need to click the area to present the login screen (which is the same page, a form really, just hidden). I do this all day long with VBScript:
objExplorer.Document.GetElementsByTagName("area")(0).click
However, using Watir-Webdriver, browser.area(:index, 0).click does nothing.
puts browser.area(:index, 0).shape
=>RECT
puts browser.area(:index, 0).coords
=>280,390,384,432
So, I know the script can "see" the area element and read its attributes. It just doesn't do anything with the click event.
If I use a browser.goto on the href itself:
browser.goto("javascript:showLogin();")
the login becomes visible, but I cannot interact with the elements (set the text fields for user name and password). I'm looking at the page with the developer tools window open (to view the HTML) and it just says "Loading...".
This is where I am stuck. Interestingly, if I use the login form's name and do a:
browser.form(:name, "LoginForm").submit
I get the popup message from the form that the user name and password are blank, so there is still some interaction.
Of course, if I manually enter the user name/password, I can submit the form fine even if it says "Loading...".
I understand "when_present.click" and other techniques for waiting for the browser; these don't work. My dilemma is I can't click the area, and if I use the goto on the javascript, the browser then ignores the automation from Watir.
Thanks for your help. Even an answer of "Sorry, Watir or Webdriver won't do this" is acceptable to me. It will allow me to move on and look for other solutions.
Edit after questions in comments:
Sorry, the site is not public, so I can't post a link.
As for working in Firefox, the script works just fine. IE is having the issue. The comments got me thinking: I do get a "...certificate not issued by trusted..." certificate error upon first navigating to the site. Could the certificate error I get in IE cause some sort of disconnect to the automation before presenting the form? I use a line I got here on stackoverflow to click past the cert error:
browser.goto("javascript:document.getElementById('overridelink').click()")
But now I think maybe this might be a part of the issue. I have gone to my IE (using IE 9) options and unchecked the security options for checking certs, but to no avail. If this may be causing the issue, I'll have to go negotiate with the infrastructure team to generate certificates for us to download each time they build a new server.
Ok, I guess after reading hundreds of posts and hours of Google searches I finally found a solution to my issue: browser.execute_script.
browser.execute_script("showLogin();")
It was that simple. Using browser.goto hung on loading the page and webdriver timed out. Using execute_script works perfectly!

Creating a Forms Authentication Rule

I am using Google search appliance and encountered an issue while trying to crawl forms based site. Once I add required fields to create a "new forms authentication" rule, I get a forms authentication login wizard where I enter my credentials. However, I am unable to proceed further as I get a JavaScript error (_doPostBack method ) within the wizard while trying to login. Any ideas on how I can fix this issue?
The login button is out-of-the box aspx.net button. So no manipulation is done. Any help regarding this is much appreciated.
Try turning off javascript. The GSA only needs to know about the communication between client and server. If your login-form doesn't work without javascript enabled, you'll have to edit the html in-place. I use the firebug plugin in firefox to accomplish this.

Why Doesn't Closing A Tab Delete A Session Cookie?

I'm using session-based cookies with my website. To my complete surprise, I noticed if I set a session cookie (not a persistent cookie), close a tab, and then reconnect to the site, the session cookies are still there. That's not what I would have expected, actually. I would have expected the session cookies to be deleted.
If you close the browser, a session cookie is deleted, so why not closing a tab to have the same result?
Therefore, I'm using PHP5 and jQuery. Is there anything I can do such that when a tab is closed I can fix this session issue? Unfortunately the onbeforeunload event on the BODY tag is not useful here because when you click away from a page it fires that event, not just closing a tab.
The session cookie is per-process not per window. So even if you selected New Window you'd still get the same session id. This behavior makes sense. You wouldn't want a user to re-sign in each time they opened a new window while browsing your site.
I'm not aware off hand of any real way around this.
This is by design and trying to change it is a very bad idea. What if a user opens a link in a new tab and closes that? Should the session in the original tab be destroyed? Of course not! This demonstrates why you should not even think about this.
A session ends when the last browser window closes. If you want something else, you:
do not want sessions;
need to make your own "mini-session" infrastructure;
are probably in for a world of hurt and bugs.
Session web storage can be used instead of cookies if you need to depend on tab closure.
You can also write a javascript that detects when a tab is closed and delete the cookie in the javascript
I found a work around.
I'm working in ASP.NET C#. I have a Master Page for all the pages of the site except for the Login page. In the Master Page Sever Page Load event I get the Url of the referring page and check if it contains the root of the the site, if not I redirect to the Login page and since it doesn't have that Master Page it displays.
This works if I try to get to a page from another site or if I enter the Url to the address box of the browser. So if you close the tab and you try to reenter from another tab or reopen the tab, even tho the cookie hasn't been killed you can't reenter the site without going thru Login. This works also even if you haven't closed the tab and your navigating between different sites in the same tab.
This is the code
if (Request.UrlReferrer == null || !Request.UrlReferrer.AbsoluteUri.ToString().Contains("root"))
{
Response.Redirect("~/Account/Login.aspx");
}
When navigating from within the site there's no problem even if you open a link to another page in the site to another tab it opens.
If you want to be additionally sure you can kill the session and authentication cookie in that if clause before redircting to the Login page.
This won't work when a user navigated to another site in the same tab and presses the browsers back to button because that works on cache and doesn't automatically send a request to the server.
So this doesn't kill the session or authentication cookie on closing the tab, but it can help prevent reentering the site without logging in after closing the tab.

Resources