4

In trying to run a basic Flutter demo for Firebase Auth, running into this error output:

error: use of undeclared identifier
'SSL_get_secure_renegotiation_support'; did you mean 'GRPC_SHADOW_SSL_get_secure_renegotiation_support'?
      !(SSL_get_secure_renegotiation_support(ssl) &&
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        GRPC_SHADOW_SSL_get_secure_renegotiation_support

Steps I take, but still same error:

  1. Run flutter clean
  2. Run flutter build ios
  3. Follow steps for pod update from this post: https://stackoverflow.com/a/59073131/2162226

Full error output:

Running pod install...                                             20.8s
Running Xcode build...                                                  
(This is taking an unexpectedly lon                                                   
Xcode build done.                                           346.8s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳

/Users/gene/git/flutter_wifi/ios/Pods/BoringSSL-GRPC/src/ssl/t1_lib.cc:3319:9: error: use of undeclared identifier
'SSL_get_secure_renegotiation_support'; did you mean 'GRPC_SHADOW_SSL_get_secure_renegotiation_support'?
      !(SSL_get_secure_renegotiation_support(ssl) &&
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        GRPC_SHADOW_SSL_get_secure_renegotiation_support
In file included from /Users/gene/git/flutter_wifi/ios/Pods/BoringSSL-GRPC/src/ssl/t1_lib.cc:109:
/Users/gene/git/flutter_wifi/ios/Pods/BoringSSL-GRPC/src/include/openssl/ssl.h:4662:5: note: expanded from macro
'SSL_get_secure_renegotiation_support'
    SSL_get_secure_renegotiation_support
    ^
/Users/gene/git/flutter_wifi/ios/Pods/BoringSSL-GRPC/src/include/openssl/ssl.h:1590:20: note:
'GRPC_SHADOW_SSL_get_secure_renegotiation_support' declared here
OPENSSL_EXPORT int SSL_get_secure_renegotiation_support(const SSL *ssl);
                   ^
In file included from <built-in>:1:
/Users/gene/git/flutter_wifi/ios/Pods/Target Support Files/BoringSSL-GRPC/BoringSSL-GRPC-prefix.pch:2489:46: note:
expanded from macro 'SSL_get_secure_renegotiation_support'
#define SSL_get_secure_renegotiation_support GRPC_SHADOW_SSL_get_secure_renegotiation_support
Gene Bo
  • 11,284
  • 8
  • 90
  • 137

3 Answers3

4

Run this set of commands, where the pod commands are run from <flutterProject>\ios:

rm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/Caches/CocoaPods/
pod deintegrate
pod update

Thanks to post: https://stackoverflow.com/a/63997424/2162226

After doing this, then running flutter build ios, the error described in OP does not occur.

The other delta - though not sure if it's relevant, is that these changes are being applied to an SSD drive, upgraded from standard hard drive since OP.

Notice in the screenshot, the pod updates includes this line Installing BoringSSL-GRPC (0.0.7) , which I wonder if that's what in fact resolves the issue.

enter image description here

Gene Bo
  • 11,284
  • 8
  • 90
  • 137
2

temporarily you can comment below lines in: ios/Pods/BoringSSL-GRPC/src/include/openssl/ssl.h

// #define SSL_CTX_set_tlsext_servername_callback \
    SSL_CTX_set_tlsext_servername_callback

// #define SSL_get_secure_renegotiation_support \
    SSL_get_secure_renegotiation_support

and rebuild it should work. It appears to be the firebase problem but I haven't found a permanent solution yet...

Robert Christopher
  • 4,940
  • 1
  • 20
  • 21
Meitong Li
  • 196
  • 4
  • This resolved the build, nice. [Details about this on GitHub Issues](https://github.com/flutter/flutter/issues/32202#issuecomment-550174566) – Gene Bo Sep 28 '20 at 16:47
  • I've updated this thread with post: https://stackoverflow.com/a/64364518/2162226 , where with `pod update` (and preceding steps) I was able to run the build and the error *does not* occur . I would be curious to know if this helps resolve the issue for you as well. Thank you – Gene Bo Oct 15 '20 at 03:41
0

UPDATE Regarding Work-Around Solution

I am running the builds on a Mac Mini that can take up to 10 minutes to complete a build for the code at hand. When I run flutter clean, it regenerates the ssl.h file and so those 2 lines need to be commented out again.

Having a "smart" text editor open to the code, where the text-editor shows you when the file system has changed (eg, Sublime), I can see that those lines are not commented once flutter build ios gets going. Soon as I see that, I can comment out the lines once again and apparently if I do so in time the build will complete successfully. Before I was letting the build fail after every flutter clean, and then commenting out those lines. It really compounds the build time, so this additional consideration helps in working with the issue here.

Gene Bo
  • 11,284
  • 8
  • 90
  • 137