问题描述
我从1天开始就坚持这个问题,但我仍然无法理解这个问题的原因,
4-5倍,几乎20-30个api调用运行良好,但是当api开始发出错误403 Forbidden时,它将在每个api调用中给出相同的错误4-5分钟,然后再次重新启动
有关更多信息,我想告诉您以解决此问题,我已经更新了具有最新依赖项的代码。
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.6.2'
implementation 'com.squareup.okhttp3:okhttp:4.2.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.1'
出现错误时,日志为:-
E/SensorManager: unregisterListenerImpl callingApp: com.asianmedia.easterneye,callingPid:31997,callingUid:10592
V/FA: Recording user engagement,ms: 14556
V/FA: Connecting to remote service
I/Surface: opservice is null false
V/FA: Activity paused,time: 99637550
D/FA: Logging event (FE): user_engagement(_e),Bundle[{firebase_event_origin(_o)=auto,engagement_time_msec(_et)=14556,firebase_screen_class(_sc)=MainActivity,firebase_screen_id(_si)=2594009799761241072}]
V/FA: Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 2
D/AutoManageHelper: onStart true {0=com.google.android.gms.common.api.internal.zaj$zaa@198c11b}
D/OkHttp: --> POST https://www.easterneye.biz/api/eeappwithheader_v5.PHP/getPhotoVideo
Content-Type: application/json
Content-Length: 32
V/FA: Activity resumed,time: 99638872
E/SensorManager: registerListenerImpl sensorName:lsm6ds3c Accelerometer Non-wakeup,isWakeUpSensor:false,callingApp: com.asianmedia.easterneye,callingUid:10592
D/OkHttp: {"categoryId":"41","isUk":false}
--> END POST (32-byte body)
D/OkHttp: --> POST https://www.easterneye.biz/api/eeappwithheader_v5.PHP/getCaltegoriesPostList
Content-Type: application/json
D/OkHttp: Content-Length: 61
D/OkHttp: {"categoryId":"263","isUk":false,"nextPage":"1","userId":"0"}
--> END POST (61-byte body)
D/DecorView: onWindowFocusChangedFromViewRoot hasFocus: true,DecorView@9cc6c83[MainActivity]
D/OkHttp: <-- 403 https://www.easterneye.biz/api/eeappwithheader_v5.PHP/getPhotoVideo (1251ms)
date: Fri,28 Aug 2020 07:08:02 GMT
content-type: text/html; charset=UTF-8
set-cookie: __cfduid=d261ae18891ddc193ab29d7249e607aa91598598481; expires=Sun,27-Sep-20 07:08:01 GMT; path=/; domain=.easterneye.biz; HttpOnly; SameSite=Lax
D/OkHttp: x-powered-by: PHP/7.3.20
cache-control: private
vary: Accept-Encoding
x-turbo-charged-by: LiteSpeed
cf-cache-status: DYNAMIC
cf-request-id: 04d57e1def00000fd698a42200000001
expect-ct: max-age=604800,report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 5c9c32dcbcba0fd6-MRS
D/OkHttp: <!DOCTYPE html>
<html lang="en">
<head>
<Meta charset="UTF-8">
<Meta name="viewport" content="width=device-width,initial-scale=1">
<Meta http-equiv="Cache-control" content="max-age=0">
<title>EasternEye</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Roboto:400,500,300,300italic">
<style type="text/css">
html,body {
margin: 0;
padding: 0;
min-width: 100%;
width: 100%;
max-width: 100%;
min-height: 100%;
height: 100%;
max-height: 100%;
}
.wp-defender {
height: 100%;
display: flex;
align-items: center;
font-family: Roboto;
color: #000;
font-size: 13px;
line-height: 18px;
}
.container {
margin: 0 auto;
text-align: center;
}
.image {
width: 128px;
height: 128px;
background-color: #F2F2F2;
margin: 0 auto;
border-radius: 50%;
background-image: url("https://www.easterneye.biz/wp-content/plugins/wp-defender/assets/img/def-stand.svg");
background-repeat: no-repeat;
background-size: contain;
margin-bottom: 30px;
}
.powered {
D/OkHttp: position: absolute;
bottom: 20px;
display: block;
text-align: center;
width: 100%;
font-size: 10px;
color: #C0C0C0;
}
.powered strong {
color: #8A8A8A;
font-weight: normal;
}
</style>
</head>
<body>
<div class="wp-defender">
<div class="container">
<div class="image">
D/OkHttp: </div>
<p>You have been locked out due to too many attempts to access a file that doesn't exist.</p>
</div>
<div class="powered">Powered by <strong>Defender</strong></div>
</div>
</body>
</html>
<-- END HTTP (1639-byte body)
W/edia.easterney: Accessing hidden method Lsun/misc/Unsafe;->getobjectVolatile(Ljava/lang/Object;J)Ljava/lang/Object; (greylist,linking,allowed)
D/OkHttp: <-- 403 https://www.easterneye.biz/api/eeappwithheader_v5.PHP/getCaltegoriesPostList (1532ms)
date: Fri,27-Sep-20 07:08:01 GMT; path=/; domain=.easterneye.biz; HttpOnly; SameSite=Lax
x-powered-by: PHP/7.3.20
cache-control: private
vary: Accept-Encoding
x-turbo-charged-by: LiteSpeed
D/OkHttp: cf-cache-status: DYNAMIC
cf-request-id: 04d57e1def00000fd698a43200000001
expect-ct: max-age=604800,report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 5c9c32dcbcbd0fd6-MRS
D/OkHttp: <!DOCTYPE html>
<html lang="en">
<head>
<Meta charset="UTF-8">
<Meta name="viewport" content="width=device-width,300italic">
<style type="text/css">
D/OkHttp: html,body {
margin: 0;
padding: 0;
min-width: 100%;
width: 100%;
max-width: 100%;
min-height: 100%;
height: 100%;
max-height: 100%;
}
.wp-defender {
height: 100%;
display: flex;
align-items: center;
font-family: Roboto;
color: #000;
font-size: 13px;
line-height: 18px;
}
.container {
margin: 0 auto;
text-align: center;
}
.image {
width: 128px;
height: 128px;
background-color: #F2F2F2;
margin: 0 auto;
border-radius: 50%;
background-image: url("https://www.easterneye.biz/wp-content/plugins/wp-defender/assets/img/def-stand.svg");
background-repeat: no-repeat;
background-size: contain;
margin-bottom: 30px;
}
.powered {
position: absolute;
bottom: 20px;
display: block;
text-align: center;
D/OkHttp: width: 100%;
font-size: 10px;
color: #C0C0C0;
}
.powered strong {
color: #8A8A8A;
font-weight: normal;
}
</style>
</head>
<body>
<div class="wp-defender">
<div class="container">
<div class="image">
</div>
<p>You have been locked out due to too many attempts to access a file that doesn't exist.</p>
</div>
<div class="powered">Powered by <strong>Defender</strong></div>
</div>
</body>
</html>
<-- END HTTP (1639-byte body)
W/edia.easterney: Accessing hidden method Lsun/misc/Unsafe;->getobjectVolatile(Ljava/lang/Object;J)Ljava/lang/Object; (greylist,allowed)
V/ViewRootImpl: The specified message queue synchronization barrier token has not been posted or has already been removed
W/Choreographer: Already have a pending vsync event. There should only be one at a time.
W/System: A resource Failed to call close.
I/chatty: uid=10592(com.asianmedia.easterneye) FinalizerDaemon identical 2 lines
W/System: A resource Failed to call close.
V/FA: Inactivity,disconnecting from the service
V/FA: Session started,time: 99658879
D/FA: Setting user property (FE): _sid,1598598499
V/FA: Connecting to remote service
D/FA: Setting user property (FE): _sno
V/FA: Connection attempt already in progress
D/FA: Logging event (FE): session_start(_s),firebase_screen_id(_si)=2594009799761241072,session_id(_sid)=1598598499}]
V/FA: Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 3
V/FA: Inactivity,disconnecting from the service
请帮助我解决这个问题,我真的不明白为什么 错误永远不会出现在WIFI上网中(如果是服务器错误),但是会出现 移动网络,它不仅发生在我的手机中,还发生在 我尝试过3-4的所有手机
在此先感谢,我们将不胜感激
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)