Amazon S3 Command Error - Upload File - Object reference not set to an instance of an object

Hi Team,

We upgraded to EM Server version: and EasyMorph Desktop version over the weekend. Ever since this, however, we have encountered an error whenever we try to upload a file through the 'Amazon S3 command' action using parameters.

The below Application Error is what occurs when the action is called:

Object reference not set to an instance of an object.
Exception type: System.NullReferenceException
Stack trace:
   at Morph.CSContracts.Actions.AmazonCommandAction.Clone()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Morph.CSContracts.Actions.ActionCollection.AddRange(IEnumerable`1 items)
   at Morph.CSContracts.Actions.ActionCollection.Clone(ModelObject parent)
   at Morph.CSContracts.Table.Clone()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Morph.CSContracts.ModelObjectCollection..ctor(Group group, IEnumerable`1 items)
   at Morph.CSContracts.ModelObjectCollection.Clone(Group tab)
   at Morph.CSContracts.Group.Clone()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Morph.CSContracts.GroupCollection..ctor(Module module, IEnumerable`1 groups)
   at Morph.CSContracts.GroupCollection.Clone(Module module)
   at Morph.CSContracts.Module.Clone()
   at #=zc2IFg$8sjEyJfa7QGQIPXHc=.#=zT3prJDw=(ParameterCollection #=z00pjlwc=)
   at Morph.Parameters.AdvancedParametersEditor.EvaluateAndRefresh()
   at Morph.Parameters.AdvancedParametersEditor.Apply()
   at #=z294Q7p54tC1FloBVvz1_ZrtxGepU.#=zBIBamYDYMhr_(Int32 #=zpwj$9PI=)
   at #=z294Q7p54tC1FloBVvz1_ZrtxGepU.#=zlSpWDcA=(Int32 #=zrkYrWRLpOaxl, Nullable`1 #=z$gT88WE=, Boolean #=zsst0Mi4=)
   at #=z294Q7p54tC1FloBVvz1_ZrtxGepU.#=z$76xUYTad7pl(Point #=z$gT88WE=, Boolean #=zEivibHoycAYa)
   at #=z294Q7p54tC1FloBVvz1_ZrtxGepU.OnMouseUp(MouseButtonEventArgs #=zyLx5x2I=)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

The Amazon S3 Command action has been set up like this:

Typically we would pass through the bucket, target folder and file's local path as parameters so we can iterate the file upload in a specific order. However, ever since upgrading to Server/Desktop v5.7 this has proved troublesome. We've had to revert our Desktop versions back to v5.4 and migrate our tasks that use the Amazon S3 Command over to the EasyMorph Launcher as a temporary workaround.

I noticed there are other Community tickets with an 'Object reference not set to an instance of an object' error albeit with different actions. The suggestion in some of those seemed to be that this was a bug that required fixing. Would that be the case here too?

Please let me know if there's any further information I can provide to aid with your investigation.


Hi David and welcome to the Community!

Thanks for reporting the problem. We're investigating it - someone from our team will get back to you shortly.

Hi Dmitry,

Thank you. Much appreciated!

Hi @DavidW

Does this issue occur exclusively with existing (pre-upgrade) workflows? For example, does the problem persist if you create a new workflow from scratch that includes the Amazon command?

Hi Oleksandr,

Thanks for getting in touch.

I tested it both on the existing v5.4 workflows and also with a freshly made workflow created today under desktop v5.7. Both cases produce the error unfortunately:

However, when I revert the desktop application version back to v5.4 and run the existing v5.4 workflow on it, there are no issues. The issues seem to occur whenever using Desktop/Server v5.7 to run a workflow with the Amazon S3 Command.

Hi @DavidW

The issue has been fixed, you can download the Version 5.7.3 build 4 fix from the EasyMorph Downloads page

Hi @olysak

Thanks - I'll test this now.

Can I just check - will this also fix it when tasks run via EasyMorph Server or would that require a separate fix?

Hi @olysak

Sorry - can I also check that the EasyMorph.Setup is correctly configured? When I try to run it I get an error message:

Notwithstanding the fact it mentions a permissions issue, which would normally suggest an internal IT issue, I still have the equivalent setup files for the earlier v5.7.3 build and also the historic v5.4.3 and they still initiate the Install Wizard without issue so it's curious why it wouldn't work for the latest version.

Yes, that should fix both Server and Desktop (you'll need to download the fresh Server installer too)

Sorry - can I also check that the EasyMorph.Setup is correctly configured? When I try to run it I get an error message:

Yes, the latest setup doesn't differ in any meaningful way from the previous ones. The permission or access issue you are encountering is likely due to either some process (including EasyMorph) locking the file that needs to be replaced during setup or interactions with your antivirus software.

Hi @olysak, @dgudkov,

Just to confirm the latest version of Server/Desktop no longer produces the application error. I really appreciate your assistance on this.

Thank you very much!