应用引擎 - /_ah/openid_verify 上的间歇性 500 错误

2022-09-01 07:53:23

我在使用Google openid登录我的应用程序时遇到间歇性错误。

它们被发送到的链接是 。http://www.example.com/_ah/login_redir?claimid=www.google.com/accounts/o8/id&continue=http://www.example.com/login2?returl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8

然后,当他们授予对我的应用程序的访问权限时,有时URL上会出现500错误:http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343

500错误甚至没有显示在我的日志中。这似乎发生在大约5-10%的登录中。


答案 1

对于错误500表示 - 页面未找到/ ID / 密码丢失

对于相同的内容,您需要使用openID再次检查,或者仅出于相同的测试目的制作一个Google ID


答案 2

在 service() 方法中,通过包装 doGet() 来捕获并输出异常,如下所示:

.
.
.
try {
    doGet(request,response);
} catch (Throwable e) {
    writer.println("<pre>");
    e.printStackTrace(writer);
    writer.println("</pre>");
}
.
.
.

推荐