#1 2024-10-31 22:26:10

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

error in the server's logs

I am getting the following exception in the logs

31/10/2024 10:57:40.832    Exception    8        ESqlDBPostgres {Message:"TSqlDBPostgresLib Exec failed: 22021 [ERROR:  invalid byte sequence for encoding \"UTF8\": 0xa2\nCONTEXT:  unnamed portal parameter $14\n]",Statement:null} [R1:testdv1testdv0] at 8ccdc6 ../../../../../DG/mORMot2/src/db/mormot.db.raw.postgres.pas  (437) ../../../../../DG/mORMot2/src/db/mormot.db.sql.postgres.pas  (1015)

Offline

#2 2024-11-01 17:37:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: error in the server's logs

It means that something you sent is not UTF-8.

Check your strings content.

Offline

#3 2024-11-03 05:27:56

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Re: error in the server's logs

Thank you @ab.
Is it possible to check if a string is utf8 or has invalid characters?

Offline

#4 2024-11-03 07:59:09

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: error in the server's logs

You have IsValidUtf8() from the mormot.core.unicode.pas unit.

Offline

#5 2024-11-12 20:49:03

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Re: error in the server's logs

An other error I usually find:
Exception: 20241112 17391118  # EXC   ENetSock {LastError:"nrClosed",Message:"THttpClientSocket.SockRecv(283) read=0 [Closed - #5]"} [Main] at b2bf7e mormot.net.sock.pas TCrtSocket.SockRecv (5862)   mormot.net.client.pas THttpClientSocket.RequestInternal (2408) fastmm5.pas FastMM_GetMem_GetSmallBlock (7186) System.pas @GetMem (4969) System.pas @NewAnsiString (26157) System.pas @LStrSetLength (30045) mormot.net.client.pas THttpClientSocket.Request (2516) mormot.rest.client.pas TRestClientUri.IsOpen (2155) mormot.rest.client.pas TRestClientUri.IsOpen (2227) mormot.rest.http.client.pas TRestHttpClientSocket.InternalRequest (780) mormot.rest.http.client.pas TRestHttpClientGeneric.InternalUri (580) mormot.rest.http.client.pas TRestHttpClientGeneric.InternalUri (582) rest.wsclient.pas TPCHRclient.setJWTheader (278) rest.wsclient.pas TPCHRclient.setJWTheader (279) rest.wsclient.pas TPCHRclient.setJWTheader (280) mormot.rest.client.pas TRestClientUri.OnBackgroundProcess (1980) mormot.rest.client.pas CallInternalUri (2524) mormot.rest.client.pas TRestClientUri.Uri (2556) System.pas TMonitor.TryEnter (20364) System.pas TMonitor.TryEnter (20364) System.Generics.Collections.pas TListHelper.InternalDeleteRange4 (3873) System.Generics.Collections.pas TListHelper.InternalDeleteRange4 (3879) fastmm5.pas FastMM_GetMem_GetSmallBlock (7186) System.pas @GetMem (4969) System.pas @NewAnsiString (26157) mormot.soa.client.pas DoClientCall (643) mormot.soa.client.pas TServiceFactoryClient.InternalInvoke (688) mormot.soa.client.pas TServiceFactoryClient.Invoke (583) mormot.core.interfaces.pas TInterfacedObjectFake.FakeCallGetJsonFromStack (3448) mormot.core.interfaces.pas TInterfacedObjectFake.FakeCallInternalProcess (3544) mormot.core.interfaces.pas TInterfacedObjectFakeRaw.FakeCall (3307)

Is this expected due to network conditions?

Offline

#6 2024-11-12 20:52:38

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Re: error in the server's logs

The following can exist also:
Exception: 20241108 20071551  ! EXC   EInterfaceFactory {Message:"TInterfacedObjectFakeClient.FakeCall(ImwbService.GetDBormvers) failed: 'Invalid returned JSON content: expects {result:...}, got "} [Main] at 45df37 mormot.core.text.pas ESynException.RaiseUtf8 (9507)   fresultcomp.pas Tresultcomp.FormCreate (150) Vcl.Forms.pas TCustomForm.DoCreate (5516) Vcl.Forms.pas TCustomForm.AfterConstruction (5384) System.pas @AfterConstruction (19735) Vcl.Forms.pas TCustomForm.Create (5373) feditdoc.pas Teditdocument.b_protoClick (713) Vcl.Controls.pas TControl.Click (8037) AdvGlowButton.pas TAdvCustomGlowButton.Click (3798) Vcl.Controls.pas TControl.WMLButtonUp (8177) AdvGlowButton.pas TAdvCustomGlowButton.WMLButtonUp (4342) Vcl.Controls.pas TControl.WndProc (7921) Vcl.Controls.pas TWinControl.IsControlMouseMsg (10886) Vcl.Controls.pas TWinControl.WndProc (11156) Vcl.Controls.pas TWinControl.MainWndProc (10823) System.Classes.pas StdWndProc (19092) Vcl.AppEvnts.pas TMultiCaster.GetAppEvents (687) Vcl.Forms.pas TApplication.ProcessMessage (13376) Vcl.Forms.pas TApplication.HandleMessage (13406) Vcl.Forms.pas TApplication.Run (13545)

GetDBormvers is declared as:
function GetDBormvers:rawjson;

Offline

#7 2024-11-13 07:05:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: error in the server's logs

Ensure you use the latest framework version.

Offline

#8 2024-11-13 07:15:54

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Re: error in the server's logs

I am using last version from GitHub,

Offline

Board footer

Powered by FluxBB