How to Fix Blank White Page on Hosted Flutter Web App

Are you getting blank white pages from the hosted Flutter Web App at VPS Server or cPanel? In this example, we are going to tell you the reason behind this, and how to solve it. See the article below.

Read This Also:

This article is only for those who had hosted the Flutter web app on VPS Server, cPanel Hosting, and any other hosting. To solve this problem, simply open index.html from the build/web/ folder and edit it.

Remove this Line or remove '/' from the href attribute.

<base href="/">

Now, after removing or editing this line, re-upload the index.html file to your server or hosting space and refresh the page on the browser.

When you see the console log on in the browser after opening Web app, you will get the reason for this problem.

Here, the scripts loaded on index.html are getting 404 not found error, which means the files do not exist in that URL. When you open index.html with code editor, you will see <base href="/"> which means, the base URL of the web page/app is set to "/" and the browser takes path after that. So you simply remove the whole line or just remove "/" from href attribute to solve this problem.

In this way, you can solve the white blank page on the browser from hosted Flutter web problem.

1 Commet on this Article


Love you so much, thank you for your help 

1 year ago

Please Wait...