Open MacDeveloper1 opened 1 month ago
facing same error on web when i click on printer button . TypeError: null: type 'Null' is not a subtype of type 'JSObject'
my html code is <!DOCTYPE html>
Me too! Mine is a flutter web app testing on chrome. Before flutter 3.24.3 it was working fina, but now i got this erro:
errors.dart:296 Uncaught (in promise) DartError: TypeError: null: type 'Null' is not a subtype of type 'JSObject'
at Object.throw_ [as throw] (errors.dart:296:3)
at Object._failedAsCheck (rti.dart:1405:3)
at dart_rti.Rti.new._generalAsCheckImplementation (rti.dart:1383:3)
at Object.getProperty (js_util_patch.dart:81:5)
at printing_web.PrintingPlugin.new.layoutPdf (printing_web.dart:196:32)
at layoutPdf.next (
facing same error on web when i click on printer button . printing: ^5.13.4
DartError: TypeError: "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.2.146/": type 'String' is not a subtype of type 'Never'
dart-sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 296:3 throw
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1405:3 _failedAsCheck
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1383:3 _generalAsCheckImplementation
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1278:30 _installSpecializedAsCheck
dart-sdk/lib/_internal/js_shared/lib/js_interop_unsafe_patch.dart 20:7 JSObjectUnsafeUtilExtension.getProperty
packages/printing/printing_web.dart 98:36 _initPlugin
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50
this error comes when you run on local host or http. butt when i run on https then error not comming you can try
In my project I used overriding feature for loading
pdf.js
from another cloud storage.So the result URL should be
https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.2.146/pdf.min.js
.Now I get this error:
flutter -v doctor
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4317], locale en-NL) • Flutter version 3.24.3 on channel stable at C:\data\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2663184aa7 (4 weeks ago), 2024-09-11 16:27:48 -0500 • Engine revision 36335019a8 • Dart version 3.5.3 • DevTools version 2.37.3 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at C:\Users\at\AppData\Local\Android\sdk • Platform android-34, build-tools 34.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [X] Visual Studio - develop Windows apps X Visual Studio not installed; this is necessary to develop Windows apps. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2023.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874) [√] VS Code (version 1.94.1) • VS Code at C:\Users\at\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.98.0 [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4317] • Chrome (web) • chrome • web-javascript • Google Chrome 129.0.6668.90 • Edge (web) • edge • web-javascript • Microsoft Edge 123.0.2420.65 [√] Network resources • All expected network resources are available. ! Doctor found issues in 1 category.