简体   繁体   English

CasperJS已被重定向,然后以status = fail(HTTP 302)退出

[英]CasperJS has been redirected and then exited with status=fail (HTTP 302)

CasperJS version 1.1.4 at /opt/casperjs, using phantomjs version 2.1.1. 使用phantomjs版本2.1.1的/ opt / casperjs中的CasperJS版本1.1.4。 Running on centOS. 在centOS上运行。

Trying to get through authentication page which runs on ASP.net webforms, but after submit button click: 试图通过在ASP.net Webforms上运行的身份验证页面,但是在提交按钮之后单击:

casper.then(function(){
if (this.exists("#LoginTyreLink_LoginButton")) {
    this.echo("Login button found");
    this.click("#LoginTyreLink_LoginButton", function(){
        saveShot("login_button_clicked");
    });
}
});

I am getting the redirect cycle and timeout: 我收到重定向周期和超时:

[debug] [phantom] Mouse event 'mouseup' on selector: #Loginsite_LoginButton
[debug] [phantom] Mouse event 'click' on selector: #Loginsite_LoginButton
[info] [phantom] Step anonymous 14/17: done in 3131ms.
[info] [phantom] Step _step 15/17 https://site.brand.eu/link/ (HTTP 200)
[info] [phantom] Step _step 15/17: done in 3155ms.
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link//Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail (HTTP 302): https://site.brand.eu/link/Login.aspx
[debug] [phantom] Automatically injected includes/jquery-3.3.1.js client side
[warning] [phantom] Casper.waitFor() timeout
[error] [phantom] Wait timeout of 20000ms expired, exiting.
Wait timeout of 20000ms expired, exiting.
[debug] [phantom] Navigation requested: url=about:blank, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "about:blank"

I've tried to run the script on my local machine - it succeded, but can not on my remote centOS machine. 我尝试在本地计算机上运行脚本-成功,但是无法在远程centOS计算机上运行。

PS 聚苯乙烯

It was fine for over a year... 一年多没事...

As I mentioned above - the platform is centOS. 如上所述,该平台是centOS。 It's hilarious but... 这很有趣,但是...

sudo yum update

Then: 然后:

sudo reboot

Mission accomplished. 任务完成。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果我使用 http 状态代码 302 向“/sell”发出 GET 请求,为什么我总是被重定向到“/”? - why do i always get redirected to "/" if i make GET request to "/sell" with http status code 302? 响应返回302而不是401 http状态 - Response returns a 302 instead of a 401 http status 已阻止从源“ null”访问Twitter_OAuth_Url(从“ http:// localhost:3000 / api / twitter-login”重定向到)的XMLHttpRequest - Access to XMLHttpRequest at Twitter_OAuth_Url ( redirected from 'http://localhost:3000/api/twitter-login') from origin 'null' has been blocked nodejs:node-http-proxy和harmon:从端点重写html响应,而不是302重定向响应。 - nodejs: node-http-proxy and harmon: rewriting the html response from the end point instead of the 302 redirected response. 开个玩笑,一个工作进程未能正常退出并已被强制退出 - On jest, A worker process has failed to exit gracefully and has been force exited Docker应用程序处于退出(0)状态 - Docker app in Exited (0) status Amazon Alexa 302状态代码,来自HTTP请求调用的空JSON对象 - Amazon Alexa 302 status code, empty JSON object from http request call 发送请求后,Firebase http 无法设置标头 - Firebase http cant set headers after request has been sent http.get-等待文件生成 - http.get - Wait until file has been generated 'http://127.0.0.1:5500' 已被 CORS 策略阻止 - 'http://127.0.0.1:5500' has been blocked by CORS policy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM