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

Inaccurate filename extracted from Error generated from Zone.js Proxy #44

Open
YoungCatChen opened this issue Oct 18, 2018 · 0 comments
Labels

Comments

@YoungCatChen
Copy link

YoungCatChen commented Oct 18, 2018

Consider this error stack:

Error
    at StackTrace$$GenerateError (http://concatjs/base/third_party/javascript/cucumber_js/cucumber.js:54957:19) [ProxyZone]
    at Object.StackTrace$$getSync [as getSync] (http://concatjs/base/third_party/javascript/cucumber_js/cucumber.js:55019:23) [ProxyZone]

The error-stack-parser library finds the wrong location.

Expected Behavior

The location should be http://.../cucumber.js:54957:19.

Current Behavior

The location it finds is [ProxyZone].

Steps to Reproduce (for bugs)

<Working on a repro; but let me know if you don't need one.>

Context

I'm trying to use CucumberJS for my Angular2+ app's testing framework. CucumberJS uses this library to find relevant information of where a step is defined. Angular2+ app may be run under Zone.js, which may use its Proxy to do some stuff.

Your Environment

  • stacktrace.js version: v2.0.2
  • Browser Name and version: Chrome 69.0.3497.100
  • Operating System and version: macOS High Sierra 10.13.6
  • Link to your project: sorry there's no link to an internal project; I can work on a repro if needed.

Possible Solution

I'm not an export, but I guess this thing tokens.pop() may be the culprit:

var locationParts = this.extractLocation(tokens.pop());

@eriwen eriwen added the a:bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants