zhkrb / cloudflare-scrape-Android

A tool to bypass the Cloudflare DDOS page
MIT License
70 stars 17 forks source link

[some Bug] #32

Open midou221 opened 3 years ago

midou221 commented 3 years ago

Sometimes this error occurs when a onPageFinished is called

Caused By : java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.contains(java.lang.CharSequence)' on a null object reference

com.zhkrb.cloudflare_scrape_webview.webClient.AdvanceWebClient.onPageFinished(AdvanceWebClient.java:118)
jx0.b(chromium-SystemWebViewGoogle.aab-stable-447210103:2)
N9.handleMessage(chromium-SystemWebViewGoogle.aab-stable-447210103:62)
android.os.Handler.dispatchMessage(Handler.java:111)
android.os.Looper.loop(Looper.java:207)
android.app.ActivityThread.main(ActivityThread.java:5763)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

and also there are some errors when cookie start converting from list To String

Caused By : java.lang.StringIndexOutOfBoundsException: String index out of range: -1

java.lang.String.substring(String.java:2064)
com.zhkrb.cloudflare_scrape_webview.util.ConvertUtil.listToString(ConvertUtil.java:24)
org.mido.mangabook.feature.main.MainActivity$9.onSuccess(MainActivity.java:876)
com.zhkrb.cloudflare_scrape_webview.dialogFragment.WebViewDialog$3.run(WebViewDialog.java:278)
android.app.Activity.runOnUiThread(Activity.java:6970)
com.zhkrb.cloudflare_scrape_webview.dialogFragment.WebViewDialog.success(WebViewDialog.java:275)
com.zhkrb.cloudflare_scrape_webview.dialogFragment.WebViewDialog.getCookieSuccess(WebViewDialog.java:250)
com.zhkrb.cloudflare_scrape_webview.dialogFragment.WebViewDialog.access$1500(WebViewDialog.java:38)
com.zhkrb.cloudflare_scrape_webview.dialogFragment.WebViewDialog$MyHandler.handleMessage(WebViewDialog.java:338)
android.os.Handler.dispatchMessage(Handler.java:107)
android.os.Looper.loop(Looper.java:225)
android.app.ActivityThread.main(ActivityThread.java:7563)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)