amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

"amplify env pull --restore" disables apns in notifications module

Open rb365 opened this issue 7 years ago • 4 comments

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker

Describe the bug "amplify env pull --restore" disables apns in notifications module:

To Reproduce

  • add notifications module

  • add APNS channel with p12 key with CLI amplify notifications update ? Choose the push notification channel to configure. APNS ? Do you want to enable the APNS channel Yes ? Choose authentication method used for APNs Certificate ? The certificate file path (.p12): notif.p12 ? The certificate password (if any):
    MAC verified OK ✔ The APNS channel has been successfully enabled.

  • amplify push

  • verify everything works and you can send notifications

  • amplify env pull --restore

✔ Initialized provider successfully. ✔ Channel information retrieved for APNS ✔ Channel is not setup for FCM ✔ Channel is not setup for Email ✔ Channel is not setup for SMS ✔ The APNS channel has been disabled. Initialized your environment successfully.

I have to run amplify notifications add to add certificate again every time anyone pulls

Expected behavior I should only provide certificate once and it should never erase it on pull

rb365 avatar Oct 21 '19 21:10 rb365

PLEASE WE NEED THIS FIX SUDDENLY !!!

dionmello avatar Nov 05 '19 16:11 dionmello

This issue also relevant to FCM and SMS channels. @kaustavghosh06 can you please let us know what is the status of this issue?

yonatanganot avatar Nov 19 '19 06:11 yonatanganot

my workaround was to manually create 2 pinpoint projects one for APNS and one for APNS_SANDBOX and then directly use their application ids from all of my environments. let apnsConfig = [ { // The Amazon Pinpoint project ID that you want to use when you send this // message. Make sure that the push channel is enabled for the project that // you choose. applicationId: "blah", channelType: "APNS" }, { applicationId: "blah", channelType: "APNS_SANDBOX" }, ];

rb365 avatar Nov 20 '19 00:11 rb365

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 26 '21 21:05 github-actions[bot]