Steps to Reproduce
- Run flutter build web (any variant of release mode or debug with optimizations at -O0 to -O4 doesnt matter)
- Observe the error when loading the page (im using firebase hosting)
Expected results:
It works as expected
Actual results:
Page never loads, with the error in the chrome console
Uncaught TypeError: J.getInterceptor$ax(...).clear$0 is not a function
at Object.clear$0$ax (main.dart.js:121591:44)
at main.dart.js:4420:17
at _wrapJsFunctionForAsync_closure.$protected (main.dart.js:15283:15)
at _wrapJsFunctionForAsync_closure.call$2 (main.dart.js:153961:12)
at Object._asyncStartSync (main.dart.js:15248:20)
at Object._downloadAssetFonts (main.dart.js:4448:16)
at main.dart.js:4359:139
at _wrapJsFunctionForAsync_closure.$protected (main.dart.js:15283:15)
at _wrapJsFunctionForAsync_closure.call$2 (main.dart.js:153961:12)
at Object._asyncStartSync (main.dart.js:15248:20)
The source code for _downloadAssetFonts is
_downloadAssetFonts() {
var $async$goto = 0,
$async$completer = A._makeAsyncAwaitCompleter(type$.void),
t1, t2;
var $async$_downloadAssetFonts = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
if ($async$errorCode === 1)
return A._asyncRethrow($async$result, $async$completer);
while (true)
switch ($async$goto) {
case 0:
// Function start
J.clear$0$ax(A.renderer().get$fontCollection());
$async$goto = $._assetManager != null ? 2 : 3;
break;
case 2:
// then
t1 = A.renderer().get$fontCollection();
t2 = $._assetManager;
t2.toString;
$async$goto = 4;
return A._asyncAwait(t1.downloadAssetFonts$1(t2), $async$_downloadAssetFonts);
case 4:
// returning from await.
case 3:
// join
$async$goto = A.boolConversionCheck(A.debugEmulateFlutterTesterEnvironment()) ? 5 : 6;
break;
case 5:
// then
$async$goto = 7;
return A._asyncAwait(A.renderer().get$fontCollection().debugDownloadTestFonts$0(), $async$_downloadAssetFonts);
case 7:
// returning from await.
case 6:
// join
// implicit return
return A._asyncReturn(null, $async$completer);
}
});
return A._asyncStartSync($async$_downloadAssetFonts, $async$completer); // FAILS RIGHT HERE
},
Looking at it, i think here J.clear$0$ax(A.renderer().get$fontCollection()); It's complaining that fontCollection() is not a function? This happened while upgrading flutter but downgrading doesnt seem to fix it or at least i cant recover it to a working state, I also tried flutter channel beta but there are issues with that also.
Doctor
[√] Flutter (Channel stable, 3.7.6, on Microsoft Windows [Version 10.0.19044.1826], locale en-US)
• Flutter version 3.7.6 on channel stable at C:\Users\cyberpwn\Documents\development\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 12cb4eb7a0 (19 hours ago), 2023-03-01 10:29:26 -0800
• Engine revision ada363ee93
• Dart version 2.19.3
• DevTools version 2.20.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:\Users\cyberpwn\AppData\Local\Android\sdk
• Platform android-33, build-tools 31.0.0
• Java binary at: C:\Program Files\Java\jdk-11.0.12\bin\java
• Java version Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS-237)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.6)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.31829.152
• Windows 10 SDK version 10.0.19041.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] IntelliJ IDEA Ultimate Edition (version 2022.3)
• IntelliJ at C:\Users\cyberpwn\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\223.8617.56
• Flutter plugin version 71.3.6
• Dart plugin version 223.8617.8
[√] VS Code (version 1.71.0)
• VS Code at C:\Users\cyberpwn\AppData\Local\Programs\Microsoft VS Code
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (4 available)
• IN2017 (mobile) • 2e01d742 • android-arm64 • Android 12 (API 31)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1826]
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.178
• Edge (web) • edge • web-javascript • Microsoft Edge 110.0.1587.41
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
Steps to Reproduce
Expected results:
It works as expected
Actual results:
Page never loads, with the error in the chrome console
The source code for _downloadAssetFonts is
Looking at it, i think here
J.clear$0$ax(A.renderer().get$fontCollection());It's complaining thatfontCollection()is not a function? This happened while upgrading flutter but downgrading doesnt seem to fix it or at least i cant recover it to a working state, I also tried flutter channel beta but there are issues with that also.Doctor