Live preview still not working

The Live Preview feature is still after all these updates not working for me. When clicking the button in the Delphi IDE, the TMS Live Server starts, but I get this error:

command line       : "C:\Users\wweyers\Documents\tmssoftware\TMS WEB Core RSXE13\Bin\Win32\TMSLiveServer.exe" -projectfile:"C:\Work\Proj\MiesenUndPartner\VisumPoint\myAMI\PWA\myAMI.dproj" -unit:"FormMain" -noexecute
executable         : TMSLiveServer.exe
exec. date/time    : 2020-11-20 15:17
version            : 1.2.1.12
compiled with      : Delphi 10.4 Sydney
madExcept version  : 5.1.0
callstack crc      : $941cfbf0, $17a53128, $17a53128
exception number   : 3
exception class    : EDOMParseError
exception message  : Im Textinhalt wurde ein ungültiges Zeichen gefunden. Line: 326 <Excluded_Packages Name="$(BDSBIN)\.
thread $31a4:
0071721c +290 TMSLiveServer.exe Xml.XMLDoc                            TXMLDocument.LoadData
00716eb7 +0ab TMSLiveServer.exe Xml.XMLDoc                            TXMLDocument.SetActive
007176f5 +029 TMSLiveServer.exe Xml.XMLDoc                            TXMLDocument.LoadFromStream
007196f0 +048 TMSLiveServer.exe TMS.FPC.Utils                 310  +3 TTMSXML.Read
009c4f39 +0e9 TMSLiveServer.exe TMS.Web.Custom.ToolsAPI.Impl  449 +16 TTMSWebCompilerProjectImpl.Create
009c7cc3 +017 TMSLiveServer.exe TMS.Web.Custom.ToolsAPI.Impl 1215  +1 TTMSWebCustomToolsAPIFactory.NewProject
009df39e +09e TMSLiveServer.exe TMS.LS.Work                    87  +9 TTMSLSWork.Execute
009e6560 +0cc TMSLiveServer.exe TMS.LS.Form.Base              284  +3 TTMSLSBaseForm.InternalExecute
009e5e06 +07a TMSLiveServer.exe TMS.LS.Form.Base              157  +7 TTMSLSBaseForm.Execute
009f458f +01f TMSLiveServer.exe TMS.LS.Main                   163  +3 TfrmTMSLSMain.WMTMSExecute
005f2122 +2be TMSLiveServer.exe Vcl.Controls                          TControl.WndProc
005f7037 +68f TMSLiveServer.exe Vcl.Controls                          TWinControl.WndProc
006b5fc9 +6d1 TMSLiveServer.exe Vcl.Forms                             TCustomForm.WndProc
005f658c +02c TMSLiveServer.exe Vcl.Controls                          TWinControl.MainWndProc
004feac4 +014 TMSLiveServer.exe System.Classes                        StdWndProc
756d39fb +00b USER32.dll                                              DispatchMessageW
006bfdff +0f3 TMSLiveServer.exe Vcl.Forms                             TApplication.ProcessMessage
006bfe42 +00a TMSLiveServer.exe Vcl.Forms                             TApplication.HandleMessage
006c0175 +0c9 TMSLiveServer.exe Vcl.Forms                             TApplication.Run
00a03225 +069 TMSLiveServer.exe TMSLiveServerVcl               90 +10 initialization
75b3fa27 +017 KERNEL32.DLL                                            BaseThreadInitThunk

(English translation of error message: An invalid character was encountered in the text content)

When starting the TMS Live Server manually from the command line and hitting "Show Preview", I get this error:

command line       : "C:\Users\wweyers\Documents\tmssoftware\TMS WEB Core RSXE13\Bin\Win32\TMSLiveServer.exe" -projectfile:"C:\Work\Proj\MiesenUndPartner\VisumPoint\myAMI\PWA\myAMI.dproj" -unit:"FormMain" -noexecute
executable         : TMSLiveServer.exe
exec. date/time    : 2020-11-20 15:17
version            : 1.2.1.12
compiled with      : Delphi 10.4 Sydney
madExcept version  : 5.1.0
callstack crc      : $45fe5335, $c915aef2, $c915aef2
exception number   : 1
exception class    : EVariantTypeCastError
exception message  : Could not convert variant of type (Null) into type (OleStr).
thread $1d98:
00469ba7 +06f TMSLiveServer.exe System.Variants                       VarCastError
0046fdab +0db TMSLiveServer.exe System.Variants                       @VarToUStr
009c5ac9 +45d TMSLiveServer.exe TMS.Web.Custom.ToolsAPI.Impl  662 +58 TTMSWebCompilerProjectImpl.IteratePropertyGroups
009c4f62 +112 TMSLiveServer.exe TMS.Web.Custom.ToolsAPI.Impl  455 +22 TTMSWebCompilerProjectImpl.Create
009c7cc3 +017 TMSLiveServer.exe TMS.Web.Custom.ToolsAPI.Impl 1215  +1 TTMSWebCustomToolsAPIFactory.NewProject
009df39e +09e TMSLiveServer.exe TMS.LS.Work                    87  +9 TTMSLSWork.Execute
009e6560 +0cc TMSLiveServer.exe TMS.LS.Form.Base              284  +3 TTMSLSBaseForm.InternalExecute
009e5e06 +07a TMSLiveServer.exe TMS.LS.Form.Base              157  +7 TTMSLSBaseForm.Execute
009f43be +002 TMSLiveServer.exe TMS.LS.Main                    74  +0 TfrmTMSLSMain.btPreviewClick
005f267b +073 TMSLiveServer.exe Vcl.Controls                          TControl.Click
006153d2 +01e TMSLiveServer.exe Vcl.StdCtrls                          TCustomButton.Click
00616550 +00c TMSLiveServer.exe Vcl.StdCtrls                          TCustomButton.CNCommand
005f2122 +2be TMSLiveServer.exe Vcl.Controls                          TControl.WndProc
005f7037 +68f TMSLiveServer.exe Vcl.Controls                          TWinControl.WndProc
0061502c +06c TMSLiveServer.exe Vcl.StdCtrls                          TButtonControl.WndProc
005f1d5c +024 TMSLiveServer.exe Vcl.Controls                          TControl.Perform
005f7197 +023 TMSLiveServer.exe Vcl.Controls                          DoControlMsg
005f7d8f +00b TMSLiveServer.exe Vcl.Controls                          TWinControl.WMCommand
006b9631 +045 TMSLiveServer.exe Vcl.Forms                             TCustomForm.WMCommand
005f2122 +2be TMSLiveServer.exe Vcl.Controls                          TControl.WndProc
005f7037 +68f TMSLiveServer.exe Vcl.Controls                          TWinControl.WndProc
006b5fc9 +6d1 TMSLiveServer.exe Vcl.Forms                             TCustomForm.WndProc
004feac4 +014 TMSLiveServer.exe System.Classes                        StdWndProc
005f658c +02c TMSLiveServer.exe Vcl.Controls                          TWinControl.MainWndProc
004feac4 +014 TMSLiveServer.exe System.Classes                        StdWndProc
756d38ea +06a USER32.dll                                              SendMessageW
756d3746 +016 USER32.dll                                              CallWindowProcW
005f7142 +0e6 TMSLiveServer.exe Vcl.Controls                          TWinControl.DefaultHandler
005f2ac8 +010 TMSLiveServer.exe Vcl.Controls                          TControl.WMLButtonUp
005f2122 +2be TMSLiveServer.exe Vcl.Controls                          TControl.WndProc
005f7037 +68f TMSLiveServer.exe Vcl.Controls                          TWinControl.WndProc
0061502c +06c TMSLiveServer.exe Vcl.StdCtrls                          TButtonControl.WndProc
005f658c +02c TMSLiveServer.exe Vcl.Controls                          TWinControl.MainWndProc
004feac4 +014 TMSLiveServer.exe System.Classes                        StdWndProc
756d39fb +00b USER32.dll                                              DispatchMessageW
006bfdff +0f3 TMSLiveServer.exe Vcl.Forms                             TApplication.ProcessMessage
006bfe42 +00a TMSLiveServer.exe Vcl.Forms                             TApplication.HandleMessage
006c0175 +0c9 TMSLiveServer.exe Vcl.Forms                             TApplication.Run
00a03225 +069 TMSLiveServer.exe TMSLiveServerVcl               90 +10 initialization
75b3fa27 +017 KERNEL32.DLL                                            BaseThreadInitThunk

Will this feature ever work? It really looks very useful in the YouTube presentation of Holger Flick and I would really very much appreciate to see it working.

Regards, Walter

It would help if we could reproduce this.
Is this happening with any of our included demos?

I just took the time and tried with like 15 demos.

For those that only have one (!) Form, this is what happens:

  • When the demo project is initially loaded, I can click on the IDE “Live Preview” button (the one on the top, appearing just as a black dot like all other TMS related buttons are just black dots) as well as right-click the Unit in the Project pane and choose “Live Preview”. This seems to compile the application and show the form in the browser.
  • When closing the browser and clicking “Live Preview” again, nothing happens. Browser is NOT launched again.
  • When exiting/killing the respective “TMS Live Server” (in the TBNA), I again can use “Live Preview” once.

On demos with more than 1 Form, “Live Preview” also launches (once!), but with problems:

  • TMSWEB_Forminheritance: Form display is scrambled. JS error: TInheritedForm has no published method "btnSigninClick”
  • TMSWEB_Frames: UMain main window area is empty, not showing any controls. JS Error: TFrame1 has no published method "MoveRightClick"
  • TMSWEB_Multiform:Unit1 main window area is empty, not showing any controls.
  • TMSWEB_TemplateUI: All Forms give JS error: TMenuFrame has no published method "WebLabel1Click".

After finishing these tests, all "TMS Live Server" instances remain in memory, leaving behind some 20 icons in the TBNA, all to be closed manually. Aren't these supposed to close/die automatically?

When using my TMS Web project, consisting of around 10 forms and around 5 other units, all compiling and running fine, "Live Preview" always fails with the errors described previously. As a side note: Code insight/LSP fails in my TMS Web project in all Implementation sections for over 90% of all times. Sometimes it works for a couple of minutes, then after only a minimal code change, it fails again for the rest of the day. Maybe it has to do with the weather… Anyways, this effectively degrades the IDE to not much more than Notepad and makes code writing a real pain.

All our “regular” Delphi projects with 50+ Forms don't have any problems with Code Insight/LSP.

We could locate an issue with the live preview and updated the live server. We will release an update shortly with this updated live server.

With respect to code-insight, this is most likely caused by some code construct that isn't compatible with DCC32. Do you use any ASM blocks in your code? If this is at application level, to keep Code Insight happy, add such code in a block
{$IFNDEF WIN32}
ASM
....
END;
{$ENDIF)

Thank you Bruno. That did it!

Hi,

Delphi 11 update 1
TMS 1.9.8.3

On live preview I get the following screen ( on all apps demos and own )

Thanks for reporting. We applied a fix that will be in the next update.