ThexXTURBOXx / flutter_web_auth_2

Flutter plugin for authenticating a user with a web service
https://pub.dev/packages/flutter_web_auth_2
MIT License
56 stars 55 forks source link

[Bug]: Fail to build an iOS app via fastlane in Github Action #137

Closed manh-t closed 1 month ago

manh-t commented 1 month ago

Description

Currently, I'm trying to create an iOS build by using fastlane via Github Action, but it fails at the step of compiling SwiftFlutterWebAuth2Plugin. swift in flutter_web_auth_2 ver 4.0.0 stable. I have to downgrade to 4.0.0-alpha.1 to be able to build it.

Minimal Reproduction

Steps to reproduce the behaviour:

  1. Use @fastlane.gym(...) to build the iOS app

Exception or Error

08:25:51: ▸ [gallery_saver] Compiling SwiftGallerySaverPlugin.swift 08:25:51: ▸ ARCHIVE FAILED 08:25:51: ▸ The following build commands failed: 08:25:51: ▸ SwiftCompile normal arm64 Compiling\ SwiftFlutterWebAuth2Plugin.swift /Users/runner/.pub-cache/hosted/pub.dev/flutter_web_auth_2-4.0.0/ios/Classes/SwiftFlutterWebAuth2Plugin.swift (in target 'flutter_web_auth_2' from project 'Pods') 08:25:51: ▸ SwiftCompile normal arm64 /Users/runner/.pub-cache/hosted/pub.dev/flutter_web_auth_2-4.0.0/ios/Classes/SwiftFlutterWebAuth2Plugin.swift (in target 'flutter_web_auth_2' from project 'Pods')

08:25:51: ▸ [integration_test] Generating integration_test.framework.dSYM 08:25:51: ▸ [google_maps_flutter_ios-google_maps_flutter_ios_privacy] Touching google_maps_flutter_ios_privacy.bundle 08:25:51: ▸ [integration_test] Touching integration_test.framework 08:25:51: ▸ [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2.LinkFileList 08:25:51: ▸ [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2_const_extract_protocols.json 08:25:51: ▸ [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2.SwiftFileList 08:25:51: ▸ [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2-OutputFileMap.json 08:25:51: ▸ [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2_vers.c 08:25:51: ▸ [flutter_web_auth_2] Compiling SwiftFlutterWebAuth2Plugin.swift 08:25:51: ▸ ::error file=/Users/runner/.pub-cache/hosted/pub.dev/flutter_web_auth_2-4.0.0/ios/Classes/SwiftFlutterWebAuth2Plugin.swift,line=78,col=62::incorrect argument label in call (have 'url:callback:completionHandler:', expected 'url:callbackURLScheme:completionHandler:') 08:25:51: ▸ _session = ASWebAuthenticationSession(url: url, callback: ASWebAuthenticationSession.Callback.https(host: host, path: path), completionHandler: completionHandler!) 08:25:51: ▸ ^ ~~~~ 08:25:51: ▸ ::error file=/Users/runner/.pub-cache/hosted/pub.dev/flutter_web_auth_2-4.0.0/ios/Classes/SwiftFlutterWebAuth2Plugin.swift,line=78,col=110::type 'ASWebAuthenticationSession' has no member 'Callback' 08:25:51: ▸ _session = ASWebAuthenticationSession(url: url, callback: ASWebAuthenticationSession.Callback.https(host: host, path: path), completionHandler: completionHandler!) 08:25:51: ▸ ~~~~~~ ^~~~ 08:25:51: ▸ ::error file=/Users/runner/.pub-cache/hosted/pub.dev/flutter_web_auth_2-4.0.0/ios/Classes/SwiftFlutterWebAuth2Plugin.swift,line=80,col=62::incorrect argument label in call (have 'url:callback:completionHandler:', expected 'url:callbackURLScheme:completionHandler:') 08:25:51: ▸ _session = ASWebAuthenticationSession(url: url, callback: ASWebAuthenticationSession.Callback.customScheme(callbackURLScheme), completionHandler: completionHandler!) 08:25:51: ▸ ^ ~~~~ 08:25:51: ▸ ::error file=/Users/runner/.pub-cache/hosted/pub.dev/flutter_web_auth_2-4.0.0/ios/Classes/SwiftFlutterWebAuth2Plugin.swift,line=80,col=110::type 'ASWebAuthenticationSession' has no member 'Callback' 08:25:51: ▸ _session = ASWebAuthenticationSession(url: url, callback: ASWebAuthenticationSession.Callback.customScheme(callbackURLScheme), completionHandler: completionHandler!) 08:25:51: ▸ ~~~~~~ ^~~~ ... [integration_test] Touching integration_test.framework [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2.LinkFileList [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2_const_extract_protocols.json [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2.SwiftFileList [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2-OutputFileMap.json [flutter_web_auth_2] Write Auxiliary File flutter_web_auth_2_vers.c [flutter_web_auth_2] Compiling SwiftFlutterWebAuth2Plugin.swift Error: incorrect argument label in call (have 'url:callback:completionHandler:', expected 'url:callbackURLScheme:completionHandler:') _session = ASWebAuthenticationSession(url: url, callback: ASWebAuthenticationSession.Callback.https(host: host, path: path), completionHandler: completionHandler!) ^ ~~~~ Error: type 'ASWebAuthenticationSession' has no member 'Callback' _session = ASWebAuthenticationSession(url: url, callback: ASWebAuthenticationSession.Callback.https(host: host, path: path), completionHandler: completionHandler!)


Error: incorrect argument label in call (have 'url:callback:completionHandler:', expected 'url:callbackURLScheme:completionHandler:')
                        _session = ASWebAuthenticationSession(url: url, callback: ASWebAuthenticationSession.Callback.customScheme(callbackURLScheme), completionHandler: completionHandler!)
                                                             ^          ~~~~~~~~
Error: type 'ASWebAuthenticationSession' has no member 'Callback'
                        _session = ASWebAuthenticationSession(url: url, callback: ASWebAuthenticationSession.Callback.customScheme(callbackURLScheme), completionHandler: completionHandler!)
                                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~

### Expected Behaviour

The iOS app should be built successfully.

### Screenshots

![image](https://github.com/user-attachments/assets/27760e32-1f85-4934-bdc8-154f827eee06)

### Additional context

+----------------------------------------------+
|              Build environment               |
+---------------+------------------------------+
| xcode_path    | /Applications/Xcode_15.2.app |
| gym_version   | 2.223.1                      |
| export_method | app-store                    |
| sdk           | iPhoneOS17.2.sdk             |
+---------------+------------------------------+

### Device

iphone 15

### OS

ios 17.2

### Browser

-

### Flutter version

3.24.3

### flutter_web_auth_2 version

4.0.0

### Checklist

- [X] I have read and followed the **entire** [troubleshooting guide](https://github.com/ThexXTURBOXx/flutter_web_auth_2#troubleshooting) and it has not provided the solution I need.
- [X] I have provided all the information I can.
ThexXTURBOXx commented 1 month ago

Same as #133 and is also mentioned in the changelog :)