Initializing Console Application Bundle Installation

Discussions related to custom development with Select.
Post Reply
timothymeyer16
Posts: 37
Joined: Mon Jun 14, 2021 9:47 am

Initializing Console Application Bundle Installation

Post by timothymeyer16 »

Objective:
We're attempting to automate bundle installations.

Error Information:

Primaray Error
Object reference not set to an instance of an object.

More Information

We connect a stream to the .bnd file, which is then locked by windows, so we believe the error is with IProgress or the Cancelation token. We're unsure of the values we should be assigning to Iprogress and the cancelation token. The SDK and forum only provide examples such as:


I Prompt and cancelation token are passed without and initialized values.
- https://devforum.softprocorp.com/viewto ... ress#p5347
- Task<IRendering> RenderAsync(IRenderingSnapshot snapshot, object context, IPrompt<PromptEventArgs> prompt, IProgress<ProgressEventArgs> progress, CancellationToken cancellationToken);


SDK
InstallAsync Method (bundleStream, progress, cancellationToken)

Namespaces ► SoftPro.Select.Client.Bundles ► IBundleManager ► InstallAsync(Stream, IProgress<(Of <<'(ProgressEventArgs>)>>), CancellationToken)

Task<IBundleInfo> InstallAsync(
Stream bundleStream,
IProgress<ProgressEventArgs> progress,
CancellationToken cancellationToken
)


But these do not work for us.



Environment:
- Sdk 4.3.60210.48 (4.3.15.1)
- Console application



Our Code:

Stream bundleStream = File.Open(bundlePath, FileMode.Open);

IProgress<ProgressEventArgs> progress = new Progress<ProgressEventArgs>();

CancellationTokenSource source = new CancellationTokenSource();
CancellationToken token = new CancellationToken(); // source.Token;

try
{
await BundleManager.InstallAsync(bundleStream, progress, token);
}
catch( Exception ex)
{
Console.WriteLine(ex);
}




Returned Error


System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.SelectServer.get_AuthenticatedUserID()
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at SoftPro.ClientModel.IO.BinaryTransfer.UploadTo(Stream source, Action`2 uploader, CancellationToken cancellationToken, Int32 chunkSize)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_0.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at SoftPro.ClientModel.Threading.TaskExtensions.<>c__DisplayClass7_0`1.<Finally>b__0(Task`1 t)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at ConsoleApplication1.Program.<InstallBundle>d__3.MoveNext() in C:\Users\timadmin\documents\visual studio 2015\Projects\BundleInstaller\BundleInstaller\Program.cs:line 126
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.SelectServer.get_AuthenticatedUserID()
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at SoftPro.ClientModel.IO.BinaryTransfer.UploadTo(Stream source, Action`2 uploader, CancellationToken cancellationToken, Int32 chunkSize)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_0.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.SelectServer.get_AuthenticatedUserID()
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #1) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.SelectServer.get_AuthenticatedUserID()
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #2) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.SelectServer.get_AuthenticatedUserID()
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #3) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---
<---
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Initializing Console Application Bundle Installation

Post by BobRichards »

I am passing this to our R&D team for response. Unfortunately I cannot give you a time estimate for an answer.

Also, there is no need to cross-post. As long as it is anywhere in "Integration Development" or child forums, I will see it. :)
Bob Richards, Senior Software Developer, SoftPro
timothymeyer16
Posts: 37
Joined: Mon Jun 14, 2021 9:47 am

Re: Initializing Console Application Bundle Installation

Post by timothymeyer16 »

Hi Bob, thank you!
(The cross post was just a user error).

I did have a quick update - the majority of the errors are eliminated by initializing the progress and token like so:

Updated Code
IBundleManager BundleManager = ss.GetService<IBundleManager>();

Stream bundleStream = File.Open(bundlePath, FileMode.Open);

IProgress<ProgressEventArgs> progress = new Progress<ProgressEventArgs>((args) =>
{
Console.WriteLine(args.Message);
Console.WriteLine(args.Value);
Console.WriteLine(args.Maximum);
});

CancellationTokenSource source = new CancellationTokenSource();
CancellationToken token = source.Token;

Additional Notes
I was able to uninstall Bundles using a similar method.


New Error:
System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.EndInstall(Guid cookie)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.EndInstall(Guid cookie)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_0.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at SoftPro.ClientModel.Threading.TaskExtensions.<>c__DisplayClass7_0`1.<Finally>b__0(Task`1 t)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at ConsoleApplication1.Program.<InstallBundle>d__3.MoveNext() in C:\Users\timadmin\documents\visual studio 2015\Projects\BundleInstaller\BundleInstaller\Program.cs:line 125
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.EndInstall(Guid cookie)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.EndInstall(Guid cookie)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_0.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()<---
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Initializing Console Application Bundle Installation

Post by BobRichards »

An R&D developer looked at the code and successfully installed bundles using the code below.

Code: Select all

ICredentials creds = new NetworkCredential("admin", "Passw0rd", "[SERVER]");
using (SelectServer ss = new SelectServer(new Uri(http://localhost:8080/dev), creds))
{
    Environment.SetEnvironmentVariable("SPS_DISABLECERTPIN", "1", EnvironmentVariableTarget.Process);
    ss.EnsureAuthenticated();

    Stream bundleStream = File.Open(@"C:\Bundles\MyBundle.bnd", FileMode.Open);

    IBundleManager bundleMgr = ss.GetService<IBundleManager>();
    IProgress<ProgressEventArgs> progress = new Progress<ProgressEventArgs>();

    CancellationTokenSource source = new CancellationTokenSource();
    CancellationToken token = new CancellationToken(); // source.Token;

    try
    {
        await bundleMgr.InstallAsync(bundleStream, progress, token);
        Console.WriteLine("Successful");
    }
    catch( Exception ex)
    {
        Console.WriteLine($"Exception: {ex.Message}");
    }
}
Check your code against this and let me know if you have any issues.
Bob Richards, Senior Software Developer, SoftPro
timothymeyer16
Posts: 37
Joined: Mon Jun 14, 2021 9:47 am

Re: Initializing Console Application Bundle Installation

Post by timothymeyer16 »

Working now, thank you for your help.
timothymeyer16
Posts: 37
Joined: Mon Jun 14, 2021 9:47 am

Re: Initializing Console Application Bundle Installation

Post by timothymeyer16 »

Good Morning,

The Following suddenly stopped working for us yesterday.

Environment.SetEnvironmentVariable("SPS_DISABLECERTPIN", "1", EnvironmentVariableTarget.Process);
ss.EnsureAuthenticated();

Console.WriteLine("Ensured Authentication: " + ss.HasAuthenticated.ToString());

Stream bundleStream = File.Open(@"C:\Users\tmeyer\Downloads\cwne\CWNE.bnd", FileMode.Open);

IBundleManager bundleMgr = ss.GetService<IBundleManager>();

IProgress<ProgressEventArgs> progress = new Progress<ProgressEventArgs>((ev) =>
{
Console.WriteLine(ev.Message + " " + ev.Value);
});

CancellationToken token = new CancellationToken();

try
{
await bundleMgr.InstallAsync(bundleStream, progress, token);
Console.WriteLine("Successful");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}


I can not pin point any events that may have caused the new error.

Some fixes that we've tried applying:
- Ensuring the BND files are not Corrupted (manual installation)
- Executing the script on a separate development server (yields similar error)
- Replacing the SDK DLLs
- Executing from a separate desktop environment


All situations result in the following error:
Original Server:
Object reference not set to an instance of an object

Second Server:
Value cannot be null.
Parameter name: key


Verbose Error Original Server:

Starting Installation script
UserName: tmeyer
Starting Installer
Ensured Authentication: True
Uploading bundle 0
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at SoftPro.ClientModel.IO.BinaryTransfer.UploadTo(Stream source, Action`2 uploader, CancellationToken cancellationToken, Int32 chunkSize)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_0.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at SoftPro.ClientModel.Threading.TaskExtensions.<>c__DisplayClass7_0`1.<Finally>b__0(Task`1 t)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at ConsoleApplication1.Program.<InstallBundles>d__2.MoveNext() in c:\Users\tmeyer\Documents\Visual Studio 2015\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 80
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at SoftPro.ClientModel.IO.BinaryTransfer.UploadTo(Stream source, Action`2 uploader, CancellationToken cancellationToken, Int32 chunkSize)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_0.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #1) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #2) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #3) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---
<---






Verbose Error Second Server:


Starting Installation script
UserName: tmeyer
Profile Entered: Default
Starting Installer
Ensured Authentication: True
Uploading bundle 0
Uploading bundle 13
Uploading bundle 26
Uploading bundle 39
Uploading bundle 52
Uploading bundle 66
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at SoftPro.ClientModel.IO.BinaryTransfer.UploadTo(Stream source, Action`2 uploader, CancellationToken cancellationToken, Int32 chunkSize)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_0.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at SoftPro.ClientModel.Threading.TaskExtensions.<>c__DisplayClass7_0`1.<Finally>b__0(Task`1 t)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at ConsoleApplication1.Program.<InstallBundles>d__2.MoveNext() in c:\Users\tmeyer\Documents\Visual Studio 2015\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 80
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at SoftPro.ClientModel.IO.BinaryTransfer.UploadTo(Stream source, Action`2 uploader, CancellationToken cancellationToken, Int32 chunkSize)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_0.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #1) System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at SoftPro.Select.Client.ClientUserIDOperationBehaviorFactory.ClientUserIDOperationBehavior.System.ServiceModel.Dispatcher.IClientMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoftPro.Select.Client.Bundles.BundleManagerService.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManagerServiceClient.ContinueInstall(Guid cookie, Int32 pos, Byte[] data)
at SoftPro.Select.Client.Bundles.BundleManager.<>c__DisplayClass15_1.<SoftPro.Select.Client.Bundles.IBundleManager.InstallAsync>b__1(Int32 pos, Byte[] data)
at SoftPro.ClientModel.IO.BinaryTransfer.<>c__DisplayClass2_0.<UploadTo>b__1(Int32 pos)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---
<---
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Initializing Console Application Bundle Installation

Post by BobRichards »

I'm sorry but I am unable to help with this issue. I don't know why it would suddenly stop working. This is beyond the DevForum's ability to help.

You will need to contact the SoftPro Customer Service (https://www.softprocorp.com/softpro-support/) to escalate this to a Select developer.
Bob Richards, Senior Software Developer, SoftPro
Post Reply