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

Hide full source paths from the user. #6

Merged
merged 3 commits into from
Jan 28, 2025
Merged

Hide full source paths from the user. #6

merged 3 commits into from
Jan 28, 2025

Conversation

oconnor0
Copy link
Contributor

This should work (at least in the sense that scripts will still run), but I don't know if it'll fix the stacktrace thing you ran into.

@oconnor0 oconnor0 requested a review from isaksky January 16, 2025 21:43
@isaksky
Copy link
Member

isaksky commented Jan 23, 2025

Right now I can't reproduce the problem I showed earlier, because I can't seem to get a js stacktrace. Here is what I get now:

{:code :UserException, :message "TypeError: Cannot read properties of undefined (reading 'foo')", :stacktrace "   at Microsoft.ClearScript.V8.SplitProxy.V8SplitProxyNative.Invoke(Action`1 action)\r\n   at Microsoft.ClearScript.V8.SplitProxy.V8ContextProxyImpl.InvokeWithLock(Action action)\r\n   at Microsoft.ClearScript.V8.V8ScriptEngine.ScriptInvoke[T](Func`1 func)\r\n   at Microsoft.ClearScript.V8.V8ScriptItem.InvokeMethod(Boolean marshalResult, String name, Object[] args)\r\n   at Microsoft.ClearScript.V8.V8ScriptEngine.<>c__DisplayClass147_0.<Microsoft.ClearScript.JavaScript.IJavaScriptEngine.CreateTaskForPromise>b__5(Object error)\r\n--- End of stack trace from previous location ---\r\n   at Trell.Engine.ClearScriptWrappers.EngineWrapper.RunWorkAsync(TrellExecutionContext ctx, Work work) in C:\\src\\trell\\Trell.Engine\\ClearScriptWrappers\\EngineWrapper.cs:line 259\r\n   at Trell.IPC.Worker.TrellWorkerCore.ExecuteAsync(WorkOrder request) in C:\\src\\trell\\Trell\\IPC\\Worker\\TrellWorkerCore.cs:line 83"}

@oconnor0
Copy link
Contributor Author

Hm, I wonder where/when/how we lost those.

@oconnor0
Copy link
Contributor Author

The ScriptEngineException has an ErrorDetails property that has the JS stacktrace. Here you can see the path is hidden. Unfortunately there's a long weird JS bit of code to the right of that ->.

image

@isaksky
Copy link
Member

isaksky commented Jan 27, 2025

Interesting, that looks like some code from ClearScript.

@oconnor0
Copy link
Contributor Author

Yes, the actual code I was running is:
image

Copy link
Member

@isaksky isaksky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@isaksky isaksky merged commit e48a722 into master Jan 28, 2025
1 check passed
@isaksky isaksky deleted the hide-paths branch January 28, 2025 15:04
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

Successfully merging this pull request may close these issues.

2 participants