ErrorBoundry not throwing error

Hello Team

AS i am developing one MAUI Mobile App i have used Syncfusion Tools for UI and ErrorBoundry for handling errors.

with one of my page i have added sfDatePicker with Readonly="true" it's working fine with windows mode but when i switched to Android Emulator mode it is throwing error "Something went wrong" which is defined in index.html with "blazor-error-ui" 
ideally it should be handled by ErrorBoundry

My MainLayout.cs

<div class="fullpage">
    <main>
        <article class="content px-4">
            <ErrorBoundary @ref="errorBoundary">
                <ChildContent>
                    @Body
                </ChildContent>
                <ErrorContent>
                    <h2> Error Occured</h2>
                </ErrorContent>
            </ErrorBoundary>
            <BottomNavigation></BottomNavigation>
        </article>
    </main>
</div>

And My Index.Html looks like

<body>
<divclass="status-bar-safe-area"></div>
<divid="app">Loading...</div>
<divid="blazor-error-ui">
Something went wrong.
<arel='nofollow' href=""class="reload">Reload</a>
<aclass="dismiss">🗙</a>
</div>
<scriptsrc="_framework/blazor.webview.js"autostart="false"></script>
</body>

Thanks in advance


3 Replies

YS Yohapuja Selvakumaran Syncfusion Team February 14, 2024 04:41 PM UTC

Hi Rita,


Thank you for reporting the issue you encountered with the Maui Blazor App and the sfDatePicker component. We understand the importance of resolving this issue and ensuring that the error handling mechanism works as expected.


Based on your description, it seems that the error occurs only in the Android Emulator mode, while it works fine in the Windows mode. We have tested the reported issue but unfortunately we couldn’t be able to replicate the reported issue at our end . 




To further investigate and replicate the issue on our end, we kindly request the following information:

  1. Could you confirm if this issue occurs specifically on the real-time Android device or in the emulator as well?
  2. It would be greatly helpful if you could modify the shared sample to replicate the issue at our end. This will allow us to analyze the problem more effectively. 
  3. If possible, could you provide a video illustration demonstrating the issue? This will provide us with a clearer understanding of the problem and aid in our investigation.

Your cooperation in providing these details is invaluable, and it will assist us in diagnosing and addressing the problem effectively.



Regards,

Yohapuja S


Attachment: MauiApp1_datepicker_da51b28d.zip


RS Rita Senjaliya February 22, 2024 06:29 AM UTC

Hello Yohapuja

to reproduce same issue simply use , it will run in window mode successfully but with Android pixel 5 emulator it throws error which is not captured by error boundry

public DateTime? OperationDate { get; set; }

OperationDate=DateTime.Now();

Convert.ToDateTime(DateTime.ParseExact(OperationDate.Value.ToString(), @"dd/MM/yyyy HH:mm:ss", null).ToLocalTime());

Regards

Rita



YS Yohapuja Selvakumaran Syncfusion Team March 8, 2024 03:33 PM UTC

Hi Rita,


Thank you for reaching out to us. We have thoroughly investigated the reported issue with the provided code snippet in the MAUI Blazor App. Regrettably, we were unable to replicate any console errors, and the component rendered correctly. Kindly check out the attached sample and image for further reference.


Code Snippet:


<SfDatePicker TValue="DateTime?" Readonly="true" Value="@OperationDate"></SfDatePicker>

 

@code {

    public DateTime? OperationDate { getset; } = DateTime.Now;

 

    protected override void OnInitialized()

    {

        if (OperationDate != null)

        {

            OperationDate = DateTime.SpecifyKind(OperationDate.Value, DateTimeKind.Local);

        }

    }

}


Media


Can you please upgrade latest Syncfusion version to 24.2.9 and kindly check the same issue occurs. If still the issue persists, kndly share the below details with us



  1. If possible, could you provide a video illustration demonstrating the issue? This will provide us with a clearer understanding of the problem and aid in our investigation.
  2. Could you please provide a modified sample that replicates the reported issue at our end?
  3. Can you confirm the Syncfusion package version currently in use?


Your cooperation in providing these details will greatly assist us in resolving this matter promptly. We appreciate your patience and understanding.



Regards,

Yohapuja S


Attachment: MauiApp1_Datepicker_18a520e1.zip

Loader.
Up arrow icon