Error in TMS FNC Push Notifications demo

In the TMS FNC Push Notifications demo (WebPushServer -Server) there is an access violation on line 349
http.IOHandler := ssl;
Because http.IOHandler is null.

Checking on line 332
if not Assigned(ssl) then
ssl is not null, so it does not enter the next block
begin
ssl := TIdSSLIOHandlerSocketOpenSSL.Create;
TIdSSLIOHandlerSocketOpenSSL(ssl).SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2];
end;

Consequently, http.Handler becomes null and causes access violation.

I'm using Delphi 13.1 with all updates.
Windows 11 with all updates.

To work without error, comment out line 332
// if not Assigned(ssl) then

Hi,

Thank you for reporting, we applied a fix for this and the next version will contain the necessary change.

I'm noticing more errors.

In the WebPushClient demo, when you click on the "Unsibiscribe for push notifications" button, CORS errors occur and consequently you are unable to notify the server to delete the UserID.

I don't know if I missed any part. But I noticed that they are using Indy and not Sparkle (maybe because someone can buy just this component and not be dependent on Sparkle). But they could include a demo using Sparkle, for Sparkle users.

And since you use Indy, you could include the option to resolve CORS errors in the demo.

More details in the attached image.

Hi,

We cannot reproduce this, and normally the Access-Control-Allow-Origin header should also be added automatically.

Can you provide step-by-step instructions on what you did exactly?
For example: you hosted the compiled demo instead of compiling it yourself, the server you used to host the files, ...

I'm using the demo that comes with the TMS PushNotifications component, without any changes. This is attached.

WebClient.zip (40.1 KB)

Server.zip (7.8 KB)

Compiling with Delphi 13.1 with all updates.
Windows 11 with all updates.
Updated Chrome browser.

Versions I'm using.

We applied further improvements to prevent this from happening. The next update will contain the changes.