Declined
Last Updated: 04 Aug 2023 05:52 by ADMIN
Kasim
Created on: 17 Oct 2022 12:52
Category: UI for Blazor
Type: Bug Report
2
Getting unknown exception while using Telerik Media Query with Safari browser

While using Safari browser, I am getting following exception message:

 

SyntaxError: Unexpected private name #a. Cannot parse class method with private name.
blazor.webassembly.js:1:35655crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not find 'TelerikBlazor.getLocationHost' ('TelerikBlazor' was undefined).
      https://mywebsite.com/_framework/blazor.webassembly.js:1:337
      forEach@[native code]
      findFunction@https://mywebsite.com/_framework/blazor.webassembly.js:1:303
      https://mywebsite.com/_framework/blazor.webassembly.js:1:3326
      Promise@[native code]
      beginInvokeJSFromDotNet@https://mywebsite.com/_framework/blazor.webassembly.js:1:3317
      St@https://mywebsite.com/_framework/blazor.webassembly.js:1:59961
      _mono_wasm_invoke_js_blazor@https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:195318
      wasm-stub@[wasm code]
      <?>.wasm-function[219]@[wasm code]
      <?>.wasm-function[167]@[wasm code]
      <?>.wasm-function[166]@[wasm code]
      <?>.wasm-function[2815]@[wasm code]
      <?>.wasm-function[1619]@[wasm code]
      <?>.wasm-function[1623]@[wasm code]
      <?>.wasm-function[118]@[wasm code]
      wasm-stub@[wasm code]
      118@[native code]
      https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:219007
      managed_BINDINGS_SetTaskSourceResult
      https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:154658
      promiseReactionJob@[native code]
Microsoft.JSInterop.JSException: Could not find 'TelerikBlazor.getLocationHost' ('TelerikBlazor' was undefined).
https://mywebsite.com/_framework/blazor.webassembly.js:1:337
forEach@[native code]
findFunction@https://mywebsite.com/_framework/blazor.webassembly.js:1:303
https://mywebsite.com/_framework/blazor.webassembly.js:1:3326
Promise@[native code]
beginInvokeJSFromDotNet@https://mywebsite.com/_framework/blazor.webassembly.js:1:3317
St@https://mywebsite.com/_framework/blazor.webassembly.js:1:59961
_mono_wasm_invoke_js_blazor@https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:195318
wasm-stub@[wasm code]
<?>.wasm-function[219]@[wasm code]
<?>.wasm-function[167]@[wasm code]
<?>.wasm-function[166]@[wasm code]
<?>.wasm-function[2815]@[wasm code]
<?>.wasm-function[1619]@[wasm code]
<?>.wasm-function[1623]@[wasm code]
<?>.wasm-function[118]@[wasm code]
wasm-stub@[wasm code]
118@[native code]
https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:219007
managed_BINDINGS_SetTaskSourceResult
https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:154658
promiseReactionJob@[native code]
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Telerik.Blazor.Components.Dialog.DialogBuilder.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )
5blazor.webassembly.js:1:35655crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not find 'TelerikBlazor.initMediaQuery' ('TelerikBlazor' was undefined).
      https://mywebsite.com/_framework/blazor.webassembly.js:1:337
      forEach@[native code]
      findFunction@https://mywebsite.com/_framework/blazor.webassembly.js:1:303
      https://mywebsite.com/_framework/blazor.webassembly.js:1:3326
      Promise@[native code]
      beginInvokeJSFromDotNet@https://mywebsite.com/_framework/blazor.webassembly.js:1:3317
      St@https://mywebsite.com/_framework/blazor.webassembly.js:1:59961
      _mono_wasm_invoke_js_blazor@https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:195318
      wasm-stub@[wasm code]
      <?>.wasm-function[219]@[wasm code]
      <?>.wasm-function[167]@[wasm code]
      <?>.wasm-function[166]@[wasm code]
      <?>.wasm-function[2815]@[wasm code]
      <?>.wasm-function[1619]@[wasm code]
      <?>.wasm-function[1623]@[wasm code]
      <?>.wasm-function[118]@[wasm code]
      wasm-stub@[wasm code]
      118@[native code]
      https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:219007
      managed_BINDINGS_SetTaskSourceResult
      https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:154658
      promiseReactionJob@[native code]
Microsoft.JSInterop.JSException: Could not find 'TelerikBlazor.initMediaQuery' ('TelerikBlazor' was undefined).
https://mywebsite.com/_framework/blazor.webassembly.js:1:337
forEach@[native code]
findFunction@https://mywebsite.com/_framework/blazor.webassembly.js:1:303
https://mywebsite.com/_framework/blazor.webassembly.js:1:3326
Promise@[native code]
beginInvokeJSFromDotNet@https://mywebsite.com/_framework/blazor.webassembly.js:1:3317
St@https://mywebsite.com/_framework/blazor.webassembly.js:1:59961
_mono_wasm_invoke_js_blazor@https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:195318
wasm-stub@[wasm code]
<?>.wasm-function[219]@[wasm code]
<?>.wasm-function[167]@[wasm code]
<?>.wasm-function[166]@[wasm code]
<?>.wasm-function[2815]@[wasm code]
<?>.wasm-function[1619]@[wasm code]
<?>.wasm-function[1623]@[wasm code]
<?>.wasm-function[118]@[wasm code]
wasm-stub@[wasm code]
118@[native code]
https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:219007
managed_BINDINGS_SetTaskSourceResult
https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:154658
promiseReactionJob@[native code]
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Telerik.Blazor.Components.TelerikMediaQuery.InitMediaQueryWidget()
   at Telerik.Blazor.Components.TelerikMediaQuery.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )
blazor.webassembly.js:1:35655crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not find 'TelerikBlazor.initDrawer' ('TelerikBlazor' was undefined).
      https://mywebsite.com/_framework/blazor.webassembly.js:1:337
      forEach@[native code]
      findFunction@https://mywebsite.com/_framework/blazor.webassembly.js:1:303
      https://mywebsite.com/_framework/blazor.webassembly.js:1:3326
      Promise@[native code]
      beginInvokeJSFromDotNet@https://mywebsite.com/_framework/blazor.webassembly.js:1:3317
      St@https://mywebsite.com/_framework/blazor.webassembly.js:1:59961
      _mono_wasm_invoke_js_blazor@https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:195318
      wasm-stub@[wasm code]
      <?>.wasm-function[219]@[wasm code]
      <?>.wasm-function[167]@[wasm code]
      <?>.wasm-function[166]@[wasm code]
      <?>.wasm-function[2815]@[wasm code]
      <?>.wasm-function[1619]@[wasm code]
      <?>.wasm-function[1623]@[wasm code]
      <?>.wasm-function[118]@[wasm code]
      wasm-stub@[wasm code]
      118@[native code]
      https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:219007
      managed_BINDINGS_SetTaskSourceResult
      https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:154658
      promiseReactionJob@[native code]
Microsoft.JSInterop.JSException: Could not find 'TelerikBlazor.initDrawer' ('TelerikBlazor' was undefined).
https://mywebsite.com/_framework/blazor.webassembly.js:1:337
forEach@[native code]
findFunction@https://mywebsite.com/_framework/blazor.webassembly.js:1:303
https://mywebsite.com/_framework/blazor.webassembly.js:1:3326
Promise@[native code]
beginInvokeJSFromDotNet@https://mywebsite.com/_framework/blazor.webassembly.js:1:3317
St@https://mywebsite.com/_framework/blazor.webassembly.js:1:59961
_mono_wasm_invoke_js_blazor@https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:195318
wasm-stub@[wasm code]
<?>.wasm-function[219]@[wasm code]
<?>.wasm-function[167]@[wasm code]
<?>.wasm-function[166]@[wasm code]
<?>.wasm-function[2815]@[wasm code]
<?>.wasm-function[1619]@[wasm code]
<?>.wasm-function[1623]@[wasm code]
<?>.wasm-function[118]@[wasm code]
wasm-stub@[wasm code]
118@[native code]
https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:219007
managed_BINDINGS_SetTaskSourceResult
https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:154658
promiseReactionJob@[native code]
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Telerik.Blazor.Components.TelerikDrawer`1.<InitDrawer>d__131[[eDubaiTaaruf2022.Shared.MenuItemModel, eDubaiTaaruf2022.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Telerik.Blazor.Components.TelerikDrawer`1.<OnAfterRenderAsync>d__121[[eDubaiTaaruf2022.Shared.MenuItemModel, eDubaiTaaruf2022.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )
6blazor.webassembly.js:1:35655crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not find 'TelerikBlazor.initMediaQuery' ('TelerikBlazor' was undefined).
      https://mywebsite.com/_framework/blazor.webassembly.js:1:337
      forEach@[native code]
      findFunction@https://mywebsite.com/_framework/blazor.webassembly.js:1:303
      https://mywebsite.com/_framework/blazor.webassembly.js:1:3326
      Promise@[native code]
      beginInvokeJSFromDotNet@https://mywebsite.com/_framework/blazor.webassembly.js:1:3317
      St@https://mywebsite.com/_framework/blazor.webassembly.js:1:59961
      _mono_wasm_invoke_js_blazor@https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:195318
      wasm-stub@[wasm code]
      <?>.wasm-function[219]@[wasm code]
      <?>.wasm-function[167]@[wasm code]
      <?>.wasm-function[166]@[wasm code]
      <?>.wasm-function[2815]@[wasm code]
      <?>.wasm-function[1619]@[wasm code]
      <?>.wasm-function[1623]@[wasm code]
      <?>.wasm-function[118]@[wasm code]
      wasm-stub@[wasm code]
      118@[native code]
      https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:219007
      managed_BINDINGS_SetTaskSourceResult
      https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:154658
      promiseReactionJob@[native code]
Microsoft.JSInterop.JSException: Could not find 'TelerikBlazor.initMediaQuery' ('TelerikBlazor' was undefined).
https://mywebsite.com/_framework/blazor.webassembly.js:1:337
forEach@[native code]
findFunction@https://mywebsite.com/_framework/blazor.webassembly.js:1:303
https://mywebsite.com/_framework/blazor.webassembly.js:1:3326
Promise@[native code]
beginInvokeJSFromDotNet@https://mywebsite.com/_framework/blazor.webassembly.js:1:3317
St@https://mywebsite.com/_framework/blazor.webassembly.js:1:59961
_mono_wasm_invoke_js_blazor@https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:195318
wasm-stub@[wasm code]
<?>.wasm-function[219]@[wasm code]
<?>.wasm-function[167]@[wasm code]
<?>.wasm-function[166]@[wasm code]
<?>.wasm-function[2815]@[wasm code]
<?>.wasm-function[1619]@[wasm code]
<?>.wasm-function[1623]@[wasm code]
<?>.wasm-function[118]@[wasm code]
wasm-stub@[wasm code]
118@[native code]
https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:219007
managed_BINDINGS_SetTaskSourceResult
https://mywebsite.com/_framework/dotnet.6.0.9.6fcfkep18v.js:1:154658
promiseReactionJob@[native code]
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Telerik.Blazor.Components.TelerikMediaQuery.InitMediaQueryWidget()
   at Telerik.Blazor.Components.TelerikMediaQuery.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )
7 comments
ADMIN
Dimo
Posted on: 04 Aug 2023 05:52

Hello everyone,

@Jack - the mot common reasons for "TelerikBlazor was undefined" are documented and I assume that your case is related to the possible race condition (defer / autostart), otherwise the error will appear consistently.

@Kasim - the original problem here seems this one, so I will close this public item.

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Jack
Posted on: 03 Aug 2023 13:32

This likely isn't a browser or OS specific issue. I am experiencing basically the same thing from time to time, in Windows 10 using Google Chrome browser.

If I create a sample application, it works for a while. Then I change something in the application and start it up and it crashes. In my case, I get:

Unhandled exception rendering component: Could not find 'TelerikBlazor.initMediaQuery' ('TelerikBlazor' was undefined).
at http://localhost:5130/_framework/blazor.server.js:1:497
at Array.forEach (<anonymous>)
...

The page indicates it failed and offers to reload. If I reload, then it works again.

So there is either some kind of race condition going on in Telerik's javascript code, or who knows. This needs to be looked into and corrected. It is not reproduceable every time. Static analysis of the javascript needs to be done and figure out why it would sometimes do this.

ADMIN
Svetoslav Dimitrov
Posted on: 07 Nov 2022 07:11

Hello Kasim,

I navigated the site with a MacBook Pro 2021 with the latest Safari and macOS version. I can report that I did not get any issues in the console. Can you send me a runnable reproduction so that we can further investigate? 

Regards,
Svetoslav Dimitrov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Attached Files:
Kasim
Posted on: 31 Oct 2022 07:32

Hi Svetoslav ,

 

Can you please try it on any Mac machine?

 

 

ADMIN
Svetoslav Dimitrov
Posted on: 31 Oct 2022 06:57

Hello Kasim,

I would like to ask for a runnable code snippet where we can reproduce the behavior. I navigated to this website on an iPhone 13 Pro Max and got no exception. You can see our Isolating a problem in a sample application blog post for some more information on creating reproduction snippets. 

Regards,
Svetoslav Dimitrov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Kasim
Posted on: 24 Oct 2022 09:33
Please check the site https://dubaitnc.com
ADMIN
Svetoslav Dimitrov
Posted on: 24 Oct 2022 08:34

Hello Kasim,

I have tested the MediaQuery in the latest Safari browser (with the sample snippet from the Overview documentation article, and the online demo) and I was not able to reproduce the error you reported to us. Based on that, I would like to ask for a runnable code snippet where we can reproduce the issue and investigate it. 

Regards,
Svetoslav Dimitrov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.