-
Notifications
You must be signed in to change notification settings - Fork 826
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
failed to amplify env checkout prod with failure retrieving In-App messaging and Email Channel #13653
Comments
Hey @ericowhadi, thank you for reaching out. could you add |
✔ Initialized provider successfully. ✔ Successfully retrieved channel information for FCM. ⠋ Retrieving channel information for In-App Messaging.⠋ Retrieving channel information for Email.✖ There was an error initializing your environment. 🛑 Could not initialize categories for 'prod': Cannot read properties of undefined (reading 'Id') Resolution: Review the error message and stack trace for additional information. Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/ ProjectInitFault: Could not initialize categories for 'prod': Cannot read properties of undefined (reading 'Id')
Cannot read properties of undefined (reading 'Id') TypeError: Cannot read properties of undefined (reading 'Id')
⠙ Retrieving channel information for Email. Session Identifier: dc6bac4c-6b6e-47cf-bb64-97ce9da3a966 ✅ Report saved: /var/folders/qd/g556jpdn0r114qsj2prqqrqc0000gn/T/pyxiscontribute/report-1710537220958.zip ✔ Done Project Identifier: c9dd6cbc5e466a59de093a48bd94c543 |
"Could you try pulling the backend into a new empty directory outside your existing project directory, does this throw a similar error message and re-prompt for serverKey?" |
hey, thank you for the information. we can pull the backend by running additionally, in your
|
OK, so the amplify pull in an new directory fails with a similar error: Cannot read properties of undefined (reading "Id"). And it did not prompt me for a serverKey. (note that the serverKey was manually added to pinpoint, so I guess it is not surprising that it does not ask for it again?). |
@ericowhadi thank you for the information. To ensure could you check the
could you ensure if the id's are filled in and matched the pinpoint resource. if not run additionally, could you try downloading the |
@yketha after doing amplify env checkout prod (that fails obviously, since this is the bug I am having), the amplify-meta.json is indeed bogus for the notifications section but correct on analytics: while the dev environment have all data correctly populated for both analytics and pinpoint. |
@ericowhadi could you provide us the |
@ykethan just sent it. |
@ericowhadi thank you for the information. Did not notice any inconsistencies with the |
@ykethan I did amplify env checkout prod |
@ericowhadi interesting, could you try removing the notifications resource by |
If I do amplify remove notification, I am not sure I understand if this will remove it from both dev and prod. If I first do a amplify env checkout prod, then amplify remove notification, it will not remove it from dev, or will it? |
@ericowhadi could you zip and provide us the amplify folder at |
@ykethan sure I just did. Thank you for the support. Sent both dev and prod in case you need "working" vs "broken" |
@ericowhadi thank you for sending the files. I was able to recreate the issue by modifying the
|
awesome, let me try |
great, it worked. It did not ask me for server key, I guess because I already had manually populated it. It coorectly hydrated the notifications section, and successfully checkout prod. However when pushing, I got a graphql updating issue, but that is another story and I will open a new bug on it. Thanks a million for the great support @ykethan |
for the story, I found a workaround to the graphql issue that was having hard time updating a table where I changed pk, and had an index on. The solution was to first delete the table, push, then add the modified table. Amplify did not like doing it all at once. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
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.10.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
when I initially did a amplify env checkout prod, I was prompted for a serverKey. By the time I checked for the serverKey, my Mac hung and I had to reboot it. Re-running amplify env checkout prod, this time all resources made it, the command was successfull, but I was not prompted for a serverKey. I looked at console, and did see that FCM channel was not configured in PinPoint, so I manually enabled FCM and assigned the serverKey from pinpoint console.
Then amplify env checkout dev, then came back to amplify env checkout prod and getting complain.
Describe the bug
when I initially did a amplify env checkout prod, I was prompted for a serverKey. By the time I checked for the serverKey, my Mac hung and I had to reboot it. Re-running amplify env checkout prod, this time all resources made it, the command was successfull, but I was not prompted for a serverKey. I looked at console, and did see that FCM channel was not configured in PinPoint, so I manually enabled FCM and assigned the serverKey from pinpoint console.
Then amplify env checkout dev, then came back to amplify env checkout prod and getting complain.
this is what I see when I do amplify env checkout dev:
✔ Initialized provider successfully.
✔ Successfully retrieved channel information for FCM.
✔ Channel information retrieved for In-App Messaging
Deployment state saved successfully.
✅ Initialized your environment successfully.
but when I do amplify env checkout prod:
✔ Initialized provider successfully.
✔ Successfully retrieved channel information for FCM.
⠋ Retrieving channel information for In-App Messaging.⠋ Retrieving channel information for Email.✖ There was an error initializing your environment.
🛑 Could not initialize categories for 'prod': Cannot read properties of undefined (reading 'Id')
Resolution: Review the error message and stack trace for additional information.
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
⠙ Retrieving channel information for Email.
Session Identifier: 403cf9dd-5f13-4002-a614-c1964291d918
✅ Report saved: /var/folders/qd/g556jpdn0r114qsj2prqqrqc0000gn/T/pyxiscontribute/report-1710525021753.zip
✔ Done
Expected behavior
should succeed amplify env checkout prod
Reproduction steps
I don't know, I am in this stuck state and don't know what caused it in the first place.
Project Identifier
c9dd6cbc5e466a59de093a48bd94c543
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: