Problems with updating Elasticsearch

I have…

  • Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
  • Used code blocks with ``` to format my code examples like JSON or logs properly.

I’m submitting a…

  • Regression (a behavior that stopped working in a new release)
  • Bug report
  • Performance issue
  • Documentation issue or request

Current behavior

Ends in errore and remains “pending”

Expected behavior

Upsert to Elasticsearch

Minimal reproduction of the problem

We are having problems updating elasticsearch from squidex.
The initial rule searches for the document and deletes it before trying to upsert the new document, if the document isn’t found it if throws and error:
"2025-06-24T07:13:20Z: Failed with error
Request failed to execute. Call: Status code 404 from: DELETE /sardegna-statistiche-dev-index/_doc/01020714-4227-4a60-9f75-e68a56c3ca62"
If the document is starting from a new I end up with this error:
“Serialization and deserialization of ‘System.IntPtr’ instances is not supported. Path: $.ApiCall.ConnectionConfiguration.BootstrapLock.AvailableWaitHandle.Handle.”
have you come across this error?
we had previously passed from 7.6.1 → 7.15 then onwards after testing to 7.20

the version of elasticsearch is: 8.13.4

I tried via a curl to see if there is a problem with elasticsearch and had no problems

Environment

App Name:

  • Self hosted with docker
  • Self hosted with IIS
  • Self hosted with other version
  • Cloud version

Version: 7.20

Browser:

  • Chrome (desktop)
  • Chrome (Android)
  • Chrome (iOS)
  • Firefox
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Others:

Are you talking about rules and elastic search?

Yep.

we did a rollback to version 7.15 and I have to change some of the rules.

I noticed in the never versions i had to add ifs and elses as the parser would go into tilt in 7.15

if(componenti.contenutoPadre.iv[0] !== undefined){
 getReference(componenti.contenutoPadre.iv[0], function (padreRef) {
   <!-- do stuff -->
}
}
else{
  complete(JSON.stringify(jsonObject));
}

I need a reproducible sample. I am a little bit lost at the moment.