Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebViews are blank #558

Open
P5music opened this issue May 2, 2024 · 4 comments
Open

WebViews are blank #558

P5music opened this issue May 2, 2024 · 4 comments
Labels
bug Default bug tag for tracking triage-needed For issues raised to be triaged and prioritized by internal Microsoft teams

Comments

@P5music
Copy link

P5music commented May 2, 2024

Steps to reproduce

Create an application with WebViews, compile it in AndroidStudio against WSA and run in the WSA environment.
Both debug and release builds are affected. Also sideloaded apks and direct adb installs are affected.
Windows11Pro 22H2 build 22621.3447

✔️ Expected Behavior

WebViews have been working for months then suddenly WebViews display blank content.

❌ Actual Behavior

My app has a RecyclerView with WebViews as items.
It used to work perfectly,
Now
When the app starts the content is displayed for the first item, while others are not displayed.
Other activities can be opened but WebViews are blank in them too.
For example the User Guide activity features a full page WebView that is supposed to display a long HTML document, but it's blank. It's empty.
Going back to the main activity with the RecyclerView now there is nothing, and the only WebView that was displaying something is now blank itself. It becomes blank even without opening another activity, it is enough to perform some UI update after start.

Other Software

AndroidStudio Iguana 2023.2.1 (the issue was present with previous Giraffe version too)

Please specify the version of Windows Subsystem for Android

2311.40000.5.0

@P5music P5music added bug Default bug tag for tracking triage-needed For issues raised to be triaged and prioritized by internal Microsoft teams labels May 2, 2024
@Slion
Copy link

Slion commented May 8, 2024

Possibly related to #548
Try disable hardware acceleration and see what you get.

@P5music
Copy link
Author

P5music commented May 8, 2024

@Slion
Thank you for the response.
I have a bunch of options related to hardware acceleration but there is no overall on/off button for that feature.
I tried the available options but WebViews are still blank except for some of them when the app starts.

@Slion
Copy link

Slion commented May 8, 2024

You need to use setLayerType and set it to LAYER_TYPE_SOFTWARE.

@P5music
Copy link
Author

P5music commented May 8, 2024

@Slion
Neither
webView.setLayerType(View.LAYER_TYPE_SOFTWARE,null);
or
android:hardwareAccelerated="false" (on the application element in manifest)
worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Default bug tag for tracking triage-needed For issues raised to be triaged and prioritized by internal Microsoft teams
Projects
None yet
Development

No branches or pull requests

2 participants