DavBfr / dart_pdf

Pdf creation module for dart/flutter
https://pub.dev/packages/pdf
Apache License 2.0
1.42k stars 632 forks source link

Not working after flutter 3.24.3 update #1766

Closed luccaslyra closed 3 weeks ago

luccaslyra commented 4 weeks ago

it's 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 () at async_patch.dart:45:50

samirpegado commented 3 weeks ago

Same issue here.

DartError: TypeError: null: type 'Null' is not a subtype of type 'JSObject' dart-sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 296:3 throw errors.dart:296 dart-sdk/lib/_internal/js_shared/lib/rti.dart 1405:3 _failedAsCheck rti.dart:1405 dart-sdk/lib/_internal/js_shared/lib/rti.dart 1383:3 _generalAsCheckImplementation rti.dart:1383 dart-sdk/lib/_internal/js_shared/lib/js_util_patch.dart 81:5 getProperty js_util_patch.dart:81 packages/printing/printing_web.dart 196:32 layoutPdf printing_web.dart:196 dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50 async_patch.dart:45 dart-sdk/lib/async/zone.dart 1661:54 runUnary zone.dart:1661 dart-sdk/lib/async/future_impl.dart 163:18 handleValue future_impl.dart:163 dart-sdk/lib/async/future_impl.dart 861:44 handleValueCallback future_impl.dart:861 dart-sdk/lib/async/future_impl.dart 890:13 _propagateToListeners future_impl.dart:890 dart-sdk/lib/async/future_impl.dart 666:5 [_completeWithValue] future_impl.dart:666 dart-sdk/lib/async/future_impl.dart 736:7 callback future_impl.dart:736 dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop schedule_microtask.dart:40 dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop schedule_microtask.dart:49 dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7

muazam99 commented 3 weeks ago

same issue here

Lailan commented 3 weeks ago

Same issue here.

Captura de Tela 2024-10-29 às 08 17 47

emanuelmarlon commented 3 weeks ago

I also have the same error in flutter version 3.24.2, can someone help?

DavBfr commented 3 weeks ago

Which version of the printing and web packages do you use?

luccaslyra commented 3 weeks ago

Hi,

web: ^1.1.0 printing: ^5.13.3

DavBfr commented 3 weeks ago

It's fixed in the master branch. Let me publish version 5.13.4 with that.

tmpsantos commented 3 weeks ago

Thank you @DavBfr for quickly acting on this! 🏆

DavBfr commented 3 weeks ago

Don't hesitate to Buy Me A Coffee.

emanuelmarlon commented 3 weeks ago

Have you managed to solve it yet? Help me Is the problem with the printing package or the pdf?

luccaslyra commented 3 weeks ago

Thanks @DavBfr, you're awesome !

luccaslyra commented 3 weeks ago

@emanuelmarlon yes, it was the printing dependencie, i just updated to latest one(the one they just released 5.13.4)