-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FireFox: Could not find 'appInsights.updateCfg' ('updateCfg' was undefined). #287
Comments
I'm having this issue quite consistently after upgrading to the latest version. Have double and triple-checked all the config. Using Chrome. Have subscribed and will keep working on issue (though it's not our highest priority right now since it's only marginally effecting developer experience). Will post back if I figure anything out. |
I'm also running into this issue using the Standalone wasm code. Also the same, it occurs after the authentication redirect from Microsoft. Error is happening for me using Microsoft Edge |
not sure if this is the actual cause, but it appears for WASM, the lib.module.js file is auto executed by Blazor due to its name. But then the .js file is manually loaded again. And if it doesn't happen fast enough, seems this error is encountered and why it's so random. BlazorApplicationInsights/src/BlazorApplicationInsights/Components/ApplicationInsightsInit.razor.cs Line 45 in 00dce8b
I'm going to clone the repository and remove that and see if it changes anything. |
OK, forked the code base and removed the redundant call to load the script but the error persists. not sure why... |
I have the same Issue with the next setup:
The issue is totally random, but usually happen in Chrome with the next error: blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] |
Hey folks, apologies for the delay in looking into this. This issue is related to the Application Insights snippet. I could reproduce this issue by running the tests until they fail. I'm starting to feel that this is a bug with Application Insights as it doesn't appear to be blocking while its loading. |
Just installed this for the first time and getting the same issue in Edge. What is the current work around while a more permanent solution is developed? |
For now, the manual approach should work as normal, https://github.com/IvanJosipovic/BlazorApplicationInsights?tab=readme-ov-file#install-on-blazor-webassembly-standalone-app---manual |
I tried the Blazor Webassemlby standalone app manual guide with nugget version 3.1.0 but I got an exception on Edge: Error: Could not resolve type with token 01000024 from typeref (expected class 'BlazorApplicationInsights.Models.Config' in assembly 'BlazorApplicationInsights, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null') |
I could be wrong but I think this screenshot explains the error: In case of wasm standalone, this issue happens because the script injected in index.html loads https://js.monitor.azure.com/scripts/b/ai.3.gbl.min.js. To reproduce this issue, stable steps are: open the chrome developer console, go to Network, check "Disable cache" (otherwise the browser will return this file from cache even when offline, and there will be a race condition) and "Offline" (to disable it loading). So when working offline, the BlazorApplicationInsights calls the appInsights.updateCfg which is not ready yet (depending on the browser cache performance. Which may even get expired, by the way, as opposed to the web worker's cache storage). The workaround that I did was saving the ai.3.gbl.min.js file to the blazor wwwroot folder, selecting Build Action = Content, and referencing it from the script in the index.html directly: This way, it works. On publish, it appears in the service worker assets: I haven't checked the Install on Blazor WebAssembly Standalone App - Manual section, though. |
Also experiencing this issue after upgrading on all browsers. Currently sticking to the previous version works. |
Hi,
Thanks for effort to nicely integrate Application Insights into Blazor!
I'm facing issue with SDK load (I think) randomly, is hard to reproduce it as it happens let's say 1/10 calls in FireFox. I cannot reproduce it under Chrome.
Any clue how to narrow it, what to check? I've read docs many times already to double check if everything is correctly set. My app is standalone WASM. AppInsights loader script is in 'head' with
ld: -1
option. Is it possible that FF doesn't wait for script load as described here ?The text was updated successfully, but these errors were encountered: