Skip to content
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

Fluent With Photino #132

Open
ortega-01 opened this issue Sep 10, 2024 · 1 comment
Open

Fluent With Photino #132

ortega-01 opened this issue Sep 10, 2024 · 1 comment
Labels
All OS bug Something isn't working

Comments

@ortega-01
Copy link

When trying to add fluent to photino blazor, I get this error whenever I refresh the page:

JS object instance with ID 1 does not exist (has it been disposed?).
Error: JS object instance with ID 1 does not exist (has it been disposed?).
at w (http://localhost/_framework/blazor.webview.js:1:5273)
at http://localhost/_framework/blazor.webview.js:1:3044
at new Promise ()
at g.beginInvokeJSFromDotNet (http://localhost/_framework/blazor.webview.js:1:3007)
at http://localhost/_framework/blazor.webview.js:1:48308
at EventTarget. (:1:202)
at EmbeddedBrowserWebView. (:1:43835)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
at Microsoft.FluentUI.AspNetCore.Components.FluentKeyCode.DisposeAsync() in C:\Users\Danny\source\repos\fluentui-blazor\src\Core\Components\KeyCode\FluentKeyCode.razor.cs:line 183
at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c__DisplayClass85_0.<g__HandleAsyncExceptions|1>d.MoveNext()

Here is my program.cs:

`internal class Program
{
[STAThread]
static void Main(string[] args)
{
var appBuilder = PhotinoBlazorAppBuilder.CreateDefault(args);

    appBuilder.Services
        .AddLogging();

    appBuilder.Services.AddFluentUIComponents();

    // register root component and selector
    appBuilder.RootComponents.Add<PhotinoApp>("app");

    var app = appBuilder.Build();

    // customize window
    app.MainWindow
        .SetIconFile("favicon.ico")
        .SetTitle("ECM Control Panel");

    AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
    {
        app.MainWindow.ShowMessage("Fatal exception", error.ExceptionObject.ToString());
    };

    app.Run();
}

}`

Possible Problem:
I'm unable to call:
// Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents();

@philippjbauer philippjbauer added bug Something isn't working All OS labels Oct 10, 2024
@jurica
Copy link

jurica commented Nov 12, 2024

Hi @ortega-01,
do you still have problems get Fluent UI to work in your Photino app?
I just figured it out and it works for me in my project.
You can find it here: https://github.com/jurica/Zuschnitt/tree/main/Zuschnitt.Blazor.Photino
Hope it helps...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All OS bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants