SfPdfViewerServer inside SfDialog: after close make POST to /undefined/Unload

Hello, 

I'm working on a Blazor Server project using:
SyncFusion.Blazor 18.2.0.54
SyncFusion.Blazor.PdfViewerServer.Windows 18.2.0.54

I have a PDF Viewer inside a modal Dialog, like this:

<SfDialog @ref="@dialog" Target="#pdftarget" Width="1280px" Visible="false" IsModal="true" Header="Visor de Documentos" ShowCloseIcon="true">
    <DialogEvents OnOpen="OnOpen" OnClose="OnClose"></DialogEvents>
    <DialogPositionData X="center" Y="top"></DialogPositionData>
    <SfPdfViewerServer @ref="@viewer" ToolbarSettings="@ToolbarSettings" Height="100%" />
</SfDialog>

@code{
    SfPdfViewerServer viewer;
    SfDialog dialog;

    public PdfViewerToolbarSettings ToolbarSettings = new PdfViewerToolbarSettings()
    {
        ToolbarItems = new List<ToolbarItem>()
          {
                ToolbarItem.PageNavigationTool,
                ToolbarItem.MagnificationTool,
                ToolbarItem.SearchOption,
                ToolbarItem.PrintOption,
                ToolbarItem.DownloadOption
            }
    };
    private async void onClickVerPdf()
    {
          await this.dialog.Show();
    }
    public async void OnOpen(Syncfusion.Blazor.Popups.BeforeOpenEventArgs args)
    {
        await viewer.Load(path, null); //path is a variable where I tell the viewer where is the pdf file
    }
    private async void OnClose(BeforeCloseEventArgs args)
    {
        await viewer.Unload();
    }

}

It's working fine....After the dialog appears, the pdf file is loaded correctly.
But when I close de Dialog, I get this message in the browser console:
POST https://localhost:44303/undefined/Unload 400
at https://localhost:44303/_content/Syncfusion.Blazor/scripts/pdfviewer-a1eb99.min.js
I attach a zip with the browser console error (text and image)

Inspecting the file pdfviewer-a1eb99.min.js I think the error is produced here:
try {
    if ("keepalive" in new Request("")) {
        var s = this.setUnloadRequestHeaders();
        fetch(window.sessionStorage.getItem("serviceURL") + "/" + o, {
            method: "POST",
            headers: s,
            body: JSON.stringify(n)
        })
    }
} catch (t) {
    this.unloadRequestHandler = new Qt(this.pdfViewer), this.unloadRequestHandler.send(n)
}


Is there someting I can do to fix this issue?


Thanks!!!

Attachment: Erorr_PdfViewer_after_Dialog_close_5dc797c2.zip

6 Replies 1 reply marked as answer

AA Akshaya Arivoli Syncfusion Team August 31, 2020 12:54 PM UTC

Hi Gonzalo, 

Thank you for contacting Syncfusion support. 

We are currently checking on the reported query with the provided details. We will update you with further details on September 2, 2020 

Regards,
Akshaya

 



AA Akshaya Arivoli Syncfusion Team September 2, 2020 01:18 PM UTC

Hi Gonzalo , 

We have confirmed that the reported issue is defect and logged the defect report for the same. The fix for the issue will be included in our upcoming weekly NuGet release on September 15, 2020 


Regards, 
Akshaya  



MS Mohan Selvaraj Syncfusion Team September 15, 2020 07:24 PM UTC

Hi Gonzalo ,   

Sorry for the inconvenience caused.  

The fix for the reported issue was not included in our latest weekly release. However it will be included in our upcoming Volume 3 2020 release and it will be on end of the September 2020. 


Regards,    
Mohan S 



AA Akshaya Arivoli Syncfusion Team October 1, 2020 04:11 PM UTC

Hi Gonzalo , 

We have included the fix for the reported issue in our 2020 Volume 3 Main Release v18.3.0.35. Please find the feedback link from below,   


 Essential Studio Volume 3, 2020 release (v18.3.0.35) is available for download under the following link.   

     
Client side package    
   
Blazor Client  
Blazor Sever 
Service side package    
ASP.NET Core :    
     
ASP.NET MVC:    
   
CDN links:   
   
   
Regards,   
Akshaya   
 


Marked as answer

GD Gonzalo Díaz October 5, 2020 02:34 PM UTC

Hello,

Great news! I'll check the new version.


Greetings!!!


AA Akshaya Arivoli Syncfusion Team October 6, 2020 08:25 AM UTC

Hi Gonzalo, 

Thank you for your update. We will wait to hear from you. 
  
Regards, 
Akshaya 


Loader.
Up arrow icon