You are not logged in.
Ty i test it this weekend
I testet it with a similar certificate on my Develop Computer and no Error ?!
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.
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.
The Alghorithm is md5RSA
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
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
Ok ty i have enhanced the SynCrossplatform Client to ask for instance and use Result as ClientID now.
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 ?!
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 ?
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 ?
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
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 ?
Here the deklaration part
IDFLSYSConnector = interface(IInvokable)
['{DCBB296A-C209-4346-BD37-4496E32A50BE}']
function GetStammdaten(const AAuthToken : RawUtf8; const AGeaendertNach : TDateTime = 0) : RStammdatenResult;
...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>
batchYou 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 ?
Trying to add / at the Beginning does not work. On Server lsysconnector/timestamp -> //lsysconnector/timestamp if i add your code sample.
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'
One more Info: We use the Syncrossplatform Client from m1 to access the SOA Functions
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.
Hi Arnaud, ty it works
yes works
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.
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
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.
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 ?)
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.
Hi Arnaud,
is there an Option in mormot2 to ignore the Error, that an Certificate is expired as in normal http client ?
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.
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
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
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.
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.
Hm - May be you didnt understand what i mean...
How is it possible to add the missing 2 " 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:["AB","CD","EF"]}';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, '"', '"'));at this place in m1 window.templates.vtSettings has the value
{"myarray":["AB","CD","EF"]}and in m2
{myarray:["AB","CD","EF"]}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
Thank - that's it ![]()
@tbo
My Real Interface looks like this:
TDObjArray = TArray<TDerivedObject >;
IDomGverwaltung = interface(IInvokable)
..
function GetDerived(out ADerived : TDObjArray) : TresultRec;
..
TInterfaceFactory.RegisterInterfaces([TypeInfo(IDomGverwaltung)]);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;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
...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)
Thank you that's i was looking for.
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);
endCan you add this to the Repo - if my Patch is right ?
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"
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 ?
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
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.
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
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.
Hi Arnaud,
i testet the latest commit.
Now OnlyApi is as fast as expected
OnlyManual does take the same time as before.