Flutter build web showing blank on deployment

4,029 views
Skip to first unread message

Jaime Saad

unread,
Feb 6, 2021, 5:18:57 PM2/6/21
to Flutter Development (flutter-dev)
Hi, been doing several apps with Flutter web. I usually deploy to my server the files generated after running Flutter build web, so I can access the app from anywhere/any device. However I created a new app, and while it does run fine using Chrome during debug, when I try to deploy it to my server it simply shows a blank page. To rule out a code error or something not compatible with Flutter web, I created a completely new App, and without changing any of the original code, I added web support and deployed, but still blank. Tried this with channels beta and dev. 
In the past months this has been working fine, but not anymore. Could be a matter of Flutter that may resolve by its own?
Thanks

Suzuki Tomohiro

unread,
Feb 6, 2021, 5:24:46 PM2/6/21
to Jaime Saad, Flutter Development (flutter-dev)
Any error in developer console?

What did you change? (incl. flutter version and dependency)

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/1f3c4e03-28ae-498b-a268-e61625e2c7c9n%40googlegroups.com.

Jaime Saad

unread,
Feb 6, 2021, 5:29:51 PM2/6/21
to Flutter Development (flutter-dev)
Hi!
I created a new App, and is the current Flutter Demo that counts how many times the button was pressed. No changes were made to see if it was a Flutter problem or not.
I did run the flutter upgrade command before adding web support.
Here is the version:
Flutter 1.26.0-17.2.pre • channel dev • https://github.com/flutter/flutter.git
Framework • revision 79b49b9e10 (3 days ago) • 2021-02-03 15:33:39 -0800
Engine • revision 2c527d6c7e
Tools • Dart 2.12.0 (build 2.12.0-259.8.beta)

Thnaks

Suzuki Tomohiro

unread,
Feb 6, 2021, 5:40:05 PM2/6/21
to Jaime Saad, Flutter Development (flutter-dev)
Do you see any error in developer console?

Does downgrade solve the problem?

Jaime Saad

unread,
Feb 6, 2021, 6:24:12 PM2/6/21
to Flutter Development (flutter-dev)
Hi again,
This error: Failed to load resource: the server responded with a status of 404 (Not Found)
Downgraded but didnt help

Suzuki Tomohiro

unread,
Feb 6, 2021, 6:34:04 PM2/6/21
to Jaime Saad, Flutter Development (flutter-dev)
Nice. What URL was not found?

Jaime Saad

unread,
Feb 6, 2021, 9:35:40 PM2/6/21
to Flutter Development (flutter-dev)
The file not found is the  main.dart.js, but I did upload it to my server along the index.html, and some other files

Jaime Saad

unread,
Feb 6, 2021, 9:52:30 PM2/6/21
to Flutter Development (flutter-dev)
So I compared the html files, and in these new projects I found this line: <base href="/">
This line didn't appear on the previous projects. I simply deleted the line (not sure if that's a good idea), but it worked?!

Thank you very much for all your help!

On Saturday, February 6, 2021 at 5:34:04 PM UTC-6 suz...@gmail.com wrote:

Suzuki Tomohiro

unread,
Feb 6, 2021, 11:35:23 PM2/6/21
to Flutter Development (flutter-dev)
Glad to hear that. You’re welcome.

Reply all
Reply to author
Forward
0 new messages