Flutter with iOS build is failing on "GeneratedPluginRegistrant.h

flutter
#1

Bitrise Build Issue Report template

Description of the issue

I am unable build a simple flutter app on iOS:
code is here: https://github.com/prolificcoder/flutter_codelab2/commit/91506a441762cc485371725b33a90338b8e6ed71
bitrise job: https://app.bitrise.io/build/cb460c4a4c4f716d#?tab=log

The error I am getting seems to be in the bridging header:

Running Xcode build...                                          
Xcode build done.                                           50.4s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from /Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^
    /Users/vagrant/git/ios/Runner/GeneratedPluginRegistrant.h:8:9: error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^
    1 error generated.
    <unknown>:0: error: failed to emit precompiled header '/Users/vagrant/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_2ZB8Y4AALYHW0-clang_30W6EZYMUENOK.pch' for bridging header '/Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h'
    /Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from /Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^
    /Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from /Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^
    /Users/vagrant/git/ios/Runner/GeneratedPluginRegistrant.h:8:9: error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^
    1 error generated.
    <unknown>:0: error: failed to emit precompiled header '/Users/vagrant/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_2VEHMXPPP3QZS-clang_3T4HON7UH8YHB.pch' for bridging header '/Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h'
    /Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from /Users/vagrant/git/ios/Runner/Runner-Bridging-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^

Environment:

I tried both the defaul stack with Catalina and also 11.3.x on majave.

If on Bitrise.io: which stack? If not on Bitrise.io: on what operating system? (Plus any other information you can share)

Only flutter iOS build. Android is fine.

E.g.: Git Clone v3.6.0

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : YES
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : YES
  • Does the issue happen sporadically, or every time? : Everytime
  • Does upgrading the build Step to the latest version help? : YES/NO
  • When did the issue start? : As soon as build start

Local reproduction

No repro

Local reproduction: Linux / Android (docker based) stack builds

Didn’t try

Build log

0 Likes

#2

Hi there!

Can you please toggle the Support Access button to ON in the Settings of youri app? That allows us to access your project :slight_smile:

0 Likes