#151 Re: mORMot 2 » TLS Error Problem » 2023-02-17 12:14:12

Ty i test it this weekend

#152 Re: mORMot 2 » TLS Error Problem » 2023-02-16 19:08:33

I testet it with a similar certificate on my Develop Computer and no Error ?!

#153 Re: mORMot 2 » TLS Error Problem » 2023-02-16 18:23:59

I made some further testing (Turned on AllowDeprecatedTls on Client / On Server i don't know how - pls help)

Starting Client on same Windows Server 2019
The WinHTTP Client runs without error.
The Socket Client with same error as before ESChannel: SEC_E_INVALID_TOKEN/ERROR_INVALID_PARAMETER. As i know Win2019 supports TLS 1,1.1,1.2 as Default.

There Error comes requesting Timestamp. In Server Log is no entry concerning the connection request. Something is wrong with tls settings in Socket Client for Windows.

#154 Re: mORMot 2 » TLS Error Problem » 2023-02-16 14:21:36

i dont think its a server problem. We have older server with older m2 Versoin running, but after updating the client to Versions newer than approx. mid 1/2023 we get the error.

#155 Re: mORMot 2 » TLS Error Problem » 2023-02-16 13:14:36

The Alghorithm is md5RSA

#156 Re: mORMot 2 » TLS Error Problem » 2023-02-16 12:55:52

The Client is Windows 10
The Server Windows 2019
The Client works with our https Website (Let's Encrypt) Certificate
algo - have to check
I'll try AllowDeprecatedTLS
ty

#157 mORMot 2 » TLS Error Problem » 2023-02-16 11:15:01

itSDS
Replies: 12

Hi Arnaud,

here i have 2 Log Entries one with Socket Client and one with WinHTTP Client
IgnoreSSLCertError is aktivated, also IgnoreTLSCertError.

https://postimg.cc/gallery/TKCBRS6

The Server uses a self signed certifikate only to encrypt (Internal Network)
The Client throws above Errors.

Very serious the WinHTTP Client throws error only on first connect. Subsequent Connects are successful

What can i do to connect ? Any Idea ?
Ty in advance

#158 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-08 19:19:32

Ok ty i have enhanced the SynCrossplatform Client to ask for instance and use Result as ClientID now.

#159 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-08 18:28:15

Hi Arnaud,

what should i do now.
I have to use SynCrossplatformclient on my App - Client Side (it is the only client i have atm). But i have to use it with sicClientDriven on Client and Server side. (or am i wrong ?)
You have enhanced m2 with a clientID. But i don't know how to enhance Syncrossplatformclient to use/get it.

atm im lost here ?!

#160 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-08 14:19:39

Now i checked the URL called from one of the m2 client and you add e.g. stammdaten/1?session_ .. as ClientID to the request where is this clientid generated ? i think it should be on the Server or ?

#161 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-08 14:05:38

Sry i have to add this, i read the Doku for sicShared / sicClientDriven again.
I need sicClientDriven on the Server Settings, my Server Implementation affords this. There are Client specific var i share between all "Client" requests. The Server Implmentation is needed for every client.

Do i have to provide the Client ID now in SynCrossplatformclient ? and how ?

#162 mORMot 2 » m2 FMX Android/iOS Client » 2023-02-08 12:44:11

itSDS
Replies: 2

i Port this ticket from the m1 Forum, because i'm interested to have App Support / m2 App Client for m2
Old Link: https://synopse.info/forum/viewtopic.php?id=6356

#163 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-08 12:35:36

The Problem is only with the Syncrossplatform Client. The normal m2 Client works.
I use sicClientDriven on both Sides.

I just changed sicClientDriven on Server Side to sicShared, and the Error is gone.
Are there any things i have to change on the Server now ?
Is this the right way - Change Mode on Server ?

#164 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-08 08:24:13

Here the deklaration part

  IDFLSYSConnector = interface(IInvokable)
    ['{DCBB296A-C209-4346-BD37-4496E32A50BE}']
    function GetStammdaten(const AAuthToken : RawUtf8; const AGeaendertNach : TDateTime = 0) : RStammdatenResult;
...

#165 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-08 08:14:31

Here is the Tree:

lsysconnector/
              dflsysconnector
                             /
                              get
                                 a
                                  usgabemengen/
                                               <clientid>
                                  rtikel/
                                         <clientid>
                                 stammdaten/
                                            <clientid>
                                 inventur/
                                          <clientid>
                                 belege/
                                        <clientid>
                              sende
                                   inventur/
                                            <clientid>
                                   artikel/
                                           <clientid>
                                   belege/
                                          <clientid>
                              druckeb
                                     arcode/
                                            <clientid>
                                     eleg/
                                          <clientid>
                              _
                               free_/
                                     <clientid>
                               instance_
                               contract_
                             .
                              get
                                 a
                                  usgabemengen/
                                               <clientid>
                                  rtikel/
                                         <clientid>
                                 stammdaten/
                                            <clientid>
                                 inventur/
                                          <clientid>
                                 belege/
                                        <clientid>
                              sende
                                   inventur/
                                            <clientid>
                                   artikel/
                                           <clientid>
                                   belege/
                                          <clientid>
                              _
                               free_/
                                     <clientid>
                               contract_
                               instance_
                              druckeb
                                     arcode/
                                            <clientid>
                                     eleg/
                                          <clientid>
              cacheflush
                        /
                         <fulluri>
              wrapper
                     /
                      <fulluri>
              batch

#166 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-07 18:15:19

You can see the fullurl in the bottom line of my Screenshot.
There is a slash at the end. That's the reason why Lookup fails. In Requested URL is no slash at the end but ?session...
In the former Version 4495 the String was accecpted.

I think it's a missing feature in new Lookup Method - what do you think ?

#167 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-07 16:13:19

Trying to add / at the Beginning does not work. On Server lsysconnector/timestamp -> //lsysconnector/timestamp if i add your code sample.

#168 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-07 15:53:40

Here is the matching RadixTree:

https://postimg.cc/zHr9fz6V

May be the Backslash at stammdaten/ ?!

#169 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-07 15:43:16

Hi Arnaud, i see TRestRouter.Lookup is new

There is the Problem, it does not find my Function (GetStammdaten) But Stammdaten is in the tree under Get (GetStammdaten, GetArtikel, ...) i have 4 Methods starting with get.

The Value of Call URL is : 'LSYSConnector/DFLSYSConnector.GetStammdaten?session_signature=000e153ce78f9d46a320304d'

#170 Re: mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-07 12:11:34

One more Info: We use the Syncrossplatform Client from m1 to access the SOA Functions

#171 mORMot 2 » Error 400 Invalid URI calling SOA Function » 2023-02-07 12:07:15

itSDS
Replies: 17

Hi Arnaud,

with yesterday tests i experience an Error 400 calling SOA Functions.

This Error comes not with Version 4496 but exists with Version 4665.
Sry the Repository Version between this 2 i don't have.

If you need more input I'll try to provide it.

#174 Re: mORMot 2 » Exception in 64Bit of Mormot 2 but not in 32Bit Version » 2023-02-01 18:13:15

Hi i testet now a lot and my last test was to comment out your 64Bit ASM Code - And now it works.

I have made 2 Logs now where you can see the Exception in 64Bit Version if you like i can send it to you.

#175 Re: mORMot 2 » Exception in 64Bit of Mormot 2 but not in 32Bit Version » 2023-02-01 11:29:02

Here the Stack trace:
https://postimg.cc/8Fz1qcN2
https://postimg.cc/30Tpj2HM

On the Client site i call:       

Database.ServiceDefine([IDomVerwaltung], sicClientDriven, cVerwaltungContract);


if you need more info pls ask

#176 mORMot 2 » Error parsing .static files » 2023-01-31 20:58:22

itSDS
Replies: 4

Hi Arnaud, you modified TMvcRunOnRestServer.InternalRunOnRestServer
and now my Methodname '.static/js/chunk-vendors.51b2b211.js'
does not work any more depending on:

  p := pointer(MethodName);
  if GetNextItemMultiple(p, '/?', rawMethodName) = '/' then
    GetNextItemMultiple(p, '/?', rawFormat);

Get error 404 - File not found. Mormot is not looking for "js/chunk-vendors.51b2b211.js" it looks for "js"

I have subfolder's in the .static folder !

in V2.0.4496 the Methodname works as expected with:

  Split(MethodName, '/', rawMethodName, rawFormat);

As Workaround i removed the new code an replaced it with the old one.

#177 Re: mORMot 2 » Exception in 64Bit of Mormot 2 but not in 32Bit Version » 2023-01-31 20:48:58

Hi sry for the delay - was on holydays

The Exception is in the mORMot High Level Code. I don't use the lock by Myself its in the Context of TRestServerUriContext.Authenticate
(How can i upload an Image ?)

#178 mORMot 2 » Exception in 64Bit of Mormot 2 but not in 32Bit Version » 2023-01-13 17:49:50

itSDS
Replies: 8

Hi Arnaud since a few Days we get an Exception c0000005 in the 64Bit Assembly code of

TRWLock.ReadOnlyLock
in line
@spin:  mov     rax, qword ptr [rcx + TRWLock.Flags]

the 32Bit code runs without exception.

if you need more input let me know.

#179 mORMot 1 » How To Ignore SEC_E_CERT_EXPIRED Exception » 2023-01-05 13:48:08

itSDS
Replies: 1

Hi Arnaud,

is there an Option in mormot2 to ignore the Error, that an Certificate is expired as in normal http client ?

#180 mORMot 1 » enum without 0 as first cause c0000005 » 2022-12-20 08:13:07

itSDS
Replies: 1

I use a enum in my soa objects
and was wondering why the client does not send the enum for Set Value 0 (This is default and optimized out from mORMot - i found out)
then i changed enum to start with 1

  TMyEnum = (
    vv1 = 1, // added = 1
    vv2,
    vv3
  );

This causes an Exception in mormot.core.rtti SetEnumType (line 3537)

This is not critical to me, i changed first value back to 0 - But just to think about.

#181 Re: mORMot 1 » Error C0000005 with new _JS_RttiCustom » 2022-12-06 08:35:59

Ty Arnaud

it works without Exception now !

The Property raising Exception was an Enumeration like this:

TMyClass = class(TSynPersitent)
protected
...
fState : TMyState;
...
published
property ServerState : TMyState read fState;
...

Nothing speciell state had Value 3
This was the last value before Exception in JS_RttiColumn p^.name

#182 mORMot 1 » Error C0000005 with new _JS_RttiCustom » 2022-12-05 18:07:27

itSDS
Replies: 3

Hi AB
today i updated my mORMot and now i get an C0000005 in _JS_Enumeration  line   Ctxt.W.AddU(Data^); (Data = $9) (Not a valid Adress)
This is called from _JS_RttiCustom.

I Replaced the _JS_RttiCustom with the former one and no Exception is raised and JSON produced as expected.

You patched it in Commit: 7d39c5ff4f4faac2a104112514ff290394a08ef7

#183 Re: mORMot 1 » Difference m1 to m2 with JSON Quotes » 2022-12-05 11:11:22

Hi Thomas,

i tried it with your demo, but there is a internal difference to the mvc model i use.
The TDocVariantData in your case has the JSON as String and in mvc its a TDocVariantData which is converted to JSON without quotes - It's not the same...

As conclusion theres a difference passing JSON String to MVC from m1 to m2.

#184 Re: mORMot 1 » Difference m1 to m2 with JSON Quotes » 2022-12-04 15:32:16

Ty Thomas, (i didn't recognize this option to write expression Helper before)

But my concern for this ticket is the difference between m1 and m2.
and if this difference is wanted or not.

#185 Re: mORMot 1 » Difference m1 to m2 with JSON Quotes » 2022-12-03 09:33:26

Hm - May be you didnt understand what i mean...
How is it possible to add the missing 2 &quot; to the m2 json ?
(i added ToJSON to my mustache line but same result)

@ab i do not understand what you mean with add /json to end of the page URI - What is "end of the page URI" ?

ty

this is generated in the html

    window.templates.vtSettings = '{myarray:[&quot;AB&quot;,&quot;CD&quot;,&quot;EF&quot;]}';

#186 mORMot 1 » Difference m1 to m2 with JSON Quotes » 2022-12-02 09:29:55

itSDS
Replies: 7

Lets start with the bottom - to explain the problem
on our mvc page we use mustache and Javascript - With m1 it works and with m2 not.

we have a mustache partial with this code:

<script>
    window.templates = {};
    window.templates.vtSettings = '{{VTSettings}}';
</script>

VTSettings has this value : '{myarray:["AB","CD","EF"]}' and is a parameter of our MVC View

  IMyWebextensionsApplication = interface(IMVCApplication)
...
    procedure MyPage(var VTSettings : Variant);

later in our View we call Javascript to get the Array Elements from myarray:

  let VTSetting = replaceAll(window.templates.vtSettings, '{myarray:', '{"myarray":');   // <-- my Workaround :)
  let settings = JSON.parse(replaceAll(VTSetting, '&quot;', '"'));

at this place in m1 window.templates.vtSettings has the value

{&quot;myarray&quot;:[&quot;AB&quot;,&quot;CD&quot;,&quot;EF&quot;]}

and in m2

{myarray:[&quot;AB&quot;,&quot;CD&quot;,&quot;EF&quot;]}

JSON.Parse throws an Exception with the m2 Version. I have to add the quotes.

I debugged to find the reason in m2 and think there is a problem with mormot.core.variants.JsonToAnyVariant and the later ToJSON

#188 Re: mORMot 1 » Datetime should not be empty » 2022-11-29 20:02:12

@tbo

My Real Interface looks like this:

  TDObjArray = TArray<TDerivedObject >;

  IDomGverwaltung = interface(IInvokable) 
..
  function GetDerived(out ADerived : TDObjArray) : TresultRec;
..
  TInterfaceFactory.RegisterInterfaces([TypeInfo(IDomGverwaltung)]);

#189 Re: mORMot 1 » Datetime should not be empty » 2022-11-29 19:58:24

example for the TObject i use as parameter:

TBaseObject = class(TObject)
private
  fAnlagedatum : TDateTime;
..
published
  property Anlagedatum : TDateTime read fAnlagedatum;
end;

TDerivedObject = class(TBaseClass)
protected
  fAusgabedatum : TDateTime;
private
  procedure SetAusgabedatum(const AAusgabedatum : TDateTime);
published
  property Ausgabedatum : TDateTime read fAusgabedatum write SetAusgabedatum;

#190 Re: mORMot 1 » Datetime should not be empty » 2022-11-29 19:53:48

There is 1 difference: property ausgabedatum has a setter defined (setausgabedatum) then _JL_DateTime is not called but Ctxt.ParsePropComplex because Prop^.OffsetSet = -1 and ParsePropComplex calls my Patched TRttiProp.SetValue which tries to set my Ausgabedatum to "" -> resulting in an error.

and here is the json:

...
Vertrag:null,Standrohr:{ServerState:4,Anlagedatum:"2022-11-26T09:15:25",LetzteAenderung:"2022-11-26T09:15:25",GeloeschtAm:"",GeraetID:1916,Mandant:null,Geraetetyp:null,Kontrolle:null,Vertrag:null,Standrohr:null,Status:0,Lagerort:"",Seriennummer:"",Baujahr:0,Hersteller:"",Beschreibung:"",Identifikation:"",Notiz:"",Groesse:"",Bauform:"",Eichjahr:0,NextEichjahr:0,Zaehlerstand:0,Ausgabedatum:""},Status
...

#191 Re: mORMot 1 » Datetime should not be empty » 2022-11-29 16:51:22

I debugged the lines and the input Value is "" (Empty String) for the DateTime Property.
What i'm wondering about is that the parser calls different property parser for my DateTime property.
In case of my "ausgabedatum" Property it calls procedure TJsonParserContext.ParsePropComplex(Data: pointer);
And for one of my other DateTime Property "GeloeschtAm" it calls procedure _JL_DateTime(Data: PDateTime; var Ctxt: TJsonParserContext); the Value is in both Cases = ""

The Error displayed is:

EInterfaceFactory mit Meldung 'IDomV.GetG failed parsing AArray: TArray<DomVTypes.TGObject> from input JSON'. Prozess xyz.exe (1312) (Generated in mormot.core.interfaces line 2665)

#193 mORMot 1 » Datetime should not be empty » 2022-11-29 11:35:08

itSDS
Replies: 9

I Receive TObjects from my Server via SOA Interface.
The Object contains TDateTime Fields.
One of these date fields is null (0)

On the Client site these Objects are Create by RTTI calls in mORMot2.
I got an error if DateField = 0

As Patch i modified mormot.core.rtti.pas Line 3884f:

      f := _Iso8601ToDateTime(u);
//      if f = 0 then   // itSDS Datetime kann leer sein wenn es "Null" auf dem Server ist.
//        exit;
      SetFloatProp(Instance, f);
    end

Can you add this to the Repo - if my Patch is right ?

#194 mORMot 1 » Removing jpoNullDontReleaseObjectInstance from Interfacefactory » 2022-11-29 11:29:57

itSDS
Replies: 2

Hi AB to Remove jpoNullDontReleaseObjectInstance from my Interfacefactory i had to patch mormot.core.interfaces.pas
Is there another way ?

My Problem is that the autocreateted Objects in my Client also contain "empty" SubObjects although the received JSON contains "subobject:null"

#195 Re: mORMot 1 » Delphi FMX Android client? » 2022-10-05 08:59:15

Yes you need to have 11.x for ShortString Support

I never used CE Version but i think if you request a new one an remove old licence from you system it could work - or do they provide only 10.4 ?

#196 Re: mORMot 1 » Delphi FMX Android client? » 2022-10-03 22:20:59

ab wrote:

IIRC the shortstring type is not supported any more on iOS/Android.

And we use it in a lot of places.

I made a simple test for android an debugged it:

var
  LShortString : string[10];
begin
  LShortString := '123456';
  if Length(LShortString) = ord(LShortString[0]) then
    LShortString := 'correct';

This works on Android and Debugger shows array with dimension 11 where first byte is length. In this case the last 4 byte are randomly filled.
So it could work on android with 11.2

#197 Re: mORMot 1 » Delphi FMX Android client? » 2022-10-03 15:53:35

I'm also intersted in getting m2 Running under IOS/ANDROID. Tried to compile but there are many problems with the define in mormot.define.inc.

1. a extra section for iOS/ANDROID is needed.
2. All ASM Stuff does not compile under IOS/ANDROID So an Option NOASM or PUREPASCAL as in Delphi is needed.

I would like to help, should/can i make a branch in Repo ?

(If it works the SynCrossplatform Wrappers are not needed any more) (https://synopse.info/forum/viewtopic.php?id=5835)

I have the latest RS 11.2 from Embacadero installed and also a beta tester.

#198 Re: mORMot 1 » mORMot2 Wrapper generation broken » 2022-08-27 07:06:20

Hi Arnaud, as you now completely switched to mORMot2 is there any chance that this bug will be fixed ?
This is the only reason for me to switch to mORMot1 sometimes.

tyvm

#199 Re: mORMot 1 » Logging 1 Line sllError takes 15 Seconds » 2022-03-17 09:47:50

ab wrote:

Perhaps the problem is that the .map file is recreated each time.

Is the .map file generated by Delphi for your project?
Is the .mab file properly generated by TDebugFile ?

Could you check if it is not TDebugFile.Create which is called by TDebugFile.Log on line 5670 of mormot.core.log which makes the delay.

Edit: Please try https://github.com/synopse/mORMot2/commit/99c7db03

Hi Arnaud, i only have the EXE on the Test Machine, no map / mab file.
After starting the App i can not find a mab/map file in the folder.

#200 Re: mORMot 1 » Logging 1 Line sllError takes 15 Seconds » 2022-03-17 09:19:22

Hi Arnaud,

i testet the latest commit.
Now OnlyApi is as fast as expected
OnlyManual does take the same time as before.

Board footer

Powered by FluxBB