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

BUG: Oqtane.MAUI application will not run currently (Hybrid 5.0.3) #3753

Closed
thabaum opened this issue Feb 9, 2024 · 4 comments · Fixed by #3792
Closed

BUG: Oqtane.MAUI application will not run currently (Hybrid 5.0.3) #3753

thabaum opened this issue Feb 9, 2024 · 4 comments · Fixed by #3792

Comments

@thabaum
Copy link
Contributor

thabaum commented Feb 9, 2024

Issue

Oqtane.Maui App is not working in the current dev branch 5.0.3 once PR 3714

Current Behavior

Prior to this commit .NET Maui App worked and all commits after seem to produce a few different behaviors as described below:

DynamicComponent requires a non-null value for the parameter Type.
   at Microsoft.AspNetCore.Components.DynamicComponent.SetParametersAsync(ParameterView parameters)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)
NotifyUnhandledException @ blazor.webview.js:1

Additional Context

After reviewing the Main.razor code and this error it looks like maybe the Oqtane.UI.Routes Type maybe not set properly, I never seen the Maui app work after PR #3714 so it is hard to say. Since that error is not displayed relating to Hybrid not enabled in later commits it may not relate.

@thabaum thabaum changed the title BUG: Oqtane.MAUI project will not load on 5.0.3 dev branch. BUG: Oqtane.MAUI application will not run currently on 5.0.3 dev branch. Feb 9, 2024
@thabaum
Copy link
Contributor Author

thabaum commented Feb 10, 2024

Since updating the packages I have moved on to a new error in ModuleMessage.razor:

image

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Oqtane.Client
  StackTrace:
   at Oqtane.Modules.Controls.ModuleMessage.BuildRenderTree(RenderTreeBuilder __builder) in C:\Dev\Oqtane\commits\oqtane.framework\Oqtane.Client\Modules\Controls\ModuleMessage.razor:line 12

and this one I was able to step into:

image

It stops visual studio here to where you have to step through it, then I get the other error in F12 as shown:

image

Still an issue as of 2/12/24

Using Hosting Model with Hybrid enabled eliminates the first two errors.

image

and results in only the F12 error allowing Maui to start.

@thabaum
Copy link
Contributor Author

thabaum commented Feb 14, 2024

Partially Fixed in #3792

@thabaum thabaum closed this as completed Feb 14, 2024
@thabaum
Copy link
Contributor Author

thabaum commented Feb 14, 2024

This is indeed a new issue and is now a component render mode bug.

image

Cannot supply a component of type 'Oqtane.UI.RenderModeBoundary' because the current platform does not support the render mode 'Microsoft.AspNetCore.Components.Web.InteractiveServerRenderMode'.
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ResolveComponentForRenderMode(Type componentType, Nullable`1 parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
   at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType, IComponentRenderMode callerSpecifiedRenderMode, Nullable`1 parentComponentId)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, Int32 frameIndex, Int32 parentComponentId)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
NotifyUnhandledException @ blazor.webview.js:1

New issue so I will re-open this.

Connectivity issue is resolved.

This is a component issue with the Login control as it still happens in both Static Server Rendering and Interactive Server Rendering.

Forcing render modes on components manually dominoes as an issue to the next component.

I am not 100% sure but went down a hole and maybe I just needed some VS cache to clear, but things seem to work.

And it maybe limited to static SSR once I changed I got this error:

blazor.webview.js:1  Cannot supply a component of type 'Oqtane.Themes.Controls.ControlPanelInteractive' because the current platform does not support the render mode 'Microsoft.AspNetCore.Components.Web.InteractiveServerRenderMode'.
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ResolveComponentForRenderMode(Type componentType, Nullable`1 parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, Int32 frameIndex, Int32 parentComponentId)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

I get this error above after switching, the other one after tyring to connect and clicking on the login button.

A

@thabaum thabaum reopened this Feb 14, 2024
@thabaum thabaum changed the title BUG: Oqtane.MAUI application will not run currently on 5.0.3 dev branch. BUG: Oqtane.MAUI application will not run currently (Hybrid 5.0.3) Feb 14, 2024
@thabaum
Copy link
Contributor Author

thabaum commented Feb 14, 2024

I am going to close this issue as fixed in #3792

The new issue is mentioned above, and I will generate a new issue relating as it seems to be limited to when switching to static SSR and rendering of the UI controls in the menu.

@thabaum thabaum closed this as completed Feb 14, 2024
sbwalker added a commit that referenced this issue Feb 15, 2024
Oqtane.Maui - Updates To New Namespace For DynamicComponent Type Oqtane.UI.Head - Fixes #3753
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant