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
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.
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, ...