-
Notifications
You must be signed in to change notification settings - Fork 4k
[Cloud Firestore] Unsupported operation: Platform._operatingSystem #1257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@odwrotnie Please check flutter/flutter#36126. dart:io Platform is not supported in flutter web. You can use flutter/flutter#36135 to detect it and avoid the exception. |
This issue is happening because the FlutterFire library uses the Here is the log:
I've had a search through and this seems to be the offending line: It appears it's also used in a selection of other places: |
+1 to this I've seen some other tickets that say Firebase for dartlang works on flutter web, but I've already made significant inroads into making my app using the FlutterFire plugins — porting it over would be very time consuming at this point. This does seem like an issue that would be more reasonable to fix on FlutterFire's end of things. |
+1 to this. Oh, yes I face the same issue. At the beginning when selecting flutter, it's because I expected all platform (android/ios and web) can share all common library together from reading document. To separate develop web is time consuming... |
any solutions? |
Any way to seperate web options from (Ios/Android). |
Hey everyone, Please make sure you are on dev branch with |
@christiantjl is this the commit that you are referring to? b498372 Because as of right now, being on the dev branch does not solve this FlutterFire issue for me. |
So! I managed to get my app running (at least no platform exception error out the door), by changing the firebase_core version number to ^0.4.2+1. How exciting! (although it appears I can't login, with no errors explaining why logging in is not working... I think I may be missing firebase_core_web @hterkelsen but I can't get that added as a dependency yet) |
I'd close this issue since it has nothing to do with the firebase but with the flutter for web. So, it's a duplicate of: flutter/flutter#36126 |
As @tomasbaran mentioned this issue is not specific to FlutterFire so I'm going to go ahead and close this issue. Having said that, as part of our on-going work for #2582, our Firebase Firestore rework (#2913) has now been merged into master. We'll look at publishing some prereleases in the next few days. Thank you |
One more note, for all the people who would like this issue to be solved, can you please +1 upvote the issue here: flutter/flutter#36126, where it matters, please? |
A quick workaround I used this library (https://pub.dev/packages/universal_io) to support Platform._operatingSystem for web. |
which library, @janshair? |
@tomasbaran Sorry, edited my comment now. Its https://pub.dev/packages/universal_io |
I was also able to solve it by universal_io package, however only partially since it doesn't work correctly yet. E.g. At the time of writing, iPad isn't detected as iOS (or iPadOS) but as macOS |
I keep getting this with
web-enabled
:The text was updated successfully, but these errors were encountered: