Description
Bug description
When I build for release and publish it to a website, the pdf is not visible and in the console I see the following error:
Uncaught Error: MissingPluginException(No implementation found for method getDeviceInfo on channel dev.fluttercommunity.plus/device_info)
In debug mode all works.
Steps to reproduce
- Create a new flutter web application
flutter create syncfusion_pdfviewer_poc
- Add syncfusion_flutter_pdfviewer package
flutter pub add syncfusion_flutter_pdfviewer
- Add SfPdfViewer widget to load the PDF.
- build in web release
flutter build web --release
- publish on a website
- open the website in chrome
Code sample
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Error demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: SfPdfViewer.network(
'https://www.lazioinnova.it/app/uploads/2025/05/Scheda-Avviso-STEP-23-4.pdf',
onDocumentLoadFailed: (error) {
`debugPrint(error.error);`
debugPrint(error.description);
},
),
);
}
}
Screenshots or Video
Stack Traces
main.dart.js:3749 Uncaught Error: MissingPluginException(No implementation found for method getDeviceInfo on channel dev.fluttercommunity.plus/device_info)
at Object.c (main.dart.js:3749:19)
at main.dart.js:102334:15
at bsA.a (main.dart.js:5164:63)
at bsA.$2 (main.dart.js:62432:14)
at brh.$1 (main.dart.js:62426:21)
at at2.Ov (main.dart.js:63593:33)
at biS.$0 (main.dart.js:62907:11)
at Object.Gc (main.dart.js:5314:40)
at aH.yC (main.dart.js:62814:3)
at biK.$0 (main.dart.js:62870:13)
On which target platforms have you observed this bug?
Web
Flutter Doctor output
PS C:\Progetti\Applicazioni\flutter\flutter_instasign_webapp> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.29.2, on Microsoft Windows [Versione 10.0.26100.4349], locale it-IT)
[√] Windows Version (11 Home 64-bit, 24H2, 2009)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
X cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run flutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/to/windows-android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Enterprise 2022 17.13.4)
[√] Android Studio (version 2024.3)
[√] VS Code (version 1.101.0)
[√] Connected device (4 available)
[√] Network resources
! Doctor found issues in 1 category.