ncdbg
ncdbg copied to clipboard
fails to load Javascript files with Illegal character exception
Javascript files are not getting loaded. I'm getting below exception.
java.net.URISyntaxException: Illegal character in path at index 0:
I have added few logs statements in ScriptFactory.scala at line nos 44, 60, 61, 66. I have attached the corresponding ncdbg.log file
Note that the exception is:
java.net.URISyntaxException: Illegal character in path at index 0: <eval>#138:9<eval>
at java.net.URI$Parser.fail(URI.java:2848)
when the issue was written the "tags" were escaped by markdown
Thanks for the report, I'll take a look!
I've added compensation for this. Could you please test the latest master? In particular, do the scripts show up in DevTools in a way that makes sense?
Hello, we are testing, the fix seems to work. We have a problem to make sense of which script is what but it might be due to a change in the way our infrastructure is loading the scripts into Nashorn (which might also be why the problem came to the surface anyway). We need a bit more time to see if there is anything which you could do any better.
Ok, let me know what you find.
Any update?
yes. I still don't know what changed but we have a good bypass. If we add //# sourceURL=script name to our scripts then the name is correctly picked up.
I haven't been able to successfully set breakpoints though: I get the following error: Setting an unresolved breakpoint with ID ndb1 at line 238 in script with URL xPlanDSLCCommandImplementation or Setting an unresolved breakpoint with ID ndb2 at line 109 in script with URL eval:///Script175
"Unresolved" means that the location isn't known yet, which typically happens when the function that contains the location hasn't yet been executed. But I suppose DevTools doesn't stop at the breakpoint? Does it show?
yes the breakpoints show and it doesn't stop. Note that my colleague who opened this bug doesn't face this issue so I am not sure why it happens to me
One of the differences is that I am doing remote debugging (through an ssh tunnel) while the server she is using is on the machine running the debugger
Hm, could be some sort of timing problem. Can you post part of a log where you see the "Unresolved" messages and some context?
ncdbg.log Hello, I uploaded the log. The breakpoint which should have been hit is the one set at 10:26:22.689 (note that in the log the name of the scrip is truncated, it should show up as xPlanDSLCCommandImplementation and shows correctly in chrome. It should have happened between 10:26:39:199 and 10:26:39.465 (based on the server time which may be off by some milliseconds compare to the client but we can assume that it is correct in the seconds range
Not sure what else to give in term of context.
Huh, sounds like #100, where Chrome/DevTools cuts off the URL so what gets sent to ncdbg isn't the correct URL. Did you remove the v8only parameter?
let me check on that
looks like it, sorry for that, since it is not printed in the url any more, I am guessing I have let chrome autocomplete my url. I did get some errors in the console but it stopped in the breakpoint. I attached the new log ncdbg.log Thanks again for your help and responsiveness
No worries, I'm glad we sorted that out! I'll take a look at the log errors.
Do you see the error in any particular situation?