Skip to content

Evolution API 2.3.7 + Chatwoot latest: PrismaClientValidationError (Invalid Date) when sending messages #2667

Description

@jorgelmurray11-lang

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Environment

  • Evolution API: 2.3.7
  • Chatwoot: latest (Docker)
  • PostgreSQL: 15
  • Redis: 7
  • Docker Compose
  • WhatsApp connected successfully

Problem

Incoming WhatsApp messages are delivered correctly to Chatwoot.

However, replying from Chatwoot fails.

The message is never sent to WhatsApp.

Error

PrismaClientValidationError

Invalid value for argument gte:

Provided Date object is invalid.

Expected Date.

The generated query contains:

where: {
  OR: [
    {
      jidOptions: {
        contains: "104234762670201@lid"
      }
    }
  ],
  updatedAt: {
    gte: new Date("Invalid Date")
  }
}

What works

  • WhatsApp connection ✅
  • Incoming messages ✅
  • Contacts sync ✅

What fails

  • Sending messages from Chatwoot to WhatsApp ❌

Additional information

The issue still happens after updating Evolution API to version 2.3.7.

The instance already supports remoteJidAlt for @lid, but Prisma still generates an Invalid Date in the query.

Any guidance would be appreciated.

What did you expect?

I expected Chatwoot to send the WhatsApp message successfully through Evolution API.

Incoming messages already work correctly.

The reply should be delivered to WhatsApp without generating any Prisma validation errors.

What did you observe instead of what you expected?

Instead of sending the message, Evolution API returns a PrismaClientValidationError.

The generated query contains:

updatedAt: {
gte: new Date("Invalid Date")
}

Incoming messages continue to work, but every outgoing message from Chatwoot fails.

Screenshots/Videos

I can provide screenshots of the Prisma error, Docker environment and Chatwoot configuration if needed.

Which version of the API are you using?

2.3.7

What is your environment?

Linux

Other environment specifications

Docker Compose
Evolution API 2.3.7
Chatwoot latest
PostgreSQL 15
Redis 7
Hosted on Vultr VPS

Issue only affects outgoing messages from Chatwoot.
Incoming messages work correctly.

If applicable, paste the log output

PrismaClientValidationError

Invalid value for argument gte:
Provided Date object is invalid.
Expected Date.

where: {
OR: [
{
jidOptions: {
contains: "104234762670201@lid"
}
}
],
updatedAt: {
gte: new Date("Invalid Date")
}
}

Additional Notes

I can provide Docker Compose configuration, Evolution API configuration and additional logs if needed.

I am available to test patches or beta fixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions