在Google Actions推送通知时遇404‘应用未找到’错误的求助
Hey there, let's walk through why you're seeing that frustrating 404 error when trying to send push notifications to authorized users. I've tackled similar issues before, so here are the most probable causes and fixes to get you back on track:
1. Your App Preview Has Expired
This is the most common culprit. Google Actions' test preview mode (the "Test Draft" you enable in the Actions Console) has an expiration window—usually after 30 days of inactivity, or if you haven't refreshed the preview after making changes.
To fix this:
- Head to the Actions Console, open your project, and click the Test button to re-enable the preview.
- If you're using the gcloud CLI, run this command to redeploy the preview:
gcloud alpha actions deploy preview - Make sure your test device is still listed in the preview's test users list (under Test > Test users).
2. You're Using an Incorrect Project ID
Double-check that the project ID you're referencing in your notification-sending code matches exactly with the project tied to your Google Action. It's easy to mix up Firebase project IDs, Cloud project IDs, or make typos here.
- Verify the project ID in the Actions Console (it's displayed at the top of the page).
- Ensure any backend code that calls the Google Actions Notification API uses this exact project ID in the request body (look for the
projectIdfield). - Confirm the project exists in the Google Cloud Console and that the Actions API is enabled for it.
3. Notification Settings Are Missing or Misconfigured
Push notifications require specific setup in the Actions Console that's easy to overlook:
- Go to Actions > Notifications in your project and confirm notifications are enabled. You'll need to set a display name and icon for your notifications here.
- Check that the
UPDATE_INTENTyou're saving matches exactly the intent name you defined in the Actions Console for triggering notifications. Case sensitivity matters here! - Ensure your backend service account has the
actions.notifications.sendpermission. You can assign this in the Google Cloud Console under IAM & Admin > IAM.
4. Issues with User ID or Intent Storage
Looking at your code snippet, the way you store UPDATES_USER_ID and UPDATE_INTENT could be causing problems:
UPDATES_USER_IDis a project-specific user identifier generated by Google Actions. Make sure you're storing this exact value (not a custom user ID from your own system) in your database.- Double-check that the
UPDATE_INTENTargument you're saving is the correct intent name configured to handle notifications. If this is misspelled, the API won't recognize your app when trying to send the notification.
5. Invalid Notification API Endpoint or Request
If you're using a backend to send notifications, confirm you're hitting the correct API endpoint:
https://actions.googleapis.com/v2/conversations:send
Also, ensure your request body includes the correct projectId, conversationId (which ties to the UPDATES_USER_ID), and intent fields with no typos.
Quick Test Tip
After fixing any of the above, try re-authorizing the notification permission on your test device. Old authorization sessions can become invalid when the preview expires, so fresh authorization often resolves lingering issues.
内容的提问来源于stack exchange,提问作者Edo

