Skip to content

🐛 [firestore-send-email] delivery.info is always empty although the state is successful (Sendgrid SMTP) #2375

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

Closed
MichaelZaslavsky opened this issue Apr 19, 2025 · 9 comments · Fixed by #2402
Assignees
Labels
type: bug Something isn't working

Comments

@MichaelZaslavsky
Copy link

MichaelZaslavsky commented Apr 19, 2025

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • To file a bug against the Firebase Extensions platform, or for an issue affecting multiple extensions, please reach out to
    Firebase support directly.

[REQUIRED] Step 2: Describe your configuration

  • Extension name: firestore-send-email
  • Extension version: 0.1.37
  • Configuration values (redact info where appropriate):
    • Authentication Type: Username & Password
    • SMTP password: SG.***
    • SMTP connection URI: smtp://[email protected]:587
    • Email documents collection: mail
    • SendGrid API Key: Full Access permissions (just in case)

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

  1. Install the extension with SendGrid as the SMTP provider
  2. Configure with proper SendGrid API key (with full access permissions)
  3. Create a document in the email collection:
{
  to: ["[email protected]"],
  message: {
    subject: "Test Email",
    text: "Test content",
    html: "<p>Test content</p>"
  }
}
  1. Email sends successfully (state shows "SUCCESS")
  2. Check the delivery.info object - it shows null or empty values for messageId, accepted array, and response

More context:

  • Using the Firestore database and adding the data manually to the document (just for testing first).
  • Using the Sendgrid Essentials plan, I gave full access to the API Key.
  • I tried the 465 port as well, and I got the same result.
  • I tried to enable events and create Sendgrid Webhooks (I don't think it's needed, but anyway doesn't seem to help).
  • Once I install the extension, I can see that the Google Build works properly and finishes successfully. I can see the Firebase Function ("ext-firestore-send-email-processQueue") is created with "document.write" permissions.
  • I get the email successfully, but the delivery.info is empty.
  • I can also see in Sendgrid the email activity (opened/clicked...).

Google Function Logs:

{
insertId: "63041e171002d6a2f032f9a1"
labels: {
execution_id: "rlsrefvltll2"
instance_id: "00afae80436d37e05a0f080139a57251629e30709c762d410bd7527879edfg0311cd4684f7f4892a2b5a5867d900b56c5a190cb7a637f00b41642582b353131dee054c64123ba6285c579cafdac8"
runtime_version: "nodejs20_20250413_20_18_3_RC00"
}
logName: "projects/my-project/logs/cloudfunctions.googleapis.com%2Fcloud-functions"
receiveTimestamp: "2025-04-19T22:05:12.430081981Z"
resource: {
labels: {
function_name: "ext-firestore-send-email-processQueue"
project_id: "my-project"
region: "europe-west1"
}
type: "cloud_function"
}
severity: "INFO"
textPayload: "Delivered message: mail/6JAOe17fF5ugR52ufJDo successfully. messageId: null accepted: 0 rejected: 0 pending: 0"
timestamp: "2025-04-19T22:05:12.181922Z"
trace: "projects/my-project/traces/db985d11a1bd958427c57272b974e18a"
}
Expected result

delivery.info gets populated with data (e.g., "accepted: {the-email}", messageId: "{uuid}").

Actual result

delivery.info always empty.

delivery (map)
attempts 1 (number)
endTime 20 April 2025 at 02:23:32 UTC+4 (timestamp)
error null (null)
info (map)
accepted (array)
messageId null (null)
pending (array)
rejected (array)
response null (null)
leaseExpireTime null (null)
startTime 20 April 2025 at 02:23:32 UTC+4 (timestamp)
state "SUCCESS" (string)
message (map)
html "<p>Test content</p>" (string)
subject "Test Email" (string)
text "Test content" (string)
to (array) 0 "[email protected]"
@MichaelZaslavsky MichaelZaslavsky added the type: bug Something isn't working label Apr 19, 2025
@CorieW
Copy link
Member

CorieW commented Apr 22, 2025

Hi @MichaelZaslavsky,

Thanks for reporting this issue! We’ve received it and are reviewing it. We’ll provide updates as soon as possible.

@CorieW CorieW self-assigned this Apr 22, 2025
@CorieW
Copy link
Member

CorieW commented Apr 23, 2025

I'm able to reproduce this.

@cabljac cabljac assigned cabljac and unassigned CorieW Apr 28, 2025
@CorieW
Copy link
Member

CorieW commented Apr 28, 2025

Image

@Mathias-RS
Copy link

Mathias-RS commented May 1, 2025

+1, same here after upgrading from 0.1.34 to 0.2.0

Image

@jaroalignme
Copy link

Hi, is any of you know the solution? I have also encounter this problem right now.

@cabljac
Copy link
Contributor

cabljac commented May 2, 2025

Hi, just wanted to let you know that a fix is being worked on and i'll provide updates as soon as i can!

@cabljac cabljac moved this from Needs Acknowledgment to In Progress in [Cloud] Extensions + Functions May 6, 2025
@cabljac cabljac moved this from In Progress to In Review in [Cloud] Extensions + Functions May 6, 2025
@github-project-automation github-project-automation bot moved this from In Review to Done in [Cloud] Extensions + Functions May 7, 2025
@Mathias-RS
Copy link

This error still persists on my side - no updates available in firestore for the extension yet.

@jaroalignme
Copy link

This error still persists on my side - no updates available in firestore for the extension yet.

Got the problem, solved. uninstall the extension and install and setup again, but this time I use 587 smtp port and then I updated godaddy dns stuff... but all of this help by chatgpt :)

Image

@cabljac
Copy link
Contributor

cabljac commented May 9, 2025

Hi, yes the release is still pending, something was up with CI. release should be out soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants