-
Notifications
You must be signed in to change notification settings - Fork 4k
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
firebase_auth: Incompatible with Windows on NET 9 or VS 17.12.0 #16536
Comments
Rolled back my version of |
same here |
Haven't see any attempts to fix firebase on windows. My app crash often and still has no clue why or how to fix it. I checked for new update of firebase continuously and what I see is almost like zero fix. |
Same Issue. D:\WD\BusinessPersonalManager\business_personal_manager\windows\flutter\ephemeral\cpp_client_wrapper\include\flutter\encodable_value.h(199,60): error C2665: 'std::variant<std::monostate,bool,int32_t,int64_t,double,std::string,std::vector<uint8_t,std::allocator<uint8_t>>,std::vector<int32_t,std::allocator>,std::vector<int64_t,std::allocator<int64_t>>,std::vector<double,std::allocator>,flutter::EncodableList,flutter::EncodableMap,flutter::CustomEncodableValue,std::vector<float,std::allocator>>::variant': no overloaded function could convert all the argument types [D:\WD\BusinessPersonalManager\business_personal_manager\build\windows\x64\plugins\firebase_auth\firebase_auth_plugin.vcxproj] I tried following solutions.
|
Same! |
same, but this also started failing on github actions when building for windows |
How do I rollback??? |
@thedeukalion - thank you for confirming that reverting Visual Studio/Dot not version is a way to circumvent this issue for now 🙏 |
i have the same problem if any one solve it, please help me |
Will the issue be fixed for dotnet 9? |
@PrimeTheFirst - I have no idea I'm afraid. I don't have dotnet installed on my machine |
how do you rollback to the version 17.11.5 of visual studio? |
I see. Is this a flutter auth issue or a visual studio issue? Any idea when it might be fixed?? |
From what I understand you can only rollback if you have upgraded it from a previous version before. Otherwise Microsoft archives have 17.11.5 update download links for the exe, which isn't working for me. It just says preparing and then closes |
On our side, we managed to workaround the issue on Github Actions with the following steps :
|
I have the same error. I tried almost everything but couldn't solve it. I just couldn't downgrade the Visual Studio version because it was a new installation and there was no old version already.
Is there any progress? |
:( |
Mine is Visual Studio Community Edition, |
Can this issue please be resolved ASAP or can we at least know if a fix is being worked upon and maybe a possible timeframe for its completion? It's affecting a lot of developers and is completely halting development. |
After Visual Studio rollback, I solve this problem. Please consider the below link for your roll back. https://devblogs.microsoft.com/visualstudio/introducing-visual-studio-rollback/ |
Hey guys, This solved the problem for me: 1- Uninstall Visual Studio. |
This worked for me while waiting for package solution to support latest visual studio |
Thank you!!! This works. |
For those getting |
FIX: Rollback your Visual Studio version from the Visual Studio installer. Uninstall.NET9 as well. Run |
I'm a maintainer of Visual Studio's C++ Standard Library implementation. This was an intentional change - we merged microsoft/STL#4713 to unconditionally implement P0608R3 "Improving Instead of downgrading your VS IDE, or using an older MSVC toolset within the newer IDE, the correct long-term fix is to patch |
This comment was marked as resolved.
This comment was marked as resolved.
I have a fix (see linked PR) if anyone affected by this issue would like to try it with VS 2022 17.12. |
Thanks, this worked for me |
Two days ago I sat down to do a small Flutter project (first in about a year). I made sure everything was up to date, including MSVS Community. I use Windows and I generated the default Flutter app and added only two lines to the pubspec, firebase_core and firebase_auth. But it wouldn't build! I've spent the last two days assuming I had a config issue. I even wiped my machine and reinstalled Windows. I only now found this issue on GitHub. @Mohamed-Reda7 I can't thank you enough. Reverting to MSVS 17.8 completely resolved the issue. @StephanTLavavej My MSVS version (the one that did not work) was 17.12.3, so the issue doesn't seem to be fixed in VS 2022 17.12. I'm such a fan of Flutter, but this was such a bad experience. The default generated app doesn't work with one of the most popular plug-ins (firebase auth) for one of the most popular OSs (Windows). I'm not a professional developer, more of a hobbyist, but I'm a huge fan of Flutter and would love for this issue to be escalated and get the attention I suspect it deserves. If someone can tell me how to do that I'm happy to do the legwork. |
@gh-pap This was exposed by a VS change, but it was not a VS bug, and VS isn't being patched for this. Instead, it was a flutterfire bug, and I contributed a fix which was merged 2 weeks ago - see above. I investigated and fixed this within a day of it being brought to my attention. If you can't wait for the next release of flutterfire, you could potentially build its latest sources. Once you can pick up the fix, you should move your MSVC toolset forward and stop pinning to an older version. (As for working around it, (1) you can use the newest VS IDE while selecting an older MSVC toolset, and (2) you can use a toolset as new as 17.10, it doesn't have to be as old as 17.8. It was the 17.12 toolset that exposed the flutterfire bug.)
This got attention at extremely high levels within Microsoft. A Corporate Vice President/Distinguished Engineer in Windows emailed my quad boss (a CVP himself) in DevDiv about this compiler error, and it was quickly routed down to me. (I am a mere Principal SDE, maintaining MSVC's STL for 18 years.) |
Aha, I understand now. Thanks for fixing the issue! 🙏🙏🙏 I wouldn’t trust myself to install a pre-release. I’ll just remain on the older MSVC until the fix is released (then upgrade to the latest MSVC). Does anyone know which versions of firebase_core and firebase_auth (I assume both are needed) will include Stephan's fix? |
It will probably be mentioned in the changelog in an upcoming release, probably the very next release.
|
@StephanTLavavej Just wanted to say I appreciate the quick fix. I have no familiarity with Flutter/Firebase, though I did a quick test by patching my local Firebase_Auth source file (the one listed on .flutter-plugins, firebase_auth=...) with @StephanTLavavej fixes. I'll just say It works on my machine™. No VS downgrades needed and I'm unblocked until an official release. Maybe a wiser mind can point out if this is a valid workaround. |
As an FYI; we had a release freeze over the Christmas holiday period, but this fix will come out in the next release early next week 🙏 |
This comment has been minimized.
This comment has been minimized.
Hi, |
@SimoLP - The release will fix this issue. |
Approximally when will be released? |
Good day, I was facing the problem above and I applied your fix but now I am facing a different error. LINK : fatal error LNK1181: cannot open input file 'firebase_auth.lib' [C:\flutter\examples\food_delivery\food_app\build\windows\x64\runner\food_app.vcxproj] I don't know why the file is not being generated |
@StephanTLavavej - thanks for the fix, especially in a codebase that isn't in your primary ecosystem :) I think this issue (and some of the frustration you've seen from others in the thread) highlights a weakness in the way the Flutter tooling interacts with MSVC. For other platforms that Flutter targets (Android especially), we can specify the exact versions of toolchain components we expect to use (Gradle, AGP, Android SDKs etc) in a way that can be committed in version control and shared with our teams (and CI runners). This does mean that we tend to be using older versions of compilers, but lets us upgrade when its convenient, and rebuild older versions without having to figure out what specific versions of components happened to be available at the time. For Windows builds, Flutter developers don't really have a way of doing this - we are at the mercy of whatever versions of MSVC, the Windows SDK, dotnet SDKs, cmake, ... that happen to be installed at the time. I've had a couple of instances over the years of builds being broken because GitHub CI upgraded some component and it exposed an issue with a 3rd party plugin. Are there mechanisms in the MSVC ecosystem that Flutter should be taking advantage of to alleviate this problem? |
That's really a GitHub CI question (which I am unfamiliar with; I don't know what image options are available), not an MSVC question. From the MSVC installer perspective, we provide installers for released versions at stable URLs, so you can "pin" to (e.g.) 17.12 and then step forward to 17.13 when you're ready. (Annoyingly, this is not the case for preview versions; you can get the latest preview, but there's no stable URL to obtain arbitrary preview releases.) If possible, I recommend also testing with the latest VS Preview, which will allow you to notice upcoming breaking changes (or report toolset bugs) well in advance of the production release. Typically, Preview 1 and Preview 2, and sometimes Preview 3, are the previews that contain significant toolset changes that could break code. Later Previews contain minor, individually merged bugfixes, which are very unlikely to break code. So if you're continuously validating with VS Preview in addition to the last production release, you'll have high confidence that the next production release will continue to work. (Over in microsoft/STL, we use Azure Pipelines for our CI system, manually preparing an image each month, which allows us to pin the latest VS Preview available at that time; we happen to require the latest VS Preview and never the production release because we're special, otherwise production + preview would be appropriate for us too.) |
Apologies for derailing a closed thread, perhaps this would have been better bought up somewhere else.
Thanks - we are currently using this as a workaround in CI until this fix is released but does have a few issues:
Perhaps these issues aren't major, but they aren't things we need to deal with on other platforms (although Apple is worse - we don't have an option to downgrade XCode or the iOS SDK if it breaks). In my ideal world, I'd like to be able to include a file in git that specifies a version of Visual Studio and the versions of the optional components that are required, and be able to run a single command to configure my system to use those versions (or install them along side the other installed versions if they aren't already present). |
Is there an existing issue for this?
Which plugins are affected?
Auth
Which platforms are affected?
Windows
Description
I just updated to the latest Visual Studio version and this occured on Flutter 3.24.3 and then I upgraded to 3.24.4 and it was still there. Been running this on every project between tries:
Global
dart pub cache clean --force
flutter update-packages --force-upgrade
Once per project
flutter clean
flutter pub upgrade
flutter pub get
And then I tried adding a simple project with just the firebase_auth package and it simply did not work.
.NET / Visual Studio Versions
dotnet --version = 9.0.100
Visual Studio Community 2022 17.12.0
Will try to rollback to previous DOTNET / VS version to see if there's any change.
Reproducing the issue
flutter create fb_test
cd fb_test
flutter pub add firebase_auth
flutter build windows --debug
Firebase Core version
3.7.0
Flutter Version
3.24.4
Relevant Log Output
Flutter dependencies
Expand
Flutter dependencies
snippetAdditional context and comments
No response
The text was updated successfully, but these errors were encountered: