Instagram-Links in native WebView on Marshmallow


Recently I noticed a really strange bug that appears, when you try to call https://www.instragram.com/ in a webview when your smartphone runs Android 6 Marshmallow.

The problem is, that the screen remains blank all the time, just with that little instagram-icon in the middle - kind of a loading screen it seems. It looks like this:

Blank Instagram Loading Screen

This also happens when you view Instagram pages in your browser without having JavaScript enabled - it seems like the page does not load without JavaScript. The strange thing is, that I did the following setttings in my webview:

 WV_Downloader.getSettings().setJavaScriptEnabled(true);
 WV_Downloader.getSettings().setDomStorageEnabled(true);
 WV_Downloader.getSettings().setBlockNetworkImage(false);
 WV_Downloader.getSettings().setLoadsImagesAutomatically(true);

On later Android versions it works perfectly, why doesn't it work on Android 6? There are no error-logs, just some normal chromium-outputs that (I think) wouldn't cause a behaviour like this:

I/chromium: [INFO:CONSOLE(0)] "Unrecognized Content-Security-Policy directive 'worker-src'."
I/chromium: [INFO:CONSOLE(16)] "The key "viewport-fit" is not recognized and ignored."
I/chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'entry_data' of undefined"
W/chromium: [WARNING:keycode_converter.cc(91)] empty code string
I/chromium: [INFO:CONSOLE(0)] "The source list for Content Security Policy directive 'script-src' contains an invalid source: ''report-sample''. It will be ignored."
I/chromium: [INFO:CONSOLE(0)] "The source list for Content Security Policy directive 'script-src' contains an invalid source: ''strict-dynamic''. It will be ignored."
I/chromium: [INFO:CONSOLE(0)] "Unrecognized Content-Security-Policy directive 'worker-src'.

I couldn't find an explanation for this behaviour on the internet. Can someone explain me, what could be the reason for this? Thanks in advance!


Answers: