Error System.InvalidOperationException: AutomationId may only be set one time.

  • Xamarin.Forms
    Element.set_AutomationId (System.String value)
  • Syncfusion.SfPdfViewer.XForms
    BottomHomeToolbar.PdfViewer_DocumentLoaded (System.Object sender, System.EventArgs args)
  • Syncfusion.SfPdfViewer.XForms
    SfPdfViewer.OnDocumentLoaded (System.Object sender, System.EventArgs e)
  • Syncfusion.SfPdfViewer.XForms.Droid
    ScrollViewEx.LoadDocument (System.IO.Stream inputStream)
  • Syncfusion.SfPdfViewer.XForms.Droid
    SfPdfDocumentViewRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e)
  • (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
  • Xamarin.Forms
    BindableObject.OnPropertyChanged (System.String propertyName)
  • Xamarin.Forms
    Element.OnPropertyChanged (System.String propertyName)
  • Xamarin.Forms
    BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent)
  • Xamarin.Forms
    BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes)
  • Xamarin.Forms
    BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess)
  • Xamarin.Forms
    BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value)
  • Syncfusion.SfPdfViewer.XForms
    DocumentViewHelper.set_InputFileStream (System.IO.Stream value)
  • Syncfusion.SfPdfViewer.XForms
    SfPdfViewer.OnPdfViewerPropertyChanged (System.String propertyName)
  • Syncfusion.SfPdfViewer.XForms
    SfPdfViewer.OnInputFileStreamChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue)

5 Replies

AV Ashokkumar Viswanathan Syncfusion Team May 6, 2020 12:47 PM UTC

Hi Sergiu, 
 
We were unable to reproduce the issue, “Application crashes with System.InvalidOperationException while loading the PDF document” in Android Platform with the provided information. Please find the sample in the below link, which we have created to reproduce the issue. 
 
  
Kindly share the following details to analyze more on this issue and assist you with the better solution       
  1. Simple sample/ modify the above sample to reproduce the issue. 
  2. PDF document with which you have to reproduce the issue.
  3. Replication procedure/Video to reproduce the issue.
  4. Xamarin Forms version.
  5. SfPdfViewer version.
  6. Deployment device specification.
Regards, 
Ashok Kumar Viswanathan. 



ST Sergiu Tasnade May 9, 2020 05:42 AM UTC

Hello,

I was using an older version of Xamarin Forms. I updated to the version you are using in your demos and it appears that the errors are gone. 
Will let you know how this works.
Thanks





PN Preethi Nesakkan Gnanadurai Syncfusion Team May 11, 2020 11:18 AM UTC

Hi Sergiu, 
  
Thanks for the update. 
  
We looking forward to hear from you. 
  
Regards, 
Preethi 



MT Marco Troncone May 5, 2023 05:33 PM UTC

This is still an issue with 

Xamarin forms version 5.0.0.2578

Syncfusion  version 21.2.3



IP ImmanKumarP Palanikumar Syncfusion Team May 8, 2023 12:27 PM UTC

Hi Marco, the "System.InvalidOperationException: AutomationId may only be set one time." issue is related to Xamarin.Forms and already the same issue has been logged in the below forum.

https://github.com/xamarin/Xamarin.Forms/issues/6157

We already have feedback on your issue. You can track the status of a reported bug using the below feedback link,
[Android] System.InvalidOperationException: AutomationId may only be set one-time in Xamarin.Forms | Feedback Portal (syncfusion.com)


Loader.
Up arrow icon