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

feat(client): Log global error stack trace #2813

Conversation

briandipalma
Copy link
Contributor

closes: 2812

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@briandipalma
Copy link
Contributor Author

I signed it!

@briandipalma
Copy link
Contributor Author

Output is changed from

.../apps/salestrader/src/accountselector UTs in Chrome 60.0.3112 (Mac OS X 10.12.6):  error: true in 127481ms

 Uncaught ReferenceError: j is not defined
at http://localhost:9876/context.html:18 

to this

.../apps/salestrader/src/accountselector UTs in Chrome:  error: true in 9100ms

 Uncaught ReferenceError: j is not defined
at http://localhost:9876/context.html:18:60

ReferenceError: j is not defined
    at eval (eval at <anonymous> (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:4447:1), <anonymous>:18:60)
    at Object.<anonymous> (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:4447:1)
    at __webpack_require__ (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:20:30)
    at eval (eval at <anonymous> (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:10384:1), <anonymous>:8:29)
    at eval (eval at <anonymous> (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:10384:1), <anonymous>:65:3)
    at Object.<anonymous> (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:10384:1)
    at __webpack_require__ (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:20:30)
    at webpackContext (eval at <anonymous> (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:5285:1), <anonymous>:6:9)
    at Array.forEach (<anonymous>)
    at eval (eval at <anonymous> (http://localhost:9876/absolute/Users/briand/dev/fe/converted/salestrader/apps/salestrader/node_modules/@caplin/karma-test-runner/dist/entries/uts-test-entry.js?cc7b3bbdb1aa25a9cb61bb06401cfedc8a05761b:6261:1), <anonymous>:184:21)

Which is a slight improvement. I imagine for others it might provide far more useful output.

@briandipalma
Copy link
Contributor Author

Closes #2812

@Florian-R
Copy link

If this got to merged, could it be made configurable? Sometimes having Karma spit hundred lines of output is not always convenient.

@briandipalma
Copy link
Contributor Author

@Florian-R It's for global syntax errors, their would normally only be one.

From above the function I modified.

// error during js file loading (most likely syntax error)
// we are not going to execute at all. `window.onerror` callback.

@briandipalma
Copy link
Contributor Author

Why is the CLA taking so long to go green?

@dignifiedquire dignifiedquire merged commit 523d608 into karma-runner:master Aug 22, 2017
@dignifiedquire
Copy link
Member

Thank you :octocat:

@briandipalma briandipalma deleted the feat/2812/print-global-errors-stack-trace branch August 24, 2017 20:53
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.

4 participants