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

Error outputting keys and certificates" when adding APNS notifications to Amplify #13474

Closed
2 tasks done
kayzkenny opened this issue Dec 13, 2023 · 5 comments
Closed
2 tasks done
Labels
duplicate If marked with duplicate, issue will be closed & original will be added for traceability notifications Issues tied to the notifications category pending-triage Issue is pending triage

Comments

@kayzkenny
Copy link

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

20.10.0

Amplify CLI Version

12.9.0

What operating system are you using?

MacOS Ventura 13.6

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Describe the bug

In my Flutter project I'm trying to add notifications with APNS. When I do this I get the following error message after giving the path to the .p12 certificate and writing the non-existent password (just pressing enter):

amplify add notifications                                                                                                             ─╯
✔ Choose the notification channel to enable · APNS |  Apple Push Notifications   
✔ Select the authentication method for the APNS channel · Certificate
✔ The certificate file path (.p12):  · /Users/kehindeakeredolu/Desktop/freelance/light-app/carnet_light/assets/amplify.p12
✔ The certificate password (if any):  · 
Error outputting keys and certificates
806024E901000000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:342:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()
🛑 Command failed: openssl pkcs12 -in /Users/kehindeakeredolu/Desktop/freelance/light-app/carnet_light/assets/amplify.p12 -out /var/folders/n4/r1prvfbj5hs0m1hfkn9y2w180000gn/T/temp.pem -nodes -passin pass:
Error outputting keys and certificates
806024E901000000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:342:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()


Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Session Identifier: 142fb2ce-7946-471f-aab9-78ebeff10c44

✅ Report saved: /var/folders/n4/r1prvfbj5hs0m1hfkn9y2w180000gn/T/lightAppDev/report-1702484584474.zip

✔ Done

Project Identifier: d2ab3b97bdfa12d6121b99659aa629ee

Expected behavior

Amplify notifications should be added to the project without any problems.

Reproduction steps

Create Flutter project and add Amplify to it.
Follow the official guide to add Notifications to said project.

Project Identifier

d2ab3b97bdfa12d6121b99659aa629ee

Log output

# Put your logs below this line

2023-12-13T16:21:39.430Z|info : amplify add notifications  
2023-12-13T16:21:39.506Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2023-12-13T16:23:06.910Z|error : Command failed: openssl pkcs12 -in /Users/kehindeakeredolu/Desktop/freelance/light-app/carnet_light/assets/amplify.p12 -out /var/folders/n4/r1prvfbj5hs0m1hfkn9y2w180000gn/T/temp.pem -nodes -passin pass:
Error outputting keys and certificates
806024E901000000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:342:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()

UnknownFault: Command failed: openssl pkcs12 -in /Users/kehindeakeredolu/Desktop/freelance/light-app/carnet_light/assets/amplify.p12 -out /var/folders/n4/r1prvfbj5hs0m1hfkn9y2w180000gn/T/temp.pem -nodes -passin pass:
Error outputting keys and certificates
806024E901000000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:342:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()

Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@kayzkenny kayzkenny added the pending-triage Issue is pending triage label Dec 13, 2023
@ykethan
Copy link
Member

ykethan commented Dec 13, 2023

Hey @kayzkenny, thank you for reaching out. The issue appears to be similar to #12969.
Noticed your comment on the issue, did you try switching to LibreSSL in your terminal as suggested in the comment #12969 (comment)

@ykethan ykethan added notifications Issues tied to the notifications category pending-response Issue is pending response from the issue author duplicate If marked with duplicate, issue will be closed & original will be added for traceability labels Dec 13, 2023
@kayzkenny
Copy link
Author

@ykethan i saw the comment, but can't find instructions on how to switch the LibreSSL. Can you point me in the find directions?

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Dec 14, 2023
@kayzkenny
Copy link
Author

@ykethan i was able to enable APNs.

I had to first install libressl using brew install libressl and add it to my path using export PATH="/opt/homebrew/opt/libressl/bin:$PATH"

This should be in the docs as most flutter devs might not figure this out on their own.

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@true-glassy
Copy link

As @ykethan mentioned you have to

  1. brew install libressl
  2. export PATH="/usr/local/opt/libressl/bin:$PATH" (you have to know where is your liberssl was downloaded and use that in your export)

The command to know where is your liberssl was is brew --prefix libressl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate If marked with duplicate, issue will be closed & original will be added for traceability notifications Issues tied to the notifications category pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

3 participants