status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.88k stars 984 forks source link

Blank view when open yearn.finance in Status WebView #11283

Closed Serhy closed 3 years ago

Serhy commented 3 years ago

Bug Report

Problem

The https://yearn.finance shown blank view when open in Android/iOS browser.

Expected behavior

https://yearn.finance content is shown in Webview

Actual behavior

Blank view:

Screenshot 2020-10-07 at 19 32 14

Reproduction

Additional Information

Logs

10-07 19:38:23.256 23999 24104 D ReactNativeJS: DEBUG [status-im.navigation:10] - :navigate-to :browser nil
10-07 19:38:23.392 23999 24104 D ReactNativeJS: DEBUG [status-im.ui.screens.routing.core:50] - :on-screen-focus :browser
10-07 19:38:23.411 23999 23999 D ConnectivityManager: requestNetwork; CallingUid : 10709, CallingPid : 23999
10-07 19:38:23.417 23999 23999 D ConnectivityManager: requestNetwork; CallingUid : 10709, CallingPid : 23999
10-07 19:38:23.438 23999 24055 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:23.438 23999 24055 D RNCWebView: new request 
10-07 19:38:23.438 23999 24055 D RNCWebView: url https://yearn.finance/
10-07 19:38:23.438 23999 24055 D RNCWebView: host yearn.finance
10-07 19:38:23.438 23999 24055 D RNCWebView: path /
10-07 19:38:23.438 23999 24055 D RNCWebView: main true
10-07 19:38:23.438 23999 24055 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9, Upgrade-Insecure-Requests=1}
10-07 19:38:23.438 23999 24055 D RNCWebView: method GET
10-07 19:38:23.470 23999 24104 D ReactNativeJS: DEBUG [status-im.utils.handlers:44] - Handling re-frame event:  :screens/on-will-focus
10-07 19:38:23.472 23999 24104 D ReactNativeJS: DEBUG [status-im.utils.handlers:44] - Handling re-frame event:  :set
10-07 19:38:23.474 23999 23999 D ViewRootImpl@cccd2c6[MainActivity]: Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x1 surface={valid=true 488875442176} changed=false
10-07 19:38:23.495 23999 24055 D RNCWebView: response headers content-type: text/html
10-07 19:38:23.495 23999 24055 D RNCWebView: content-length: 4303
10-07 19:38:23.495 23999 24055 D RNCWebView: last-modified: Fri, 25 Sep 2020 08:17:57 GMT
10-07 19:38:23.495 23999 24055 D RNCWebView: server: AmazonS3
10-07 19:38:23.495 23999 24055 D RNCWebView: date: Tue, 06 Oct 2020 19:00:17 GMT
10-07 19:38:23.495 23999 24055 D RNCWebView: etag: "a8652829284817fca8f1d613cb46c81c"
10-07 19:38:23.495 23999 24055 D RNCWebView: x-cache: Hit from cloudfront
10-07 19:38:23.495 23999 24055 D RNCWebView: via: 1.1 f78fee2989d34e40cb45ddfbcb9ba346.cloudfront.net (CloudFront)
10-07 19:38:23.495 23999 24055 D RNCWebView: x-amz-cf-pop: VIE50-C1
10-07 19:38:23.495 23999 24055 D RNCWebView: x-amz-cf-id: yVQaZUy1qsF7386whJdMf661MDVX9AmB4lAx4fyzJiRp1gFJeURdOQ==
10-07 19:38:23.495 23999 24055 D RNCWebView: age: 77886
10-07 19:38:23.495 23999 24055 D RNCWebView: response code 200
10-07 19:38:23.495 23999 24055 D RNCWebView: response suc true
10-07 19:38:23.495 23999 24055 D RNCWebView: inject our custom JS to this request
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD age 77886
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD content-length 4303
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD content-type text/html
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD date Tue, 06 Oct 2020 19:00:17 GMT
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD etag "a8652829284817fca8f1d613cb46c81c"
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD last-modified Fri, 25 Sep 2020 08:17:57 GMT
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD server AmazonS3
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD via 1.1 f78fee2989d34e40cb45ddfbcb9ba346.cloudfront.net (CloudFront)
10-07 19:38:23.495 23999 24055 D RNCWebView: HEAD x-amz-cf-id yVQaZUy1qsF7386whJdMf661MDVX9AmB4lAx4fyzJiRp1gFJeURdOQ==
10-07 19:38:23.496 23999 24055 D RNCWebView: HEAD x-amz-cf-pop VIE50-C1
10-07 19:38:23.496 23999 24055 D RNCWebView: HEAD x-cache Hit from cloudfront
10-07 19:38:23.496 23999 24055 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> return intercept response
10-07 19:38:23.498 23999 24055 D InpStreamWithInjectedJS: <head> tag was found
10-07 19:38:23.604 23999 24104 D ReactNativeJS: DEBUG [status-im.utils.handlers:44] - Handling re-frame event:  :set-in
10-07 19:38:23.608 23999 24055 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:23.608 23999 24055 D RNCWebView: new request 
10-07 19:38:23.608 23999 24055 D RNCWebView: url https://yearn.finance/static/css/main.60c6551b.chunk.css
10-07 19:38:23.609 23999 24055 D RNCWebView: host yearn.finance
10-07 19:38:23.609 23999 24055 D RNCWebView: path /static/css/main.60c6551b.chunk.css
10-07 19:38:23.609 23999 24055 D RNCWebView: main false
10-07 19:38:23.609 23999 24055 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=text/css,*/*;q=0.1, Referer=https://yearn.finance/}
10-07 19:38:23.609 23999 24055 D RNCWebView: method GET
10-07 19:38:23.609 23999 24055 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> intercept response is nil, delegating up
10-07 19:38:23.609 23999 24051 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:23.609 23999 24051 D RNCWebView: new request 
10-07 19:38:23.609 23999 24051 D RNCWebView: url https://yearn.finance/static/js/3.7f5c1137.chunk.js
10-07 19:38:23.609 23999 24051 D RNCWebView: host yearn.finance
10-07 19:38:23.609 23999 24051 D RNCWebView: path /static/js/3.7f5c1137.chunk.js
10-07 19:38:23.609 23999 24051 D RNCWebView: main false
10-07 19:38:23.609 23999 24051 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=*/*, Referer=https://yearn.finance/}
10-07 19:38:23.609 23999 24051 D RNCWebView: method GET
10-07 19:38:23.609 23999 24051 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> intercept response is nil, delegating up
10-07 19:38:23.611 23999 24051 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:23.612 23999 24051 D RNCWebView: new request 
10-07 19:38:23.612 23999 24051 D RNCWebView: url https://yearn.finance/static/js/main.b50722b8.chunk.js
10-07 19:38:23.612 23999 24051 D RNCWebView: host yearn.finance
10-07 19:38:23.612 23999 24051 D RNCWebView: path /static/js/main.b50722b8.chunk.js
10-07 19:38:23.612 23999 24051 D RNCWebView: main false
10-07 19:38:23.612 23999 24051 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=*/*, Referer=https://yearn.finance/}
10-07 19:38:23.612 23999 24051 D RNCWebView: method GET
10-07 19:38:23.612 23999 24051 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> intercept response is nil, delegating up
10-07 19:38:23.628 23999 24051 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:23.628 23999 24051 D RNCWebView: new request 
10-07 19:38:23.628 23999 24051 D RNCWebView: url https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800
10-07 19:38:23.628 23999 24051 D RNCWebView: host fonts.googleapis.com
10-07 19:38:23.628 23999 24051 D RNCWebView: path /css
10-07 19:38:23.628 23999 24051 D RNCWebView: main false
10-07 19:38:23.628 23999 24051 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=text/css,*/*;q=0.1, Referer=https://yearn.finance/static/css/main.60c6551b.chunk.css}
10-07 19:38:23.628 23999 24051 D RNCWebView: method GET
10-07 19:38:23.628 23999 24051 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> intercept response is nil, delegating up
10-07 19:38:23.630 23999 24051 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:23.630 23999 24051 D RNCWebView: new request 
10-07 19:38:23.630 23999 24051 D RNCWebView: url https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900
10-07 19:38:23.630 23999 24051 D RNCWebView: host fonts.googleapis.com
10-07 19:38:23.630 23999 24051 D RNCWebView: path /css
10-07 19:38:23.630 23999 24051 D RNCWebView: main false
10-07 19:38:23.630 23999 24051 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=text/css,*/*;q=0.1, Referer=https://yearn.finance/static/css/main.60c6551b.chunk.css}
10-07 19:38:23.630 23999 24051 D RNCWebView: method GET
10-07 19:38:23.631 23999 24051 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> intercept response is nil, delegating up
10-07 19:38:24.134 23999 24104 D ReactNativeJS: DEBUG [status-im.utils.handlers:44] - Handling re-frame event:  :browser/navigation-state-changed
10-07 19:38:24.322 23999 23999 I StatusNativeLogs: ###js TypeError: window.ethereum.on is not a function -- From line 2 of https://yearn.finance/static/js/3.7f5c1137.chunk.js
10-07 19:38:24.322 23999 23999 I StatusNativeLogs: ###js Uncaught TypeError: window.ethereum.on is not a function -- From line 2 of https://yearn.finance/static/js/3.7f5c1137.chunk.js
10-07 19:38:24.327 23999 24104 D ReactNativeJS: DEBUG [status-im.utils.handlers:44] - Handling re-frame event:  :browser/bridge-message-received
10-07 19:38:24.333 23999 24054 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:24.333 23999 24054 D RNCWebView: new request 
10-07 19:38:24.333 23999 24054 D RNCWebView: url https://yearn.finance/favicon-16x16.png
10-07 19:38:24.333 23999 24054 D RNCWebView: host yearn.finance
10-07 19:38:24.333 23999 24054 D RNCWebView: path /favicon-16x16.png
10-07 19:38:24.333 23999 24054 D RNCWebView: main false
10-07 19:38:24.333 23999 24054 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=image/webp,image/apng,image/*,*/*;q=0.8, Referer=https://yearn.finance/}
10-07 19:38:24.333 23999 24054 D RNCWebView: method GET
10-07 19:38:24.333 23999 24054 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> intercept response is nil, delegating up
10-07 19:38:24.338 23999 24054 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:24.338 23999 24054 D RNCWebView: new request 
10-07 19:38:24.338 23999 24054 D RNCWebView: url https://yearn.finance/favicon-96x96.png
10-07 19:38:24.338 23999 24054 D RNCWebView: host yearn.finance
10-07 19:38:24.338 23999 24054 D RNCWebView: path /favicon-96x96.png
10-07 19:38:24.338 23999 24054 D RNCWebView: main false
10-07 19:38:24.338 23999 24054 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=image/webp,image/apng,image/*,*/*;q=0.8, Referer=https://yearn.finance/}
10-07 19:38:24.338 23999 24054 D RNCWebView: method GET
10-07 19:38:24.338 23999 24054 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> intercept response is nil, delegating up
10-07 19:38:24.340 23999 24054 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:24.340 23999 24054 D RNCWebView: new request 
10-07 19:38:24.340 23999 24054 D RNCWebView: url https://yearn.finance/favicon-32x32.png
10-07 19:38:24.340 23999 24054 D RNCWebView: host yearn.finance
10-07 19:38:24.340 23999 24054 D RNCWebView: path /favicon-32x32.png
10-07 19:38:24.340 23999 24054 D RNCWebView: main false
10-07 19:38:24.340 23999 24054 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=image/webp,image/apng,image/*,*/*;q=0.8, Referer=https://yearn.finance/}
10-07 19:38:24.340 23999 24054 D RNCWebView: method GET
10-07 19:38:24.340 23999 24054 D RNCWebViewClient: shouldInterceptRequest / WebViewClient -> intercept response is nil, delegating up
10-07 19:38:24.341 23999 24054 D RNCWebViewClient: shouldInterceptRequest / WebViewClient
10-07 19:38:24.341 23999 24054 D RNCWebView: new request 
10-07 19:38:24.341 23999 24054 D RNCWebView: url https://yearn.finance/android-icon-192x192.png
10-07 19:38:24.341 23999 24054 D RNCWebView: host yearn.finance
10-07 19:38:24.341 23999 24054 D RNCWebView: path /android-icon-192x192.png
10-07 19:38:24.341 23999 24054 D RNCWebView: main false
10-07 19:38:24.341 23999 24054 D RNCWebView: headers {User-Agent=Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36, Accept=image/webp,image/apng,image/*,*/*;q=0.8, Referer=https://yearn.finance/}
10-07 19:38:24.341 23999 24054 D RNCWebView: method GET
flexsurfer commented 3 years ago

status doesn't support window.ethereum.on("accountsChanged" on is undefined