TestCafe Login with .httpAuth suddenly does not work anymore. Page shows html "...charset-hammerhead-shadow-ui..." - ui-automation

A super simple Fixture (TestCafe Script) with .httpAuth worked fine at first. Then I had a few password resets with my Windows account. And now when running the same Fixture the browser shows about 12 lines of html code:
<html><head><meta class="charset-hammerhead-shadow-ui" charset="iso-8859-1"><link rel="stylesheet" type="text/css" class="ui-stylesheet-hammerhead-shadow-ui" href="http://172.24.88.142:2346/testcafe-ui-styles.css"><script type="text/javascript" class="script-hammerhead...........etc
This is with Edge browser and also with Chrome. With IE it opens an empty page :-(
I even deleted the browser cache for Edge and IE but with no luck.
testcafe -v : 1.19.0
Edge Version 103.0.1264.44 (Official build) (64-bit)
new-fixture.testcafe.js:
fixture `New Fixture`
.page `http://my.company/path`
.httpAuth({ username: 'myusername', password: 'mypassword', domain: 'mydomain' });
test('New Test', async t => {
await t
.click('body');
});
PS:
I am new to TestCafe and TestCafe Studio and I defenitely like it!
With one of my first tests with TestCafe Studio I opened our intranet with a Codeless recording resulting in "401 UNAUTHORIZED".
So I clicked the Fixture > Edit and chose 'Basic HTTP/NTLM authentication' and entered my User name, Password and Domain.
The code worked fine for about a day!!! :-)
BUT THEN for the next two days I had several times my Windows Account LOCKED OUT. At first our IT people helped me to reset my password and then I found that I can click on "Reset password" on the login screen myself!
Anyhow, my TestCafe script does not work anymore since then, showing just the 12 lines of html code.
Please Help!

Related

Facebook OpenGraph Issue

I have done extensive searches on the Internet for a solution to this issue, but all that I can find is always related to making timeout adjustments on a Linux machine running Apache. I am running IIS version 10 on Windows 2019 Server. When Facebook changed it's website approximately 30-days ago, the Open Graph image sharing protocol stopped working properly. An attempt to use the Facebook Developer scraper, I get the following timeout error.
Curl Timeout
The request to scrape the URL timed out.
Curl Error
Curl error: 28 (OPERATION_TIMEOUTED)
I also filed a bug report with Facebook, but they simply closed the report, stating that the problem is with my server or network connection. I opened and inspected the server's error logs, and found no issues. I then setup and inspected the IIS logs, and found that Facebook indeed hit the server properly and fetched an image and reported it back. But the timeout error still occurs and the image is not shared upon an attempt to share it. Here are the records from the IIS logs that seem to indicate that Facebook is indeed contacting my server correctly, except for the fact that they are using "http" rather than "https." This has been reported to Facebook.
2020-12-24 18:31:51 W3SVC3 EDENUSA-FS11 10.1.252.250 GET /images/qr_code/edenusa_qr_code.png - 443 - 69.171.249.113 facebookexternalhit/1.1+(+http://www.facebook.com/externalhit_uatext.php) - www.edenusa.com 200 0 0 70
2020-12-24 18:32:02 W3SVC3 EDENUSA-FS11 10.1.252.250 GET /rent-lighting/lighting/rent_lighting.asp - 443 - 69.171.249.111 facebookexternalhit/1.1+(+http://www.facebook.com/externalhit_uatext.php) - www.edenusa.com 200 0 0 21410
And following is a snippet of the required meta code in our header area, from the home page:
<!DOCTYPE html>
<head>
<title>Rent a Stage | Rent a Sound System | Rent Lighting System | Rent Up Lighting</title>
<meta prefix="fb: https://ogp.me/ns/fb#" property="fb:app_id" content="1376081292633720">
<meta property="og:url" content="https://www.edenusa.com/index.asp" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:title" content="Rent a Stage | Rent a Sound System | Rent Lighting System | Rent Up Lighting" />
<meta property="og:image" content="https://www.edenusa.com/images/homepage/compressed/indian_temple_in_chino_hills.jpg" />
<meta property="fb:app_id" content="1376081292633720" />
I've worked on this for over a week now, without resolution. Anybody else having this issue, or know of a way to resolve the timeout issue?
This issue was resolved as follows:
We had to remove REST code in the GLOBAL.ASA that goes out and fetches geographic info (City and State only) based upon the client's IP address. The service endpoint is a bit slow, and required that a longer timeout than might be considered "normal" to be used. So when this code branch was commented out, the Facebook CURL timeout error no longer occurred. We are looking at another IP geographic info service that is faster.
After completing step 1, we found that on the home page ONLY, we had to leave the INDEX.ASP portion of the URL in place. We had code the stripped the "index.asp" off the canonical URL. For unknown reason, Facebook looks at the HTTP header, sees that the original URL has the "index.asp" included, and then compares that to the URL specified in the "og:url" meta tag.
In conclusion, the most recent rollout of Facebook includes new code that configured a shorter timeout value for CURL. This caused websites out on the web with a somewhat shorter startup time, to experience this issue. So for now, the only fix is to monitor a site's startup time, and shorten it down enough for the Facebook debugger/scraper to function as it did before the most recent changes.

Loading PayPal Smart Buttons (JS SDK) with Brave Browser throws errors

I'm trying to get a basic PayPal button on my web page, but I can't even load the API without getting errors. I've asked for help on PayPal's own forum, but no one replies.
Here is my page. I'm running in sandbox mode. I've replaced the actual client ID below with [CLIENTID].
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>PayPal test</title>
</head>
<body>
<script src="https://www.paypal.com/sdk/js?debug=true&client-id=[CLIENTID]"></script>
</body>
</html>
I can add a button to the page, and make a purchase, so the buying process works. But it always throws this error at page load. I'm on Win10, Brave Browser (based on Chromium).
js?debug=true&client…ruzpDLhao-FzS6:2659 unhandled_error
{err: "Error: Invalid json: .↵ at XMLHttpRequest.<anon…[CLIENTID]:2597:55)", timestamp: "1601234382102", referer: "localhost", uid: "9b7c68f416_mtk6mtc6ntq", env: "sandbox"}
env: "sandbox"
err: "Error: Invalid json: .↵ at XMLHttpRequest.<anonymous> (https://www.paypal.com/sdk/js?debug=true&client-id=[CLIENTID]:2597:55)"
referer: "localhost"
timestamp: "1601234382102"
uid: "9b7c68f416_mtk6mtc6ntq"
__proto__: Object
===============================================================
UPDATE
Sorry, I incorrectly wrote I am on Google Chrome. I'm on Brave Browser (based on Chromium). I've tested on Google Chrome and MS Edge, and it works there. Brave is where the errors happen. I've tried to add a new sandbox app, but get the same error. I've used the Brave browser settings to allow my site all privileges, but still the same error.
Live test:
Just loading API: https://www.trainerslab.app/PayPalTest.html
Example from PayPal dev site: https://www.trainerslab.app/PayPalTest2.html
Screenshot:

Cannot save template constants in typo3

I updated the constants of my template in the web editor of typo3. Each time I click on Save or Close+Save I get a pop-up from my browser to download a file. The content is like this:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Unavailable</title>
</head><body>
<h1>Service Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>
The minimal example to get this is:
page.theme {
socialmedia.channels {
facebook.url = https://www.facebook.com/typo3/
}
}
It seams that Typo3 has a problem with the dots in the url. If I remove all of them or escape with a backslash "\" everything works. (But the backslash remains in the url and therefore produce invalid urls)
Some months before everything works fine. Some other templates in the same installation have also urls in their configuration and they are working (the page is rendered normaly). If I try to save them noe without any changes I get the same error.
That is the system I use:
Typo3-Version: 9.5.20
Webserver: Apache/2.4.43 (Unix)
PHP-Version: 7.3.21
Database: MySQL 5.6.42
Applicationcontext: Production
OS: SunOS SunOS localhost 5.10 Generic_150401-49 i86pc
Bootstrap Package: 11.0.2

Integrate With Google button: Failed to execute ‘postMessage’ on ‘DOMWindow’

I am trying to add Integrate With Google button to our website using the instructions at https://developers.google.com/gsuite/marketplace/button.
According to the instruction, I need to add:
<script type="text/javascript" src="https://apis.google.com/js/platform.js"/>
to head and then incorporate:
<g:additnow applicationid="[appid]"></g:additnow>
The button is not rendered. The error in browser console says:
Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://accounts.google.com’) does not match the recipient window’s origin (‘http://server.local:8090’).
Load denied by X-Frame-Options: `
https://apis.google.com/additnow/additnow.html?usegapi=1&applicationid=[appid]&origin=http%3A%2F%2Fserver.local%3A8090&gsrc=3p&ic=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en_US.Vch8vd-lM6E.O%2Fm%3D__features__%2Fam%3DAQE%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCOgsbyjgLVijKgLfaXMbki4Pxbd_A#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Claunchurl&id=I0_1517552817258&_gfid=I0_1517552817258&parent=http%3A%2F%2Fserver.local%3A8090&pfname=&rpctoken=19038946
> does not permit cross-origin framing.
A couple of points:
I am loading the page using the Tomcat web server
server.local resolves to 127.0.0.1
http anywhere browser extension is disabled
The page is not being loaded in an iframe
I tried loading platform.js without https. make no difference.
Any ideas?

'browser.goto()' generates UnhandledAlertError

I tried to use the 'watir-webdriver', and it works just fine (on Ubuntu Linux 11.10, with Firefox).
However for one website, that checks the browser and displays an modal alert, I get an error when calling the 'goto()' method:
b.goto('http://www.website.com/that/checks/the/browser/and/displays/modal/alert.html')
Selenium::WebDriver::Error::UnhandledAlertError: Modal dialog present
from [remote server] file://....
Here is the content of the HTML page:
<script type='text/javascript' language='JavaScript'>browserCheck();</script>
How can I avoid getting this error?
Regards,
PM