Failed to convert '4' to type 'System.String'

Hello UiPath community.

I started today learning RPA on UiPath Academy, and I’ve started building the first automation.

The narrator in the tutorial has another version of StudioX, and when I try to do the same, I get an error when trying to save the workflow with Use Application/ Browser into it.

Check the screenshot:

I use Brave (100% identical to Google Chrome when it comes to extensions)
When I add the Use Application/Browser it adds a 4 in the name. It seems like is not working, even if I delete that 4.

The logs are saying this:
21.4.4+Branch.master.Sha.a8b5101efe02651274064093e9c7410fedff7696

Failed to convert ‘4’ to type ‘System.String’.

Save: RemoteException wrapping System.Xaml.XamlObjectReaderException: Failed to convert ‘4’ to type ‘System.String’. —> RemoteException wrapping System.ArgumentException: The value ‘4’ is not a valid value for the enum ‘NBrowserType’.
at System.ComponentModel.EnumConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.ConvertToValue[T](ITypeDescriptorContext context, TypeConverter converter, Object instance)
— End of inner exception stack trace —
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.ConvertToValue[T](ITypeDescriptorContext context, TypeConverter converter, Object instance)
at System.Xaml.XamlObjectReader.SerializerContext.ConvertTo[T](TypeConverter converter, Object value)
at System.Xaml.XamlObjectReader.SerializerContext.TryTypeConvertToString(TypeConverter converter, Object& value)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfoInternal(Object propertyValue, ValueSerializer propertyValueSerializer, TypeConverter propertyConverter, Boolean isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfo(Object propertyValue, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForReadWriteProperty(Object source, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfoInternal(Object propertyValue, ValueSerializer propertyValueSerializer, TypeConverter propertyConverter, Boolean isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfo(Object propertyValue, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForReadWriteProperty(Object source, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForSequenceItems(Object sourceOrValue, XamlMember property, XamlType xamlType, SerializerContext context, Boolean allowReadOnly)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForSequence(Object source, XamlMember property, SerializerContext context, Boolean isAttachable)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfoInternal(Object propertyValue, ValueSerializer propertyValueSerializer, TypeConverter propertyConverter, Boolean isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfo(Object propertyValue, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForReadWriteProperty(Object source, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfoInternal(Object propertyValue, ValueSerializer propertyValueSerializer, TypeConverter propertyConverter, Boolean isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfo(Object propertyValue, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForReadWriteProperty(Object source, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForSequenceItems(Object sourceOrValue, XamlMember property, XamlType xamlType, SerializerContext context, Boolean allowReadOnly)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForSequence(Object source, XamlMember property, SerializerContext context, Boolean isAttachable)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfoInternal(Object propertyValue, ValueSerializer propertyValueSerializer, TypeConverter propertyConverter, Boolean isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfo(Object propertyValue, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForReadWriteProperty(Object source, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfoInternal(Object propertyValue, ValueSerializer propertyValueSerializer, TypeConverter propertyConverter, Boolean isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfo(Object propertyValue, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForReadWriteProperty(Object source, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForSequenceItems(Object sourceOrValue, XamlMember property, XamlType xamlType, SerializerContext context, Boolean allowReadOnly)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForSequence(Object source, XamlMember property, SerializerContext context, Boolean isAttachable)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfoInternal(Object propertyValue, ValueSerializer propertyValueSerializer, TypeConverter propertyConverter, Boolean isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.GetPropertyValueInfo(Object propertyValue, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForReadWriteProperty(Object source, XamlMember xamlProperty, SerializerContext context)
at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForProperty(Object source, XamlMember property, SerializerContext context)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, ParameterInfo methodParameters, XamlType xamlType)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(Object value, SerializerContext context, TypeConverter converter)
at System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(Object value, SerializerContext context, TypeConverter instanceConverter, Boolean isRoot)
at System.Xaml.XamlObjectReader…ctor(Object instance, XamlSchemaContext schemaContext, XamlObjectReaderSettings settings)
at System.Xaml.XamlServices.Save(XamlWriter writer, Object instance)
at UiPath.Studio.Plugin.Workflow.Serializer.WorkflowXamlSerializer.SaveAsString(ActivityBuilder activityBuilder)
at UiPath.Studio.Plugin.Workflow.Validation.DesignerStateValidator.GetSaveValidationError(Boolean flushEdits)
at UiPath.Studio.Plugin.Workflow.Validation.DesignerStateValidator.ValidateForSave(Boolean flushEdits)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerWrapper.Save(String fileName)
at UiPath.Studio.Plugin.Workflow.Services.DesignerFileProjectEndpoint.<>c__DisplayClass7_0.b__0()
at UiPath.Studio.Shared.MVVM.Services.DispatcherExtensions.<>c__DisplayClass0_01.<InvokeAsync>b__0() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.CoreIpc.Server.<InvokeMethod>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.CoreIpc.Server.<HandleRequest>d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.CoreIpc.Server.<>c__DisplayClass4_2.<<-ctor>b__6>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.CoreIpc.IOHelpers.<WithResult>d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.CoreIpc.IOHelpers.<WithTimeout>d__191.MoveNext(), HResult -2146233088

P.S. The video tutorial is here: UiPath Academy (minute 4:50) (More precise: RPA Starter → Build Your First Automation → Automation with StudioX → The video on this page at 4:50)

Thanks for your implication for helping this newbie to become better with RPA.

Is there anyone who can help?

Hi @sayb
are u using any integer variable in the url or something else where the error is occuring?

Thank you for reaching out.

Here is the problem. It adds the ‘4’ into the name of the resource Use Browser

I tried:

  1. To rename → but it gives me the same error
  2. To open the browser differently → nothing changes

Hey @sayb - Brave is not a UiPath supported browser.
In order for the extension to work properly you need to use Chrome / Edge / Firefox.

What UIAutomation version are you using?
With 21.4.4 you get the following message

Which informs you that it will not work :slight_smile:

1 Like

Thank you, @Ion_Miron. They say all the extensions work the same as you would have them on Google Chrome.

I use the version 21.4.4.

Next time I will use Google Chrome.
Have a great day,
Sergiu

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.