fluttercommunity / font_awesome_flutter

The Font Awesome Icon pack available as Flutter Icons
Other
831 stars 233 forks source link

Web build fails on Flutter 3.13.0 #251

Closed adil192 closed 11 months ago

adil192 commented 11 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Run flutter build web

Expected behavior Successful build. The build succeeds when you remove this package.

Desktop (please complete the following information):

Additional context See the Flutter issue here: https://github.com/flutter/flutter/issues/132711. I don't know if this needs to be fixed here or with Flutter

Logs

Codepoint 32 not found in font, aborting ``` Adils-MacBook-Air:ricochlime adilhanney$ flutter build web Codepoint 32 not found in font, aborting. Font asset "CupertinoIcons.ttf" was tree-shaken, reducing it from 283452 to 1272 bytes (99.6% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app. Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 7588 bytes (99.5% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app. Codepoint 32 not found in font, aborting. Codepoint 32 not found in font, aborting. Target web_release_bundle failed: IconTreeShakerException: Font subsetting failed with exit code 255. To disable icon tree shaking, pass --no-tree-shake-icons to the requested flutter build command #0 IconTreeShaker.subsetFont (package:flutter_tools/src/build_system/targets/icon_tree_shaker.dart:216:7) #1 copyAssets. (package:flutter_tools/src/build_system/targets/assets.dart:128:25) #2 Future.wait. (dart:async/future.dart:525:21) #3 copyAssets (package:flutter_tools/src/build_system/targets/assets.dart:106:3) #4 WebReleaseBundle.build (package:flutter_tools/src/build_system/targets/web.dart:401:29) #5 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:853:9) #6 Future.wait. (dart:async/future.dart:525:21) #7 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:791:32) #8 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:620:16) #9 WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:89:34) #10 BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:198:5) #11 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1297:27) #12 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #13 CommandRunner.runCommand (package:args/command_runner.dart:212:13) #14 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:339:9) #15 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #16 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:285:5) #17 run.. (package:flutter_tools/runner.dart:115:9) #18 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #19 main (package:flutter_tools/executable.dart:90:3) Compiling lib/main.dart for the Web... 83.1s Exception: Failed to compile application for the Web. ```
rohanjariwala03 commented 11 months ago

Facing similar issue when I build for web.

Screenshot 2023-08-17 at 11 47 01 AM

narumi147 commented 11 months ago

https://github.com/flutter/flutter/issues/132711#issuecomment-1684036767

Said space char must be included in font, can we have a hotfix to add the space char? I think flutter probably won't change the behaviour in recent future.

michaelspiss commented 11 months ago

Hi everyone. Thanks for providing so much information, it really helps a lot.

As this is a bug in a fairly new feature of flutter, I believe they will provide a fix on their end soon. Should they decide that having a space character is a requirement for icon tree shaking, we'll have a look at how to implement a fix on the package level.

rohanjariwala03 commented 11 months ago

@michaelspiss Flutter is investigating regarding this bug and they probably fix this in next hotfix release. Hope for the best. 🤞

https://github.com/flutter/flutter/issues/132711#issuecomment-1684152978

abdelaziz-mahdy commented 11 months ago

hot fix released https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel

adil192 commented 11 months ago

Can confirm that this is fixed in Flutter 3.13.1