You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking more into this. I notice a bunch more use cases where getting the file name from a stack trace fails.
Also noticed that chrome will sometimes return nonsense stack traces. For example the path
http://localhost:8001/js/uncompress (aaa).js returns a strange stack trace.
Error
at getCallStack (http://localhost:8001/js/uncompress%20(:8001/examples/aaa/aaa).js:27:9)
at currentScriptPath (http://localhost:8001/js/uncompress%20(:8001/examples/aaa/aaa).js:62:10)
at loadArchiveFormats (http://localhost:8001/js/uncompress%20(:8001/examples/aaa/aaa).js:134:13)
at main.js:110;
The function currentScriptPath() is so skillfully method to get path. But i can't get the correct path on my device. I find why it not work correctly.
the problem in uncompress.js line 39 : "
line = stack.split('(')[1].split(')')[0];
"
because my project path include parenthesis mark, so that function can not cacth the correct path.
and I fix this bug with use RegEx like this : "
line = stack.split(/[\s][(]/)[1].split(/[)][\n]/)[0];
“
The text was updated successfully, but these errors were encountered: