firebase/firebase-cpp-sdk

The problem getting on windows debugging, how can solve this issue

Yasilkhan opened this issue · 8 comments

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:119 (add_subdirectory):
The source directory

C:/Users/DELL/model_clon_pizza_romi_new/build/windows/x64/extracted/firebase_cpp_sdk_windows

does not contain a CMakeLists.txt file.

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:125 (get_target_property):
get_target_property() called with non-existent target "firebase_app".

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:126 (string):
string sub-command REPLACE requires at least four arguments.

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:127 (set_target_properties):
set_target_properties Can not find target to add properties to:
firebase_app

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:125 (get_target_property):
get_target_property() called with non-existent target "firebase_auth".

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:126 (string):
string sub-command REPLACE requires at least four arguments.

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:127 (set_target_properties):
set_target_properties Can not find target to add properties to:
firebase_auth

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:125 (get_target_property):
get_target_property() called with non-existent target "firebase_storage".

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:126 (string):
string sub-command REPLACE requires at least four arguments.

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:127 (set_target_properties):
set_target_properties Can not find target to add properties to:
firebase_storage

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:125 (get_target_property):
get_target_property() called with non-existent target "firebase_firestore".

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:126 (string):
string sub-command REPLACE requires at least four arguments.

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:127 (set_target_properties):
set_target_properties Can not find target to add properties to:
firebase_firestore

Error: Unable to generate build files

I followed these command
flutter clean
flutter pub upgrade firebase core
flutter pub get
flutter build [windows]

but three have no changes still getting error

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

I encountered the same problem when connecting Firebase and trying to run it on Windows

paulpv commented

Seems like a problem with the flutterfire scripts and not firebase-cpp-sdk itself.

Given the above error:

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:119 (add_subdirectory):
The source directory
C:/Users/DELL/model_clon_pizza_romi_new/build/windows/x64/extracted/firebase_cpp_sdk_windows
does not contain a CMakeLists.txt file.

That error looks to be coming from:
https://github.com/firebase/flutterfire/blob/a292282d0e64808e4498f065d033852f89795dc0/packages/firebase_core/firebase_core/windows/CMakeLists.txt#L28

I downloaded https://dl.google.com/firebase/sdk/cpp/firebase_cpp_sdk_windows_12.1.0.zip and unzipped it and there is indeed a CMakeLists.txt:

% pwd
/Users/paul.peavyhouse/Downloads/firebase_cpp_sdk_windows
% ls -la
total 12984
drwxr-xr-x@  11 paul.peavyhouse  staff      352 Jun 26 04:33 .
drwx------@ 239 paul.peavyhouse  staff     7648 Jul  1 09:18 ..
-rw-r--r--@   1 paul.peavyhouse  staff     4609 Jun 26 04:05 CMakeLists.txt
-rw-r--r--@   1 paul.peavyhouse  staff   114609 Jun 26 04:05 NOTICES
-rw-r--r--@   1 paul.peavyhouse  staff   191453 Jun 26 04:08 file_hashes.txt
-rw-r--r--@   1 paul.peavyhouse  staff  6198889 Jun 26 04:07 generate_xml_from_google_services_json.exe
-rwxr-xr-x@   1 paul.peavyhouse  staff    17455 Jun 26 04:07 generate_xml_from_google_services_json.py
drwxr-xr-x@   4 paul.peavyhouse  staff      128 Jun 26 04:05 include
drwxr-xr-x@   3 paul.peavyhouse  staff       96 Jun 26 04:33 libs
-rw-r--r--@   1 paul.peavyhouse  staff   103222 Jun 26 04:05 readme.md
-rw-r--r--@   1 paul.peavyhouse  staff      190 Jun 26 04:33 readme_windows.md

I have the same issue.

CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:119 (add_subdirectory):
  The source directory

    C:/Users/USER/StudioProjects/hexolink4/build/windows/x64/extracted/firebase_cpp_sdk_windows

  does not contain a CMakeLists.txt file.


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:125 (get_target_property):
  get_target_property() called with non-existent target "firebase_app".


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:126 (string):
  string sub-command REPLACE requires at least four arguments.


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:127 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  firebase_app


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:125 (get_target_property):
  get_target_property() called with non-existent target "firebase_auth".


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:126 (string):
  string sub-command REPLACE requires at least four arguments.


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:127 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  firebase_auth


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:125 (get_target_property):
  get_target_property() called with non-existent target "firebase_storage".


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:126 (string):
  string sub-command REPLACE requires at least four arguments.


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:127 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  firebase_storage


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:125 (get_target_property):
  get_target_property() called with non-existent target "firebase_firestore".


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:126 (string):
  string sub-command REPLACE requires at least four arguments.


CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:127 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  firebase_firestore


Error: Unable to generate build files

So, how to fix it?

any update for this problem?

Please delete build/windows/x64/CMakeLists.txt file and CMakeFile folder then flutter clean command run on your terminal and then flutter run command. I solved this error in this way