Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: "The semaphore has been disposed" on release 7.0.0 #185

Open
ahmedmansour-geotab opened this issue Nov 22, 2023 · 2 comments
Open

Comments

@ahmedmansour-geotab
Copy link

ahmedmansour-geotab commented Nov 22, 2023

NodeJs version: 16.13.2
Dotnet version: 7.0
Jering.Javascript.NodeJS package version: 7.0.0
Exception:

Exception: System.ObjectDisposedException EX59B6DA22
Message: The semaphore has been disposed.
StackTrace:
at System.Threading.SemaphoreSlim.CheckDispose()
at System.Threading.SemaphoreSlim.Release(Int32 releaseCount)
at Jering.Javascript.NodeJS.OutOfProcessNodeJSService.OutputReceivedHandler(String message, DisposeTrackingSemaphoreSlim semaphoreSlim)
at Jering.Javascript.NodeJS.OutOfProcessNodeJSService.\u003c\u003ec__DisplayClass49_0.\u003cCreateAndSetUpProcess\u003eb__1(String message)
at Jering.Javascript.NodeJS.NodeJSProcess.OutputThreadStart(Object arg)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

I see issue (152) mentions the fix was released in version 7.0.0. However, we encountered this error in production when we upgraded from 6.3.1 to 7.0.0.

@ahmedmansour-geotab ahmedmansour-geotab changed the title The semaphore has been disposed The semaphore has been disposed on release 7.0.0 Nov 22, 2023
@ahmedmansour-geotab ahmedmansour-geotab changed the title The semaphore has been disposed on release 7.0.0 The semaphore has been disposed Exception on release 7.0.0 Nov 22, 2023
@ahmedmansour-geotab ahmedmansour-geotab changed the title The semaphore has been disposed Exception on release 7.0.0 Exception: "The semaphore has been disposed" on release 7.0.0 Nov 22, 2023
@JeremyTCD
Copy link
Member

Could you reproduce the error with debug logging enabled?

@ahmedmansour-geotab
Copy link
Author

Do you mean with .AddLogging() added to the StaticNodeJSService.SetServices? Would that log to the console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants