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_auth 4.7.2] Build fails with 'messages.g.h' file not found #11409

Closed
mdddj opened this issue Aug 2, 2023 · 7 comments · Fixed by #11472
Closed

🐛 [firebase_auth 4.7.2] Build fails with 'messages.g.h' file not found #11409

mdddj opened this issue Aug 2, 2023 · 7 comments · Fixed by #11472
Labels
platform: ios Issues / PRs which are specifically for iOS. plugin: auth resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working

Comments

@mdddj
Copy link

mdddj commented Aug 2, 2023

Could not build the precompiled application for the device.
Lexical or Preprocessor Issue (Xcode): 'messages.g.h' file not found
/Users/ldd/.pub-cache/hosted/pub.dev/firebase_auth-4.7.2/ios/Classes/messages.g.m:3:8
image image

deps

  firebase_core: ^2.15.0
  firebase_auth: ^4.7.2
  firebase_app_check: ^0.1.5+1
  firebase_messaging: ^14.6.5

flutter doctor

[✓] Flutter (Channel stable, 3.10.6, on macOS 14.0 23A5301h darwin-arm64, locale
    zh-Hans-CN)
    • Flutter version 3.10.6 on channel stable at /Users/ldd/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (3 weeks ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/ldd/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/ldd/Library/Android/sdk
    • Java binary at:
      /Users/ldd/Library/Java/JavaVirtualMachines/azul-17.0.6/Contents/Home/bin/
      java
    • Java version OpenJDK Runtime Environment Zulu17.40+19-CA (build
      17.0.6+10-LTS)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A5209g
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 75.0.4
    • Dart plugin version 232.8660.129

[✓] VS Code (version 1.80.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is 127.0.0.1,localhost,0.0.0.0,::1
    • NO_PROXY contains localhost
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains ::1

[✓] Connected device (5 available)    • MI CC 9 (mobile)           • a2555e9c                             • android-arm64  • Android 11 (API 30)
    • 梁典典的iPhone (mobile)        • 00008101-00064D900E22001E            • ios            • iOS 16.6 20G75
    • iPhone 14 Pro Max (mobile) • 04EA4D51-8126-4D4F-8657-4E991E635751 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 14.0 23A5301h darwin-arm64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 114.0.5735.133

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@mdddj mdddj added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Aug 2, 2023
@mdddj
Copy link
Author

mdddj commented Aug 2, 2023

Using this solution can temporarily solve the problem #11300 (comment)

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

@mdddj
Are you using any other community package just like the comment here #11300 (comment) ?

@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 Aug 2, 2023
@RWolfing
Copy link

RWolfing commented Aug 3, 2023

Running into the same issue since yesterday. Manually editing .pub-cache/hosted/pub.dev/firebase_auth-4.7.2/ios/Classes/messages.g.m and changing the import statement allows the build to run successfully. Given that the problem was already discussed and fixed for other files here #11300 (comment) the issue seems pretty obvious?

I would create a PR but messages.g.h seems to be autogenerated and I do not know enough about Pigeon to know how to fix it. Seems the issue was fixed but reintroduced here #10802.

Changes needed in messages.g.m to fix the build manually:

#import <firebase_auth/messages.g.h>
#if TARGET_OS_OSX
#import <FlutterMacOS/FlutterMacOS.h>
#else
#import <Flutter/Flutter.h>
#endif

@mdddj
Copy link
Author

mdddj commented Aug 3, 2023

@mdddj 您是否使用任何其他社区包,就像这里的评论#11300(评论)一样?

image Yes, I found it

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Aug 3, 2023
@danagbemava-nc
Copy link

The issue is reproducible using the steps below

  • flutter create foo & cd foo
  • flutter pub add firebase_core firebase_auth file_selector
  • flutter build ios (you may need to select a dev team in xcode first)
flutter build ios
Building com.example.hg for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: X8NNQ9CYL2
Running pod install...                                           1,137ms
Running Xcode build...
Xcode build done.                                           26.3s
Failed to build iOS app
Lexical or Preprocessor Issue (Xcode): 'messages.g.h' file not found
/Users/nexus/.pub-cache/hosted/pub.dev/firebase_auth-4.7.2/ios/Classes/messages.g.m:3:8


Encountered error while building for device.

@danagbemava-nc danagbemava-nc added plugin: auth platform: ios Issues / PRs which are specifically for iOS. and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Aug 3, 2023
@danagbemava-nc danagbemava-nc changed the title 🐛 [firebase_auth 4.7.2] Build failed in Xcode 15 bate5 🐛 [firebase_auth 4.7.2] Build fails with 'messages.g.h' file not found Aug 3, 2023
@danagbemava-nc
Copy link

\cc @Lyokone

@predarag
Copy link

I have the same problem with firebase_auth from v4.7.0 to v4.7.2

@darshankawar darshankawar added the resolution: fixed A fix has been merged or is pending merge from a PR. label Aug 16, 2023
@firebase firebase locked and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: ios Issues / PRs which are specifically for iOS. plugin: auth resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants