Tencent / VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Other
11.81k stars 1.61k forks source link

shouldOverrideUrlLoading方法里打印日志发现url加载了两次 #233

Closed mazihao66 closed 6 years ago

mazihao66 commented 6 years ago

What steps will reproduce the problem? 该问题的重现步骤是什么?

  1. 加载一个url,shouldOverrideUrlLoading方法执行2次甚至3次

What is the expected output? What do you see instead? 你期待的结果是什么?实际看到的又是什么? 怎么避免执行两次shouldOverrideUrlLoading?

What version of the product are you using? On what operating system? 你正在使用产品的哪个版本?在什么操作系统上? sonic3.0.0 安卓7.0版本

Please provide any additional information below. 如果有的话,请在下面提供更多信息。

marlonlu commented 6 years ago

麻烦附带上当时重现的log

mazihao66 commented 6 years ago

05-03 11:40:03.868 8704-8704/com.zz.wzw.ylo2o I/SonicSdk_SonicSession: session(74965) create:id=_7f07a4892bb4b591c67fd212ab5bda04, url = http://ylo2o.bafangka.com/api/5fjxkggtgd/shop/union/?love. 05-03 11:40:03.868 8704-8704/com.zz.wzw.ylo2o I/SonicSdk_SonicSession: session(74965) now post sonic flow task. 05-03 11:40:03.869 8704-8704/com.zz.wzw.ylo2o D/SonicSdk_SonicEngine: onSessionStateChange:session(74965) from state 0 -> 1 05-03 11:40:03.869 8704-8704/com.zz.wzw.ylo2o I/SonicSdk_SonicSession: session(74965) bind client. 05-03 11:40:03.890 8704-9318/com.zz.wzw.ylo2o I/SonicSdk_DefaultSonicCacheInterceptor: session(74965) runSonicFlow verify html cache with sha1 success. 05-03 11:40:03.890 8704-9318/com.zz.wzw.ylo2o I/SonicSdk_SonicSession: session(74965) runSonicFlow verify cache cost 21 ms 05-03 11:40:03.890 8704-9318/com.zz.wzw.ylo2o I/SonicSdk_SonicSession: Session (_7f07a4892bb4b591c67fd212ab5bda04) send sonic request, etag=(26f0c2e3ddff3386c94b51b079b4a9af3b9c0329), templateTag=(26f0c2e3ddff3386c94b51b079b4a9af3b9c0329) 05-03 11:40:03.945 8704-8704/com.zz.wzw.ylo2o I/SonicSdk_QuickSonicSession: session(74965) onClientReady: have pending client core message ? -> false. 05-03 11:40:03.954 8704-8704/com.zz.wzw.ylo2o D/SonicSdk_SonicSession: session(74965) handleMessage: msg what = 5. 05-03 11:40:03.954 8704-8704/com.zz.wzw.ylo2o I/SonicSdk_QuickSonicSession: session(74965) handleClientCoreMessage_PreLoad:PRE_LOAD_WITH_CACHE load data. 05-03 11:40:05.088 8704-9318/com.zz.wzw.ylo2o D/SonicSdk_SonicServer: session(_7f07a4892bb4b591c67fd212ab5bda04) server connect cost = 1196 ms. 05-03 11:40:05.563 8704-9318/com.zz.wzw.ylo2o D/SonicSdk_SonicServer: session(_7f07a4892bb4b591c67fd212ab5bda04) server response cost = 475 ms. 05-03 11:40:05.573 8704-9318/com.zz.wzw.ylo2o I/SonicSdk_SonicUtils: separateTemplateAndData:sessionId(_7f07a4892bb4b591c67fd212ab5bda04) start, htmlString = <!DOCTYPE html>

mazihao66 commented 6 years ago

可以看到从首屏点击其他连接的时候shouldOverrideUrlLoading方法执行两次