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

Actions.js grabs all console logs #264

Open
chetanism opened this issue Jul 17, 2015 · 4 comments
Open

Actions.js grabs all console logs #264

chetanism opened this issue Jul 17, 2015 · 4 comments
Labels

Comments

@chetanism
Copy link

I am using react-dnd library which uses dnd-core library which uses the flummox library (phew). The problem I am facing is that under chrome browser all my logs/errors/warnings are shown to be logged from Actions.js. This is very frustrating because now I don't see the filename/line number where error is. Under Safari, same issue happens but with Flux.js. It works fine with Firefox.

Please let me know if there is a workaround for this problem. Please see the attached image:

screen shot 2015-07-17 at 1 23 16 pm

Thanks,
chetan.

@gaearon
Copy link

gaearon commented Jul 17, 2015

Flummox, from what I know, doesn't override console methods or anything. Any chance your build tool (responsible for source maps) is configured incorrectly or is at a buggy version?

@chetanism
Copy link
Author

I feel that you are right for two reasons:

  1. I am using webpack, and there is another issue: Warnings from webpack #194 that points out a similar issue (I may be wrong) with webpack. I tried the workaround mentioned on the issue, but it didn't help.
  2. In another project I am using browserify, and I don't see the problem there.

Frankly speaking, I don't have much idea about what's going on under the hood. I tried several things, but nothing helped. On my part, I will try:

  1. Building my project using browserify to confirm if the problem is indeed with webpack
  2. To build a simple project with webpack and react-dnd that reproduces the problem and share it here.

A couple of other things that I noticed, not sure if it helps, but just in case:

  1. Actions.js is loaded separately (as shown under sources). I don't see it in networks tab, or any code line requesting it, it just magically appears there.
  2. If I put any breakpoint in my source, debugger puts the breakpoint at Actions.js: 119 (which is the last line of the file)

@gaearon
Copy link

gaearon commented Jul 17, 2015

Can you try changing devtool in your Webpack config to 'eval'?
This sure looks like a broken source map.

@jkusachi
Copy link

jkusachi commented Sep 2, 2015

Experiencing the same

@chetanism for the time being, you can disable JS Sourcemaps in Chrome Dev Tools and you should get it working again, getting logs and debugger statements on the correct line numbers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants