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

[bug]: macOS build failure "unsealed contents present in the bundle root" after using flutterfire configre #244

Closed
1 task done
nilsreichardt opened this issue Dec 9, 2023 · 2 comments · Fixed by #245
Assignees
Labels
bug Something isn't working

Comments

@nilsreichardt
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues.

CLI Version

0.3.0-dev.18

Firebase Tools version

13.0.1

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.16.3, on macOS 13.6 22G120 darwin-arm64 (Rosetta), locale en-DE)
    • Flutter version 3.16.3 on channel stable at /Users/nils/fvm/versions/3.16.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b0366e0a3f (3 days ago), 2023-12-05 19:46:39 -0800
    • Engine revision 54a7145303
    • Dart version 3.2.3
    • DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/nils/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

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

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

[!] Android Studio (version unknown)
    • Android Studio at /Applications/Android Studio Preview.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
    ✗ Unable to determine Android Studio version.
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] 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 Community Edition (version 2023.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

[✓] IntelliJ IDEA Ultimate Edition (version 2022.2.3)
    • IntelliJ at /Users/nils/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ
      IDEA.app
    • 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

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

[✓] VS Code (version 1.82.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • Nils’s iPhone (mobile) • 00008110-00042D6011D3801E • ios            • iOS 17.1.2 21B101
    • macOS (desktop)        • macos                     • darwin-arm64   • macOS 13.6 22G120 darwin-arm64 (Rosetta)
    • Chrome (web)           • chrome                    • web-javascript • Google Chrome 119.0.6045.199

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

! Doctor found issues in 1 category.

Description

I'm unable to build our macOS application after using flutterfire configre:

/Users/nils/Projects/playground/flutter_macos_flavors/build/macos/Build/Products/Debug-dev/dev_flutter_macos_flavors.app: unsealed contents present in the bundle root
Command CodeSign failed with a nonzero exit code

Steps to reproduce

Run the following commands:

# Create Flutter app
flutter create flutter_macos_flavors_bug

# Navigate to the app
cd flutter_macos_flavors_bug

# Configure Firebase
flutterfire configure \
  --project=YOUR_FIREBASE_ID \
  --platforms=macos \
  --out=lib/firebase_options.dart \
  --macos-build-config=Debug \
  --macos-out=macos/config/firebase \
  --macos-bundle-id=re.nils.flutterMacosFlavorsBug

# Remove firebase_options.dart as it's not needed and requires the firebase_core package. If you like, you can also install the firebase_core package to fix this problem, but it won't fix the reported bug.
rm lib/firebase_options.dart

# Try to run for macOS
flutter run -d macos

Alternatively, you can clone this repository: https://github.com/nilsreichardt/playground/tree/main/flutter_macos_flavors and try to run flutter run -d macos

Expected behavior

The app should build.

Screenshots

image

Additional context and comments

image

If you comment out the commands in the "FlutterFire: "flutterfire bundle-service-file"" Build Phase, the build works again.

@russellwheatley
Copy link
Member

Hey @nilsreichardt, thanks for reporting. I was able to reproduce and should have a fix in the next release that should be cut at some point this week. Also have the documentation PR we discussed in Prague: #224 if you want to take a look 👍

@nilsreichardt
Copy link
Contributor Author

Thanks for the quick fix ❤️ This was a major blocker for us to migrate to use flavors and macOS (SharezoneApp/sharezone-app#1078)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants