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

getting crash #7

Open
debabrataroy718 opened this issue Apr 12, 2022 · 8 comments
Open

getting crash #7

debabrataroy718 opened this issue Apr 12, 2022 · 8 comments

Comments

@debabrataroy718
Copy link

Hi,
I am getting crash on SecKeyCreateWithData method.
key = SecKeyCreateWithData(keyData as CFData, keyDict as CFDictionary, &error)

Error Log:
[seckey] SecKeyCreate init(RSAPublicKey) failed: -50

Please let me know if you any other information.

Thanks

@AlgyJr
Copy link
Owner

AlgyJr commented Apr 12, 2022

Hi @debabrataroy718 ,

I'm on my way home, I'll check it ASAP...

By the way thanks!

@AlgyJr
Copy link
Owner

AlgyJr commented Apr 12, 2022

@debabrataroy718 could you share a screenshot of your console when getting this error?
Cuz I can't replicate the error you're getting to Understand what is happing exactly.

I look forward to hearing from you.

@debabrataroy718
Copy link
Author

Hi @AlgyJr ,
Thanks for the reply.
I have attached screenshot please check.
Screenshot 2022-04-13 at 11 11 07 AM

@AlgyJr
Copy link
Owner

AlgyJr commented Apr 13, 2022

Hoo alright, I have replicated that error yesterday, and I noticed that I'm forcing the unwrapping there without check if nil.

But if it is trying to return nil your API Key or Public Key is malformed.

Have you created your account and got your API Key and Public Key on M-Pesa for Developers Platform website ?

@AlgyJr
Copy link
Owner

AlgyJr commented Apr 13, 2022

Please try to check your API Key and Public Key.

I'll fix the force unwrap there on the next version that is coming soon.

Thanks for you attention and opening this issue.

@AlgyJr
Copy link
Owner

AlgyJr commented Apr 14, 2022

Hi @debabrataroy718 , any news?

AlgyJr added a commit that referenced this issue Apr 14, 2022
When creating Public Key from malformed or invalid Public Key returns nil and was forcing unwrap a nil

Closes #7
@waweruk
Copy link

waweruk commented Apr 21, 2022

Hi @AlgyJr

I can see the SDK has been tagged for Mozambique. Is this not possible to use for Kenya with reference to this website - https://developer.safaricom.co.ke/

@AlgyJr
Copy link
Owner

AlgyJr commented Apr 21, 2022

Hi @waweruk ,

Unfortunately no, is not possible to be used for M-Pesa Safaricom Kenya.

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

3 participants