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

No known class method for selector 'sha265:' #256

Closed
2 tasks done
janpieterz opened this issue Feb 22, 2019 · 18 comments
Closed
2 tasks done

No known class method for selector 'sha265:' #256

janpieterz opened this issue Feb 22, 2019 · 18 comments

Comments

@janpieterz
Copy link
Contributor

janpieterz commented Feb 22, 2019

Issue

Builds fail after upgrading to version 4.1.0. Seems to be a typo (265 instead of 256)?

NSData *sha265Verifier = [OIDTokenUtilities sha265:codeVerifier];


Environment

  • Your Identity Provider: e.g. IdentityServer 4 / Okta / Azure
    Not relevant
  • Platform that you're experiencing the issue on:
    • iOS
  • Are you using Expo, e.g. ExpoKit?
    • No
@kadikraman
Copy link
Contributor

Could you tell me what version of AppAuth-iOS you're using?

I merged a PR that added this and then reverted the change that converted 265 -> 256 in this PR since it's a naming change that AppAuth-iOS fixed in AppAuth-iOS/1.0.0.beta1 & I didn't want to depend on it until they've properly released a v1.

@janpieterz
Copy link
Contributor Author

janpieterz commented Feb 22, 2019 via email

@janpieterz
Copy link
Contributor Author

janpieterz commented Feb 22, 2019

Sorted, builds are green again. Thanks kadikraman, apologies for jumping on this!

@hadnazzar
Copy link
Contributor

I am still having that issue.

Screenshot 2019-03-22 at 14 51 32

@janpieterz
Copy link
Contributor Author

@hadnazzar Odd, can you copy the podfile here?

@hadnazzar
Copy link
Contributor

@janpieterz

I am using the latest master

github "openid/AppAuth-iOS" "master"

@janpieterz
Copy link
Contributor Author

@hadnazzar The latest master isn't compatible with the react-native-app-auth library.
I'd recommend using pod 'AppAuth', '0.95.0' to ensure you're using the correct version.

@hadnazzar
Copy link
Contributor

@janpieterz can you share your pod file with please?

@janpieterz
Copy link
Contributor Author

Sure:

platform :ios, '9.0'

target 'SampleApp' do
  pod 'AppAuth', '0.95.0'
end

@hadnazzar
Copy link
Contributor

@janpieterz thank you so much i tried with 0.95.0 too.

It is working right now 👍

@perry-mitchell
Copy link

perry-mitchell commented Jul 22, 2019

@janpieterz Hello! I'm still getting this error - with a fresh install of the library at 4.4.0. Pod installed as per instructions here. Rather than opening a new issue I was hoping you might be able to point be in the right direction here.

image

My Podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'BCAutoFillExtension' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for BCAutoFillExtension

end

target 'Buttercup' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Buttercup
  pod 'AppAuth', '>= 0.94'

  target 'ButtercupTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

target 'Buttercup-tvOS' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Buttercup-tvOS

  target 'Buttercup-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

Checking the node_modules/react-native-app-auth/ios/RNAppAuth.m file, I still find the following:

    NSData *sha265Verifier = [OIDTokenUtilities sha265:codeVerifier];
  return [OIDTokenUtilities encodeBase64urlNoPadding:sha265Verifier];
$ cat ./node_modules/react-native-app-auth/package.json | grep "\"version\":"
  "version": "4.4.0",

@perry-mitchell
Copy link

In fact, if I check the latest stable tag, the bug is still present there:

https://github.com/FormidableLabs/react-native-app-auth/blob/v4.4.0/ios/RNAppAuth.m#L162-L163

@janpieterz
Copy link
Contributor Author

@perry-mitchell Are you sure your pod is resolved to 0.94 and not to a later version?

@perry-mitchell
Copy link

@janpieterz The Podfile.lock is as follows:

PODS:
  - AppAuth (1.0.0):
    - AppAuth/Core (= 1.0.0)
    - AppAuth/ExternalUserAgent (= 1.0.0)
  - AppAuth/Core (1.0.0)
  - AppAuth/ExternalUserAgent (1.0.0)

DEPENDENCIES:
  - AppAuth (>= 0.95)

SPEC REPOS:
  https://github.com/cocoapods/specs.git:
    - AppAuth

SPEC CHECKSUMS:
  AppAuth: c42547576838bf025b852736dd9b8a1c943fe68f

PODFILE CHECKSUM: 83d4a7247cfb35db0df977839fc72910bf5e706c

COCOAPODS: 1.7.5

But I don't understand.. The latest stable version seems to still have that typo. I see no newer version (besides master and the beta) that has that changed.

Thanks for the help!

@janpieterz
Copy link
Contributor Author

Hi @perry-mitchell , you'll have to depend either on the latest beta (v5.0.0-rc1) or revert AppAuth to use v 0.94 or 0.95 specifically. See above for the podfile used.

@perry-mitchell
Copy link

@janpieterz That was it entirely, thanks for spelling it out for me. Cheers!

@kadikraman
Copy link
Contributor

Thanks for being the MVP here @janpieterz 🙌

@BatchOfCookies12
Copy link

BatchOfCookies12 commented Jun 8, 2020

Sorry to add chatter, but did anyone else notice the issue number here is 256? It seems coincidental considering the problem is that 265 needs to instead be 256 😆 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants