-
Notifications
You must be signed in to change notification settings - Fork 4k
π [firebase_messaging] iOS build error - fatal error: could not build module 'nanopb' #3840
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
Comments
I also saw this in my ci jobs. |
I have the same problem |
Same problem |
please help |
help |
got same error, i tried deleting podfile then recreate, same output error |
Hello, same error here, podfile cleared, flutter clean... already tried |
Same issue for both Firebase/Firestore and Firebase/Messaging from a clean install and after following to the 'T' the iOS app wizard from the Firebase console. |
I update my cocoapods version to 1.10.0.rc.1 to solve this issue. |
It works, thanks. |
That does not help for me. :-( Still the same problem. |
After running the update command I ran Steps to go through:
|
Still not working for me. :-( I can now build the app in xcode but when I try to run it with |
Also for me the same, I have one folder with integrated Firebase and the other without. |
Hi this solution helped me. I also found out that I was using Xcode's Legacy build system. Which I changed to the recommended one. Hope this helps. |
Closing as solutions provided |
If running this in CI/CD pipeline, you might need to manually force the correct version of cocoapods. I'm using AppCenter and added the below code to the post-clone script ( See below a sample #!/usr/bin/env bash
# fail if any command fails
set -e
# debug log
set -x
cd ..
# https://github.com/FirebaseExtended/flutterfire/issues/3840
# https://stackoverflow.com/questions/60749496/flutter-ios-build-on-the-app-center-fails-with-error-invalid-podfile-file-gen
# TODO: remove this once issue is fixed with cocoapods
echo "Re-install coacoa pods with version 1.10.0.rc.1"
sudo gem uninstall cocoapods --all --executables
sudo gem install cocoapods --pre
echo "Done re-installing coacoa pods with version 1.10.0.rc.1"
# install flutter
git clone -b 1.22.1 https://github.com/flutter/flutter.git
export PATH=`pwd`/flutter/bin:$PATH
flutter channel stable
flutter doctor
echo "Installed flutter to `pwd`/flutter"
flutter build ios --release --no-codesign Hopefully, there will soon be a non-pre version for coacoapods that will solve this issue. Inspired by below:
|
^ solutions provided but still outstanding issue. can we reopen this? im still getting this error and currently using bitrise for my ci tool |
I have faced the same issue using fastlane. My script is doing a As I am building with fastlane locally on my machine I had the chance to set the value to Maybe you can include something in your script to overwrite the environment variable from Hope this works for you. |
Amazing, this worked @JtheSaw. Now I guess we just wait for an actual stable fix but for now, this works! Cheers! |
Damn, thank you. Was trying to make it work for ages by deleting the workspace file, pod folder, etc and re-installing without luck. |
Can you reopen this @dackers86? Although there are workarounds, the real issue isn't stably resolved yet. |
@julrach Have the same issue, can you please provide more info how did you fix that with the script? π |
@stepanzalis Here is what I added into my Podfile:
|
I can confirm pod version logs[β] Flutter (Channel master, 1.24.0-2.0.pre.98, on Mac OS X 10.15.7 19H2
darwin-x64, locale en-GB)
β’ Flutter version 1.24.0-2.0.pre.98 at /Users/tahatesser/Code/flutter_master
β’ Framework revision a4ac7cce82 (8 hours ago), 2020-10-21 00:46:59 -0400
β’ Engine revision c2c74ed708
β’ Dart version 2.11.0 (build 2.11.0-240.0.dev)
[β] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
β’ Android SDK at /Users/tahatesser/Code/sdk
β’ Platform android-30, build-tools 30.0.2
β’ ANDROID_HOME = /Users/tahatesser/Code/sdk
β’ Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
β’ All Android licenses accepted.
[β] Xcode - develop for iOS and macOS (Xcode 12.1)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 12.1, Build version 12A7403
β’ CocoaPods version 1.10.0.rc.1
[β] Chrome - develop for the web
β’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[β] Android Studio (version 4.1)
β’ 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
1.8.0_242-release-1644-b3-6222593)
[β] VS Code (version 1.50.1)
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 3.15.1
[β] Connected device (5 available)
β’ RMX2001 (mobile) β’ EUYTFEUSQSRGDA6D β’ android-arm64 β’
Android 10 (API 29)
β’ Tahaβs iPhone (mobile) β’ 00008020-001059882212002E β’ ios β’ iOS
14.1
β’ macOS (desktop) β’ macos β’ darwin-x64 β’ Mac
OS X 10.15.7 19H2 darwin-x64
β’ Web Server (web) β’ web-server β’ web-javascript β’
Flutter Tools
β’ Chrome (web) β’ chrome β’ web-javascript β’
Google Chrome 86.0.4240.80
β’ No issues found!
|
littery dont understand what you are saying |
Thanks so much!!! I did it and everything works fine! |
Bug report
Describe the bug
Using the latest firebase_messaging (7.0.3) in my Flutter project. On building:
Steps to reproduce
Steps to reproduce the behavior:
await Firebase.initializeApp();
Upon inspecting the files mentioned in the error, many imports have been duplicated.
Additional context
Tried the following:
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: