Exception thrown upon appending to NODE_PATH #1657

Closed
opened 2025-08-09 17:21:10 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @notpeelz on 2/29/2016

An exception is thrown upon invoking EnsureReady() in Microsoft.AspNet.NodeServices/HostingModels/OutOfProcessNodeInstance.cs.

Framework: dnx451

Stack trace:

fail: Microsoft.AspNet.Server.Kestrel[13]
      An unhandled exception was thrown by the application.
      System.ArgumentException: Item has already been added. Key in dictionary: 'NODE_PATH'  Key being added: 'NODE_PATH'
        at System.Collections.Hashtable.Insert (System.Object key, System.Object nvalue, Boolean add) <0x7f524c2ce270 + 0x00589> in <filename unknown>:0 
        at System.Collections.Hashtable.Add (System.Object key, System.Object value) <0x7f524c2ccfe0 + 0x0001b> in <filename unknown>:0 
        at System.Collections.Specialized.CaseSensitiveStringDictionary.Add (System.String key, System.String value) <0x414881e0 + 0x0003a> in <filename unknown>:0 
        at Microsoft.AspNet.NodeServices.OutOfProcessNodeInstance+<EnsureReady>d__13.MoveNext () <0x414873b0 + 0x004cc> in <filename unknown>:0 
      --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x7f524c3845c0 + 0x00012> in <filename unknown>:0 
        at Redouble.AspNet.Webpack.NodeHost+<EnsureClient>d__6.MoveNext () <0x41486a30 + 0x001d1> in <filename unknown>:0 
      --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x7f524c3845c0 + 0x00012> in <filename unknown>:0 
        at Redouble.AspNet.Webpack.NodeHost+<Invoke>d__15.MoveNext () <0x41485870 + 0x00264> in <filename unknown>:0 
      --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7f524c3848d0 + 0x00017> in <filename unknown>:0 
        at Redouble.AspNet.Webpack.WebpackService+<CreateHost>d__5.MoveNext () <0x41461360 + 0x00325> in <filename unknown>:0 
      --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7f524c3848d0 + 0x00017> in <filename unknown>:0 
        at Redouble.AspNet.Webpack.WebpackService+<GetFile>d__7.MoveNext () <0x414c58f0 + 0x001b9> in <filename unknown>:0 
      --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7f524c3848d0 + 0x00017> in <filename unknown>:0 
        at Redouble.AspNet.Webpack.DevServer+<Invoke>d__4.MoveNext () <0x414c47b0 + 0x0081f> in <filename unknown>:0 
      --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x7f524c3845c0 + 0x00012> in <filename unknown>:0 
        at Microsoft.AspNet.Hosting.Internal.RequestServicesContainerMiddleware+<Invoke>d__3.MoveNext () <0x414c3cc0 + 0x00573> in <filename unknown>:0 
      --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x7f524c3845c0 + 0x00012> in <filename unknown>:0 
        at Microsoft.AspNet.Hosting.Internal.HostingEngine+<>c__DisplayClass32_0+<<Start>b__0>d.MoveNext () <0x414bed50 + 0x00436> in <filename unknown>:0 
      --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 
        at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 
        at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () <0x7f524c384b10 + 0x00012> in <filename unknown>:0 
        at Microsoft.AspNet.Server.Kestrel.Http.Frame+<RequestProcessingAsync>d__79.MoveNext () <0x4149dbe0 + 0x00ddc> in <filename unknown>:0 

At the time of writing, WebpackAspnetMiddleware (0.7.7) uses version 1.0.0-alpha6.

*Originally created by @notpeelz on 2/29/2016* An exception is thrown upon invoking `EnsureReady()` in [Microsoft.AspNet.NodeServices/HostingModels/OutOfProcessNodeInstance.cs](https://github.com/aspnet/NodeServices/blob/47c956cc4d78a3045bc40170af6f76d4ea60a2ca/src/Microsoft.AspNet.NodeServices/HostingModels/OutOfProcessNodeInstance.cs#L70). Framework: `dnx451` Stack trace: ``` fail: Microsoft.AspNet.Server.Kestrel[13] An unhandled exception was thrown by the application. System.ArgumentException: Item has already been added. Key in dictionary: 'NODE_PATH' Key being added: 'NODE_PATH' at System.Collections.Hashtable.Insert (System.Object key, System.Object nvalue, Boolean add) <0x7f524c2ce270 + 0x00589> in <filename unknown>:0 at System.Collections.Hashtable.Add (System.Object key, System.Object value) <0x7f524c2ccfe0 + 0x0001b> in <filename unknown>:0 at System.Collections.Specialized.CaseSensitiveStringDictionary.Add (System.String key, System.String value) <0x414881e0 + 0x0003a> in <filename unknown>:0 at Microsoft.AspNet.NodeServices.OutOfProcessNodeInstance+<EnsureReady>d__13.MoveNext () <0x414873b0 + 0x004cc> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x7f524c3845c0 + 0x00012> in <filename unknown>:0 at Redouble.AspNet.Webpack.NodeHost+<EnsureClient>d__6.MoveNext () <0x41486a30 + 0x001d1> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x7f524c3845c0 + 0x00012> in <filename unknown>:0 at Redouble.AspNet.Webpack.NodeHost+<Invoke>d__15.MoveNext () <0x41485870 + 0x00264> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7f524c3848d0 + 0x00017> in <filename unknown>:0 at Redouble.AspNet.Webpack.WebpackService+<CreateHost>d__5.MoveNext () <0x41461360 + 0x00325> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7f524c3848d0 + 0x00017> in <filename unknown>:0 at Redouble.AspNet.Webpack.WebpackService+<GetFile>d__7.MoveNext () <0x414c58f0 + 0x001b9> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7f524c3848d0 + 0x00017> in <filename unknown>:0 at Redouble.AspNet.Webpack.DevServer+<Invoke>d__4.MoveNext () <0x414c47b0 + 0x0081f> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x7f524c3845c0 + 0x00012> in <filename unknown>:0 at Microsoft.AspNet.Hosting.Internal.RequestServicesContainerMiddleware+<Invoke>d__3.MoveNext () <0x414c3cc0 + 0x00573> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x7f524c3845c0 + 0x00012> in <filename unknown>:0 at Microsoft.AspNet.Hosting.Internal.HostingEngine+<>c__DisplayClass32_0+<<Start>b__0>d.MoveNext () <0x414bed50 + 0x00436> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f524c3866d0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f524c3846b0 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f524c384630 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f524c3845e0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () <0x7f524c384b10 + 0x00012> in <filename unknown>:0 at Microsoft.AspNet.Server.Kestrel.Http.Frame+<RequestProcessingAsync>d__79.MoveNext () <0x4149dbe0 + 0x00ddc> in <filename unknown>:0 ``` At the time of writing, [`WebpackAspnetMiddleware`](https://github.com/frankwallis/WebpackAspnetMiddleware) (0.7.7) uses version `1.0.0-alpha6`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1657
No description provided.