Skip to content
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_crashlytics]: Failed to build iOS app Lexical or Preprocessor Issue (Xcode) #13411

Closed
1 task done
SunlightBro opened this issue Sep 26, 2024 · 1 comment
Closed
1 task done
Labels
Needs Attention This issue needs maintainer attention. resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working

Comments

@SunlightBro
Copy link

SunlightBro commented Sep 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Crashlytics

Which platforms are affected?

iOS

Description

Adding firebase_core and firebase_crashlytics to an existing project, failed to build iOS app:

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_crashlytics.Crashlytics_Platform':
'/Users/sunbro/dev/my_app/ios/Pods/Headers/Public/Firebase/Firebase.h'
/Users/sunbro/.puro/shared/pub_cache/hosted/pub.dev/firebase_crashlytics-4.1.2/ios/Classes/Crashlytics_Platform.h:20:8

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_crashlytics.ExceptionModel_Platform':
'/Users/sunbro/dev/my_app/ios/Pods/Headers/Public/Firebase/Firebase.h'
/Users/sunbro/.puro/shared/pub_cache/hosted/pub.dev/firebase_crashlytics-4.1.2/ios/Classes/ExceptionModel_Platform.h:20:8

Reproducing the issue

  • using latest stable flutter (3.24.3)
  • using latest XCode 16 (16A242d)
  • adding firebase [core & crashlytics] to the app
  • using flutterfire cli to setup the app with multiple flavor (will also fail if only using a single ios flavor/schema)
  • running flutter build ios

Firebase Core version

3.5.0

Flutter Version

3.24.3

Relevant Log Output

flutter build ios --flavor dev --no-codesign -t lib/main_dev.dart --build-number=76
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building my.app.bundleid.dev for device (ios-release)...
Running pod install...                                           2,246ms
Running Xcode build...                                                  
 └─Compiling, linking and signing...                      1,154ms
Xcode build done.                                           11.3s
Failed to build iOS app
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_crashlytics.Crashlytics_Platform':
'/Users/sunbro/dev/my_app/ios/Pods/Headers/Public/Firebase/Firebase.h'
/Users/sunbro/.puro/shared/pub_cache/hosted/pub.dev/firebase_crashlytics-4.1.2/ios/Classes/Crashlytics_Platform.h:20:8

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_crashlytics.ExceptionModel_Platform':
'/Users/sunbro/dev/my_app/ios/Pods/Headers/Public/Firebase/Firebase.h'
/Users/sunbro/.puro/shared/pub_cache/hosted/pub.dev/firebase_crashlytics-4.1.2/ios/Classes/ExceptionModel_Platform.h:20:8

Encountered error while building for device.

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.5.3
Flutter SDK 3.24.3
my_flutter_app 2.2.0

dependencies:
- dio 5.7.0 [async http_parser meta path dio_web_adapter]
- draggable_scrollbar 0.1.0 [flutter]
- firebase_core 3.5.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 4.1.2 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- get_it 7.7.0 [async collection meta]
- google_fonts 6.2.1 [flutter http path_provider crypto]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- intl 0.19.0 [clock meta path]
- path_provider 2.1.4 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- pdfx 2.8.0 [flutter flutter_web_plugins plugin_platform_interface device_info_plus uuid meta extension synchronized universal_platform photo_view vector_math web]
- shared_preferences 2.3.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- signature 5.5.0 [flutter flutter_svg image]
- throttling 2.0.1
- webview_flutter 4.9.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]

dev dependencies:
- build_runner 2.4.12 [analyzer args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- flutter_lints 4.0.0 [lints]
- freezed 2.5.7 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation dart_style]
- json_serializable 6.8.0 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper]

transitive dependencies:
- _fe_analyzer_shared 72.0.0 [meta]
- _flutterfire_internals 1.3.43 [collection firebase_core firebase_core_platform_interface flutter meta]
- _macros 0.3.2
- analyzer 6.7.0 [_fe_analyzer_shared collection convert crypto glob macros meta package_config path pub_semver source_span watcher yaml]
- another_flushbar 1.12.30 [flutter]
- archive 3.6.1 [crypto path]
- args 2.5.0
- async 2.11.0 [collection meta]
- async_redux 23.2.0 [async_redux_core meta path_provider file weak_map fast_immutable_collections connectivity_plus collection logging path flutter]
- async_redux_core 1.2.0 [i18n_extension_core meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- build 2.4.1 [analyzer async convert crypto glob logging meta package_config path]
- build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 4.0.2 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.4.2 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml]
- build_runner_core 7.3.2 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.9.2 [built_collection collection fixnum meta]
- characters 1.3.0
- checked_yaml 2.0.3 [json_annotation source_span yaml]
- clock 1.1.1
- code_builder 4.10.0 [built_collection built_value collection matcher meta]
- collection 1.18.0
- connectivity_plus 6.0.5 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm collection]
- connectivity_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- convert 3.1.1 [typed_data]
- crypto 3.0.5 [typed_data]
- dart_style 2.3.7 [analyzer args collection package_config path pub_semver source_span]
- dartx 1.2.0 [characters collection crypto meta path time]
- dbus 0.7.10 [args ffi meta xml]
- device_info_plus 10.1.2 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry]
- device_info_plus_platform_interface 7.0.1 [flutter meta plugin_platform_interface]
- dio_web_adapter 2.0.0 [dio http_parser meta web]
- extension 0.6.0 [meta]
- fake_async 1.3.1 [clock collection]
- fast_immutable_collections 10.2.4 [collection meta]
- ffi 2.1.3
- file 7.0.0 [meta path]
- firebase_core_platform_interface 5.3.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.18.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_crashlytics_platform_interface 3.6.43 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- fixnum 1.1.0
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_secure_storage 9.2.2 [flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta]
- flutter_secure_storage_linux 1.2.1 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_macos 3.1.2 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_platform_interface 1.1.2 [flutter plugin_platform_interface]
- flutter_secure_storage_web 1.2.1 [flutter flutter_secure_storage_platform_interface flutter_web_plugins js]
- flutter_secure_storage_windows 3.1.2 [ffi flutter flutter_secure_storage_platform_interface path path_provider win32]
- flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- freezed_annotation 2.4.4 [collection json_annotation meta]
- frontend_server_client 4.0.0 [async path]
- glob 2.1.2 [async collection file path string_scanner]
- graphs 2.3.2 [collection]
- http 1.2.2 [async http_parser meta web]
- http_multi_server 3.2.1 [async]
- i18n_extension_core 2.0.6 [sprintf]
- image 4.2.0 [archive meta xml]
- io 1.0.4 [meta path string_scanner]
- js 0.6.7 [meta]
- json_annotation 4.9.0 [meta]
- keycloak_flutter 0.0.21 [flutter_web_plugins flutter js]
- leak_tracker 10.0.5 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.5 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- lints 4.0.0
- logging 1.2.0
- macros 0.1.2-main.4 [_macros]
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.15.0
- mime 1.0.6
- nm 0.5.0 [dbus]
- oauth2 2.0.3 [collection crypto http http_parser]
- package_config 2.1.0 [path]
- path 1.9.0
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.2.10 [flutter path_provider_platform_interface]
- path_provider_foundation 2.4.0 [flutter path_provider_platform_interface]
- path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface]
- path_provider_windows 2.3.0 [ffi flutter path path_provider_platform_interface]
- petitparser 6.0.2 [meta]
- photo_view 0.15.0 [flutter]
- platform 3.1.5
- plugin_platform_interface 2.1.8 [meta]
- pool 1.5.1 [async stack_trace]
- pub_semver 2.1.4 [collection meta]
- pubspec_parse 1.3.0 [checked_yaml collection json_annotation pub_semver yaml]
- shared_preferences_android 2.3.2 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.5.2 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.4.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.4.1 [flutter plugin_platform_interface]
- shared_preferences_web 2.4.2 [flutter flutter_web_plugins shared_preferences_platform_interface web]
- shared_preferences_windows 2.4.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.4.1 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 2.0.0 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml]
- source_helper 1.3.4 [analyzer collection source_gen]
- source_span 1.10.0 [collection path term_glyph]
- sprintf 7.0.0
- stack_trace 1.11.1 [path]
- stream_channel 2.1.2 [async]
- stream_transform 2.1.0
- string_scanner 1.2.0 [source_span]
- synchronized 3.3.0+2
- term_glyph 1.2.1
- test_api 0.7.2 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- time 2.1.4 [clock]
- time_machine 0.9.17 [meta collection]
- timing 1.0.1 [json_annotation]
- typed_data 1.3.2 [collection]
- universal_io 2.2.2 [collection meta typed_data]
- universal_platform 1.1.0
- url_launcher 6.3.0 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- url_launcher_android 6.3.10 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.3.1 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.2.0 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.2.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.3.3 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.2 [flutter url_launcher_platform_interface]
- uuid 4.5.0 [crypto sprintf meta fixnum]
- vector_graphics 1.1.11+1 [flutter http vector_graphics_codec]
- vector_graphics_codec 1.1.11+1
- vector_graphics_compiler 1.1.11+1 [args meta path_parsing xml vector_graphics_codec path]
- vector_math 2.1.4
- vm_service 14.2.5
- watcher 1.1.0 [async path]
- weak_map 3.0.1
- web 1.1.0
- web_socket 0.1.6 [web]
- web_socket_channel 3.0.1 [async crypto stream_channel web web_socket]
- webview_flutter_android 3.16.7 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 2.10.0 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 3.15.0 [flutter path webview_flutter_platform_interface]
- win32 5.5.4 [ffi]
- win32_registry 1.1.5 [ffi win32]
- xdg_directories 1.0.4 [meta path]
- xml 6.5.0 [collection meta petitparser]
- yaml 3.1.2 [collection source_span string_scanner]

Additional context and comments

setup up was done via the flutterfire cli:

flutterfire configure -o "lib/firebase/firebase_options_dev.dart" --platforms "ios" -i "<my.bundle.Id>.dev" --ios-build-config "Release-dev" --ios-out "ios/dev"
flutterfire configure -o "lib/firebase/firebase_options_stage.dart" --platforms "ios" -i "<my.bundle.Id>.stage" --ios-build-config "Release-stage" --ios-out "ios/stage"
flutterfire configure -o "lib/firebase/firebase_options_prod.dart" --platforms "ios" -i "<my.bundle.Id>" --ios-build-config "Release-prod" --ios-out "ios/prod"

Set minimum deployment target to 13 (in XCode and in Flutter/AppFrameworkInfo.plist)

I made sure that everything is up-to-date

flutterfire configure
flutterfire update
flutter clean && flutter pub get
cd ios && pod install --clean-install
@SunlightBro SunlightBro added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Sep 26, 2024
@SelaseKay
Copy link
Contributor

SelaseKay commented Sep 26, 2024

This has been fixed.
Issue: 13323
PR: 13400

@SelaseKay SelaseKay added resolution: duplicate This issue or pull request already exists resolution: fixed A fix has been merged or is pending merge from a PR. and removed resolution: duplicate This issue or pull request already exists labels Sep 26, 2024
@firebase firebase locked and limited conversation to collaborators Oct 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Attention This issue needs maintainer attention. resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants