Random report viewer version mismatch error.

1 Answer 111 Views
Binding Rendering Report Viewer - Angular
Neel
Top achievements
Rank 1
Neel asked on 14 Aug 2024, 09:21 AM
I am using Telerik reporting using .NET as backend APIs and Angular for front-end report viewer.

Now I have updated the version on both side, and its working fine generally. 
But randomly I am getting this error of version mismatch while I try to generate report.

'The version of the Report Viewer '16.0.22.225' does not match the version of the Reporting REST Service '17.2.23.1114'. Please make sure both are running same version'

I know that the error statement suggests that the backend and frontend library versions don't match and must be aligned.
But the config I have updated works the majority time and successfully generates reports. But this error comes randomly.
So I am confused about how it is getting an older version of Report Viewer (16.0.22.225) even though I have updated the viewer configuration (^20.23.1010).

I have updated both side's versions below :

Server Side :

OLD:
 <PackageReference Include="Telerik.Reporting" Version="16.0.22.225" />
 <PackageReference Include="Telerik.Reporting.Services.AspNetCore" Version="16.0.22.225" />
 <PackageReference Include="Telerik.Reporting.WebServiceDataSource" Version="16.0.22.225" />

NEW:
 <PackageReference Include="Telerik.Reporting" Version="17.2.23.1114" />
 <PackageReference Include="Telerik.Reporting.Services.AspNetCore" Version="17.2.23.1114" />
 <PackageReference Include="Telerik.Reporting.WebServiceDataSource" Version="17.2.23.1114" />


Client side :

OLD:
"@progress/telerik-angular-report-viewer": "^15.22.225"

NEW:
"@progress/telerik-angular-report-viewer": "^20.23.1010"

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 19 Aug 2024, 08:50 AM

Hello Neel,

Thank you for the provided information!

The error message suggests that an older version of the script file of the report viewer is loaded on the page. This usually happens because the browser caches the telerikReportViewer JS file and returns it instead of loading the new version of the file.

The solution should be to either clear the browser cache or hard-refresh(CTRL+F5) the page with the report viewer so that the browser is forced to load the new version of the file.

Note that for the version of the Telerik Reporting NuGet packages installed on the server project, it will be necessary to use v20.23.1114 of the @progress/telerik-angular-report-viewer package.

The versioning of the NPM package is a little different from the NuGet packages but you may use the last two numbers to determine the year and the version number.

I hope that the provided information will help.

Regards,
Dimitar
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Neel
Top achievements
Rank 1
commented on 20 Aug 2024, 05:55 AM

Ok, Thanks for the response.
As of now I am going to update config to use specific version (20.23.1114) and with no nearest patch version and see if its still loads the older one or not.  
But I have still one confusion, that even if I keep config '^20.23.1010' how its loading the older version '16.0.22.225' of report viewer.
Dimitar
Telerik team
commented on 22 Aug 2024, 12:00 PM

The older version of the teleirkReportViewer JS script is likely cached by the browser, and using v20.23.1010 of the npm package was not a problem because that version of the script file was not being loaded.

Hard-refreshing the page or clearing the browser cache should cause the browser to load the script with the currently installed version of the package.

Tags
Binding Rendering Report Viewer - Angular
Asked by
Neel
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or