tryphotino / photino.Blazor

https://tryphotino.io
Apache License 2.0
332 stars 62 forks source link

File "app://app/" could not be found. #12

Closed hbxtlhx closed 3 years ago

hbxtlhx commented 3 years ago

on debian or macos: Photino.Blazor(1.1.1) File "app://app/" could not be found.

ChristianWeyer commented 3 years ago

Yep. Having the same here on macOS with latest 1.1.1.

porteregr commented 3 years ago

Seeing this on Debian as well. Running on a Raspberry PI with a custom built arm version of Photino.Native.

ChristianWeyer commented 3 years ago

Is there already any kind of idea when you will be able to look at it @philippjbauer ? If you need more testing or further input, just let me know :-)

sharpninja commented 3 years ago

I know what the issue is, I get it on Kubuntu 20.10 with both .Net 5.0.2 and the current .Net 6.0 Preview. The Task at

      Task.Factory.StartNew<Task>((Func<Task>) (async () =>
      {
        try
        {
          await ComponentsDesktop.RunAsync<TStartup>(new IPC(ComponentsDesktop.photinoWindow), appLifetimeCts.Token);
        }
        catch (Exception ex)
        {
          ComponentsDesktop.UnhandledException(ex);
          throw;
        }
      }));

is queued up but never executed by the dispatcher, so it then falls into

      try
      {
        ComponentsDesktop.photinoWindow.Load(ComponentsDesktop.BlazorAppScheme + "://app/");
        ComponentsDesktop.photinoWindow.WaitForClose();
      }
      finally
      {
        appLifetimeCts.Cancel();
      }

which generates the error.

If private static async Task RunAsync<TStartup>(IPC ipc, CancellationToken appLifetime) was made public then the Blazor app could be fired up independently.

philippjbauer commented 3 years ago

The issue was fixed in photino.NET PR #30: https://github.com/tryphotino/photino.NET/pull/30

Another issue came up afterwards in the Native project: https://github.com/tryphotino/photino.Native/issues/60

JinShil commented 3 years ago

This issue still exists. For some reason the changes in https://github.com/tryphotino/photino.NET/pull/30 do not appear in the latest source code.