Search code examples
flutterfirebase-hostingsyncfusion

Syncfusion PDF Viewer Gray upon firebase deploy, Flutter Web


I'm trying to display PDF using https://pub.dev/packages/syncfusion_flutter_pdfviewer, and it works in debug mode. But when I deploy it to firebase hosting, it's just gray screen.

I've already added the necessary pdfjs script in index.html, as stated in the documentation. I'm also releasing the app on Web platform only. Anyone help?

EDIT:

Availed for their Free Community Licensing Program and got a key.

https://help.syncfusion.com/common/essential-studio/licensing/how-to-register-in-an-application#flutter

Tried to Register it, however, it is not required anymore according to the documentation. So the issue is not in the licensing.


Solution

  • I ran into this exact same problem. You need to download gsutil. And then upload a cores.json file to your firebase. The answer below provides a good step by step on how to solve the problem: https://stackoverflow.com/a/37765371/13025185