Google登录失败,并显示HTTP错误400,“抱歉,那里出了点问题.再试一次." [英] Google login fails with HTTP error 400 saying "Sorry, something went wrong there. Try again."

查看:2553
本文介绍了Google登录失败,并显示HTTP错误400,“抱歉,那里出了点问题.再试一次."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了一个脚本,该脚本在Google Chrome中打开了我们公司的Google网站(并非无头),并在该页面上进行了一些自动化工作.偶尔需要刷新登录信息,这对于我手动登录来说是什么.在过去的几个月中,直到上周,它一直运行良好.今天,我注意到输入服务器的Gmail地址并单击下一步"按钮后,由于HTTP状态为400的服务器响应,我收到了上述错误消息.

I had set up a script which opened a Google site of our company in Google Chrome (not headless) and did some automated work on that page. The login information had to be refreshed occasionally what for I manually logged in. That had been working perfectly the last couple of months until last week. Today I noticed that I get the above mentioned error message as a result of a server response with HTTP status 400 upon entering my Gmail address and clicking the Next button.

木偶版本:2.0.0
平台/操作系统版本:Windows 10
网址(如果适用): https://sites.google.com/.. .
Node.js版本:v12.13.0

Puppeteer version: 2.0.0
Platform / OS version: Windows 10
URLs (if applicable): https://sites.google.com/...
Node.js version: v12.13.0

  1. 运行一个Puppeteer脚本以打开一个需要登录的Google网站.

  1. Run a Puppeteer script to open a Google Site which requires login.

(async () => {
try {
const browser = await puppeteer.launch({headless: false, userDataDir: "<ProfileDirectory>"});
const pageLogin = await browser.newPage();
await pageLogin.goto('https://sites.google.com/...', {waitUntil: 'networkidle2'});
...
await browser.close();
}
catch (error) {
console.log(error.stacktrace);
}
})();

  • 手动输入Gmail地址,然后单击下一步".

  • Manually enter Gmail address and click Next.

    获取错误消息对不起,那里出了点问题.再试一次."服务器返回HTTP状态代码400的结果.

    Get error message "Sorry, something went wrong there. Try again." as a result of a server response with HTTP status code 400.

    更新:

    手动打开Chrome(相同的userDataDir),相应的Google网站仍然照常工作.

    Update:

    Manually opening Chrome (same userDataDir) and the respective Google site still works as usual.

    推荐答案

    在研究Firefox的Puppeteer时,我注意到(1)Puppeteer下载自己正在执行的本地Google Chrome二进制文件,以及(2)已安装Puppeteer版本2.0.0已过时.这意味着,Puppeteer实际使用的浏览器可能也已过时. 该解决方案就像将Puppeteer更新到最新版本2.1.1一样容易.

    While I was doing research on Puppeteer for Firefox, I noticed that (1) Puppeteer downloads its own local Google Chrome binaries it is executing and (2) my installed Puppeteer version 2.0.0 was outdated. Meaning, the browser actually used by Puppeteer was probably also outdated. The solution was as easy as to update Puppeteer to the latest version 2.1.1.

    这篇关于Google登录失败,并显示HTTP错误400,“抱歉,那里出了点问题.再试一次."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆