Skip to content

firebase_core Build fails on windows #11345

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

Closed
DanishAjaib opened this issue Jul 22, 2023 · 7 comments
Closed

firebase_core Build fails on windows #11345

DanishAjaib opened this issue Jul 22, 2023 · 7 comments
Labels
resolution: duplicate This issue or pull request already exists type: bug Something isn't working

Comments

@DanishAjaib
Copy link

DanishAjaib commented Jul 22, 2023

Bug report

Describe the bug
When I add this library and try to run the project, it fails to compile with the following output:

C:\Users\Danis\AndroidStudioProjects\delete_later\build\windows\extracted\firebase_cpp_sdk\include\firebase/variant.h(801,7): error C2220: the following warning is treated as an error [C:\Users\Danis\AndroidStudioProjects\delete_later\build\windows\plugins\firebase_core\firebase_core_plugin.vcxproj]
C:\Users\Danis\AndroidStudioProjects\delete_later\build\windows\extracted\firebase_cpp_sdk\include\firebase/variant.h(801,7): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\Danis\AndroidStudioProjects\delete_later\build\windows\plugins\firebase_core\firebase_core_plugin.vcxproj]
C:\Users\Danis\AndroidStudioProjects\delete_later\build\windows\extracted\firebase_cpp_sdk\include\firebase/variant.h(827,7): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\Danis\AndroidStudioProjects\delete_later\build\windows\plugins\firebase_core\firebase_core_plugin.vcxproj]
Exception: Build process failed.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a new Flutter Windows project
  2. Add firebase_core 2.15.0
  3. Run project

Expected behavior

Project should run without any errors.

Sample project

Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Repository: https://github.com/DanishAjaib/delete_later


Additional context

Add any other context about the problem here.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [Version 10.0.22631.2048], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.0)
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.80.1)
[√] Connected device (3 available)
[√] Network resources


Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Dart SDK 3.0.6
Flutter SDK 3.10.6
delete_later 1.0.0+1

dependencies:
- cupertino_icons 1.0.5
- firebase_core 2.15.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine]

dev dependencies:
- flutter_lints 2.0.2 [lints]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]

transitive dependencies:
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- collection 1.17.1
- fake_async 1.3.1 [clock collection]
- firebase_core_platform_interface 4.8.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.6.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- js 0.6.7 [meta]
- lints 2.1.1
- matcher 0.12.15 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.2.0
- meta 1.9.1
- path 1.8.3
- plugin_platform_interface 2.1.4 [meta]
- sky_engine 0.0.99
- source_span 1.9.1 [collection path term_glyph]
- stack_trace 1.11.0 [path]
- stream_channel 2.1.1 [async]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.5.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- vector_math 2.1.4


@DanishAjaib DanishAjaib added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jul 22, 2023
@VarmaTech
Copy link

VarmaTech commented Jul 23, 2023

Having same issue.
I am using Visual Studio Community 2019 -16.11.27
image

@darshankawar darshankawar added the triage Issue is currently being triaged. label Jul 24, 2023
@darshankawar
Copy link

darshankawar commented Jul 24, 2023

@DanishAjaib
Looks like you are hitting #10992, in which you can follow-up for further updates.
There are some workarounds / solutions mentioned in underlying comments that you can check to see if it helps in your case or not.
Also, see this for your reference for windows support for flutterfire plugins.

I'll close this as a duplicate. If you disagree, write in comments and I'll reopen it.

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Jul 24, 2023
@darshankawar darshankawar closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2023
@darshankawar darshankawar added resolution: duplicate This issue or pull request already exists and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. triage Issue is currently being triaged. labels Jul 24, 2023
@VarmaTech
Copy link

VarmaTech commented Jul 29, 2023

None of these are helping me to fix the issue
i Tried #10992, but still same

@DanishAjaib
Copy link
Author

DanishAjaib commented Jul 30, 2023

@VarmaTech I was able to use an older version of the package. For now it seems to be the only solution.

@remcova
Copy link

remcova commented Jul 30, 2023

@VarmaTech I was able to use an older version of the package. For now it seems to be the only solution.

Which version?

@VarmaTech
Copy link

My version

firebase_core: 2.15.0
firebase_messaging: 14.6.5

i tried removing both . still when i start windows app with debugger. On hot reload debugger connect stops .

@DanishAjaib
Copy link
Author

2..7.0 .. if you're removing both and still getting an error then there is most likely another package that depends on firebase_core 2.15.0 .. You have make sure no library in your project is using this version.

@firebase firebase locked and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate This issue or pull request already exists type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants