Open flrnsbt opened 3 months ago
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days
Hi. I am facing the same issue, please reopen.
I think I missed something. The issue is with device_info_plus and not package_info_plus, tell me if I need to open a new issue.
In the meantime:
Plugin : device_info_plus
Version device_info_plus: ^10.1.2
Flutter SDK 3.24.2 stable
Steps to reproduce
use device_info_plus in a project compile for webasm. It compiles, but on the execution you got illegal cast errors.
Try the sample code below.
flutter build web --wasm --no-strip-wasm
cd build/web
dhttpd '--headers=Cross-Origin-Embedder-Policy=credentialless;Cross-Origin-Opener-Policy=same-origin'
You will get
main.dart.wasm:0x14d826 Uncaught RuntimeError: illegal cast at DeviceInfoPlusWebPlugin.deviceInfo (main.dart.wasm:0x14d826) at DeviceInfoPlugin.webBrowserInfo inner (main.dart.wasm:0x14d4ef)
in the browser console.
Sample: https://github.com/arnaudruffin/demo-asm-issue-in-deviceinfo, which is the example given from the documentation, only targeting web platform.
See https://docs.flutter.dev/platform-integration/web/wasm for more info
Ah, yes, we should have a different ticket for each project, since it doesn't look it's exactly the same error cause.
Ok, i'll do it thanks. edit: done: https://github.com/fluttercommunity/plus_plugins/issues/3253
Platform
Web
Plugin
package_info_plus
Version
8.0.0
Flutter SDK
3.22.1 stable
Steps to reproduce
Use the packageInfoPlus package in any web app that you compile in wasm
Code Sample
No response
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean