Declined
Last Updated: 04 Mar 2025 14:24 by ADMIN
Michal
Created on: 26 Feb 2025 06:32
Category: UI for Blazor
Type: Bug Report
0
'TelerikBlazor.initMediaQuery' ('TelerikBlazor' was undefined).

Hello,

 after uprading fron 7.1.0 to version 8.0.0

on IOS v 16.2, or any version before 17, telerik ui stopped working with this error after navigating between pages:

Microsoft.JSInterop.JSException: Could not find 'TelerikBlazor.initMediaQuery' ('TelerikBlazor' was undefined).

even, when mediaquery is not present at the 2 pages between navigating occurs.(login->landing page)

what iam tried on NEW clean device(so no caching troubles):
- changing order of scripts in app.razor
- adding defer
- addin autostart=false + DOM event
https://www.telerik.com/blazor-ui/documentation/getting-started/what-you-need#javascript-file


- any kind of browsers(on ios everything is webkit-safari)
- independent test on external emulator ip12 ios 16.2
https://appetize.io/app/standalone_lahzvlutkzrno7sqs36cqlj5wy?device=iphone12&osVersion=16.2

attached examples are for comparing of descriped attemps to get it work - both failed. But on v7.1.0, works ok - both.

Is there any breaking changes, which must be modified to get it working?
Thanks

Attached Files:
1 comment
ADMIN
Dimo
Posted on: 04 Mar 2025 14:24

Hello Michal,

One of the reasons to get a TelerikBlazor was undefined error is an old browser. The exact error that occurs in this case is Unexpected token '{'. Actually, I see the exact same JavaScript error occur with the latest Blazor framework JavaScript file blazor.web.js too. So, the problem is not just with the Telerik scripts.

Here are some things to note:

It is highly recommended to update iOS to the latest possible version. If your app must support older devices than iPhone XS (such as iPhone 8 or iPhone 7), then my suggestion is to stick to Telerik UI for Blazor 7.1 and .NET 8 until you drop support for these devices.

    Regards,
    Dimo
    Progress Telerik

    Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!