TooltipService gets exception

I recently added the TooltipService.
I then noticed that when i refresh my page, i get exception that you cannot see, as it refreshes too fast.

You can recreate this behaviour by creating blazor server app.
add in the hooks for radzen components...
init the services.AddScoped() and update Imports...
run your app...

without even using the tooltips, just refresh your index page, you will see exception.
i mean refresh on the browser, just click multiple times and you will see in bottom an exception is occuring.

however, even with this exception , the tooltip does work.
There is something that is exceptioning out inside the TooltipService when a page refresh occurs

take out the tooltipservice, no more exceptions.

Dear @cglick

What are the exceptions? Please give an example.

Likely similar? :

as stated...i can see an exception show up as little yellow bar on bottom of page, but the exception is cleared before i can capture it, even when i open the developer tools, you can see a flash of the exception and then it clears, go figure? i think it is related to the prerendering and as such it actually runs twice...

also i gave you the steps to reproduce, you can create the issue yourself by refreshing any page with the tooltipservice.injected

also , this error occurs just adding in the service, not even using it on a page with inject...

@cglick Just adding the service is not enough:

let me try again.

i have a working version of tooltips , which tells me that i have properly configured my new blazor server site. The issue is not about whether the tooltip works or not. It does work.

i know about all the steps...and stated in my first post that i had working tooltip.

1.Register in your application main layout.
2.Register TooltipService in your application Startup or Program
3.Inject TooltipService in your page.
4.Execute Open() method of the TooltipService

it's about that if you setup your site to use the radzen and run the site, there are no issues, i don't see any exeption when i refresh the page. or even on first issues.

but as soon as perform the first two steps there before third and fourth....

without turning on any tooltip yet, i can see a flash exeption that shows on the main page, each time i bottom of site with little yellow bar that flashes for a half log in console, i cannot locate any log of this

i will see if i can capture a screen shot of this, but it happens so fast and i don't know how to capture this type of exeption occuring inside your service.

go back in, comment out the addscopted...reload, and now no more exeptionthrown...
keep in mind it does not stop the site from running, but it is a visible error that is somehow related to the Tooltipservice just having it defined in the circuit.

when i defined a tooltip as your documentation is, even with this exception occuring, it still works.
i'm simply sharing this with you such that you might look for some type of exception being thrown.

i don't think it would be hard for you to duplicate.
but i cannot use this as I cannot have exceptions being thrown that i cannot control.

Thanks for your time investigating this.

notice exception that shows, but goes away so fast and never lets you have a moment to capture it.

dialog works...

here is with devv tools open...
i was able to capture it for a second, but it disappears i'm telling you..

now if i remove just the first two steps from my app..i no longer see this exception, does this make it any clearer?

I couldn't reproduce this problem in the attached application. It was created by running dotnet new blazorserver and adding a tooltip. Here is what I get.

Does this application work for you? (218.4 KB)

i will give this a try to see if this project works.


interesting, this project will not open properly as it does not see the .net version on my system. Which version are you testing? i have .net core 3.1.9?

I tested with .NET 5 RC2. Here is the same app for .net 3.1.9 (219.7 KB)


i also saw you are using 2.15.19 ...

i was still on 2.15.12...updating...and trying again...


i cannot open this project because it states it has imports it cannot reference.

i noticed mac osx file, are you using a mac?

Could this be an issue with vs 2019 on windows 10 versus mac?

There is no Mac specific code in Radzen.Blazor and I highly doubt the OS would cause such an exception. I will test on a Windows with .NET Core 3.1 tomorrow.

Meanwhile you can try creating a new Blazor project and adding the tooltip there to see if the error occurs in it.

you are getting an exception in your example? i realize it says some type of addin, so not sure if related, but there is an exception occuring

i copied your exact code and i see error.

i will create a brand new project today with all the latest and use your exact version.
see if i get the error.

This is a warning and not an exception. It is also not related to Blazor and as you see the blazor error dialog does not appear no matter how many times I refresh.

We would be able to tell more when we reproduce the exception.

just when all this is going on my companies internet is down, and so i cannot work on this till later, :frowning:

I've managed to reproduce the problem and published a new version of Radzen.Blazor - 2.15.20. You can give it a try.

Thank you for your support!

I will test.