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

Breaking issue: No visible @interface for 'OIDAuthorizationResponse' declares the selector 'tokenExchangeRequestWithAdditionalParameters:' #376

Closed
RebinX1 opened this issue Mar 8, 2024 · 14 comments · Fixed by openid/AppAuth-iOS#825 or openid/AppAuth-iOS#827
Labels
bug Something isn't working triage Issues that need to be triaged

Comments

@RebinX1
Copy link

RebinX1 commented Mar 8, 2024

Yesterday my Xcode app and Simulator got updated automatically to the latest version, Xcode 15.3 and IOS 17.4.

After that i tried to run one of my project and it started to fail, i thought it was xcode being xcode and it should be an issue with my project and configuration.

After many research i decided to updated all of my packages. my project include Firebase and GoogleSignIn and some other packages. starting to update one by one i was still getting the same error, then when i reached the GoogleSignIn it was still the same version 7.0.0, i decided to remove it and its implementation from my project.

then all of a sudden the error disappeared! i add it again to my project and then i got a different error inside that library!

the error was:

No visible @interface for 'OIDAuthorizationResponse' declares the selector 'tokenExchangeRequestWithAdditionalParameters:'

Screenshot 2024-03-09 at 2 15 51 AM

i dont know what to do right now, my app depend highly on google sign in and this is breaking that authentication state.

i tried to decrease firebase version and deployment version but none worked so far!

@RebinX1 RebinX1 added bug Something isn't working triage Issues that need to be triaged labels Mar 8, 2024
@mdmathias
Copy link
Collaborator

What version of AppAuth are you seeing pulled in? If it's 1.7.0, then you can use this method and pass nil to the additionalHeaders parameter.

https://github.com/openid/AppAuth-iOS/blob/master/Source/AppAuthCore/OIDAuthorizationResponse.h#L123

@RebinX1
Copy link
Author

RebinX1 commented Mar 8, 2024

the AppAuth that i see is indeed 1.7.0, as its shown in the provided image.

i just added GoogleSignIn library and that issue appears.

Screenshot 2024-03-09 at 2 40 56 AM

@mdmathias
Copy link
Collaborator

Gotcha. Please take a look at my previous comment and update your method call. This will unblock you for now while I work on a patch release to add back the method that was removed.

@RebinX1
Copy link
Author

RebinX1 commented Mar 8, 2024

thanks, i checked the previous comment and its code, not sure what you meant by updating my method call.

but this is the code that i use to call the googleSignIn:

`import Foundation
import GoogleSignIn
import GoogleSignInSwift

final class GoogleSignInHelper {

@MainActor
func signIn() async throws -> GoogleSignInResultModel{
    guard let topVC = Utilities.shared.topViewController() else { throw URLError(.cannotFindHost) }
    
    let gidSignInResult = try await GIDSignIn.sharedInstance.signIn(withPresenting: topVC)
    
    guard let idToken = gidSignInResult.user.idToken?.tokenString else { throw URLError(.badServerResponse) }
    
    let accessToken = gidSignInResult.user.accessToken.tokenString
    let name = gidSignInResult.user.profile?.name
    let email = gidSignInResult.user.profile?.email
    
    let tokens = GoogleSignInResultModel(idToken: idToken, accessToken: accessToken, name: name, email: email)
    
    return tokens
}

}`

and i wanted to mention that the build fails to run, i am not sure how to update the library code. further assistance is appreciated.

[

Screen.Recording.Mar.mov

](url)

@mdmathias
Copy link
Collaborator

I apologize. Yes, this problem needs to be fixed here and not with you. AppAuth 1.7.0 is breaking Google Sign-In iOS. I am working on a fix right now.

@RebinX1
Copy link
Author

RebinX1 commented Mar 9, 2024

okay so should i just update my packages to the latest version and it should work fine, right?

@mdmathias
Copy link
Collaborator

You will have to wait on a fix for AppAuth. I am working on it right now. Google Sign-In iOS (GSI) depends upon AppAuth, and a version of AppAuth released that broke GSI. Please stay tuned. Sorry for this disruption.

@mdmathias
Copy link
Collaborator

@RebinX1 would you mind testing again? https://github.com/openid/AppAuth-iOS/releases/tag/1.7.1 should fix the problem you were seeing.

If you're using Swift Package Manager, this patch release is live and Google Sign-In iOS should pull in AppAuth 1.7.1. If you're using CocoaPods, we are pushing the patch release as I type this...and I just got the email that it succeeded.

Please me know if this error or any other error is present. Thanks and sorry for the trouble!

@mdmathias mdmathias reopened this Mar 9, 2024
@yuuki00682200
Copy link

Thanks,
I was having the same error, so thanks for the help!
I added a new https://github.com/openid/AppAuth-iOS.git .in SwiftPackagemanager and the error was resolved😭

@RebinX1 RebinX1 closed this as completed Mar 9, 2024
@RebinX1
Copy link
Author

RebinX1 commented Mar 9, 2024

Issue is fixed. thank you for the quick support @mdmathias.

@mdmathias
Copy link
Collaborator

Thanks for reporting and your patience!

@krishnaprasadkuchur
Copy link

krishnaprasadkuchur commented Mar 9, 2024

I ran into similar build issues due to the missing method, and had to pin the version of AppAuth to 1.6.2. Thank you for the quick fix @mdmathias .

@acwints
Copy link

acwints commented Mar 10, 2024

is there a fix for this? our app is still running into issues

ARC Semantic Issue (Xcode): No visible @interface for 'OIDTokenRequest' declares the selector
'initWithConfiguration:grantType:authorizationCode:redirectURL:clientID:clientSecret:scope:refreshToken:codeVerifier:additionalParameters:'

@mdmathias
Copy link
Collaborator

@acwints I believe that method was added back in openid/AppAuth-iOS#826, which was included in the 1.7.1 patch release. Please make sure that the version you're using is 1.7.1. Please also let me know if you're seeing any other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issues that need to be triaged
Projects
None yet
5 participants