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

Uncaught TypeError: e.data.search is not a function #68

Closed
seenukarthi opened this issue Jun 3, 2017 · 18 comments
Closed

Uncaught TypeError: e.data.search is not a function #68

seenukarthi opened this issue Jun 3, 2017 · 18 comments

Comments

@seenukarthi
Copy link

I Have create the sample dashboard using smashing new command. Everything works fine but there are lot of console error logs as below.

Uncaught TypeError: e.data.search is not a function
    at handler (application.js:1325)
handler @ application.js:1325
application.js:1325 Uncaught TypeError: e.data.search is not a function
    at handler (application.js:1325)
handler @ application.js:1325
@kinow
Copy link
Member

kinow commented Jun 3, 2017

Hmmm, I haven't seen this error yet. Could you share smashing version, Ruby version, whether you are customizing anything, or simply running the sample dashboard, etc?

The more you can share about your set up, the easier will be for others to reproduce your issue.

Cheers

@seenukarthi
Copy link
Author

seenukarthi commented Jun 4, 2017

There are no customization done just created a new dashboard using smashing new.

$ smashing new new-board
$ cd new-board
$ bundle install
$ smashing start

Environment:

Ruby Version : ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
Operating System: macOS version 10.12.4 (16E195)
Browser: Google Chrome 58.0.3029.110 (64-bit)

Note: I'm using RVM to manage ruby.

@kinow
Copy link
Member

kinow commented Jun 4, 2017

Working on Linux.

Ruby version: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
Operation system: Ubuntu 16.04 LTS 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Browser: Google Chrome Version 58.0.3029.110 (64-bit)

Executed the exact same commands, got the final output as

$ smashing start
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on 0.0.0.0:3030, CTRL+C to stop
For the twitter widget to work, you need to put in your twitter API keys in the jobs/twitter.rb file.
127.0.0.1 - - [04/Jun/2017 23:46:01] "GET / HTTP/1.1" 302 - 0.0021
127.0.0.1 - - [04/Jun/2017 23:46:01] "GET /sample HTTP/1.1" 200 2329 0.0030
127.0.0.1 - - [04/Jun/2017 23:46:03] "GET /views/text.html HTTP/1.1" 200 175 0.0006
127.0.0.1 - - [04/Jun/2017 23:46:03] "GET /views/meter.html HTTP/1.1" 200 442 0.0007
127.0.0.1 - - [04/Jun/2017 23:46:03] "GET /views/list.html HTTP/1.1" 200 493 0.0006
127.0.0.1 - - [04/Jun/2017 23:46:03] "GET /views/number.html HTTP/1.1" 200 343 0.0005
127.0.0.1 - - [04/Jun/2017 23:46:03] "GET /views/graph.html HTTP/1.1" 200 183 0.0006
127.0.0.1 - - [04/Jun/2017 23:46:04] "GET /public/favicon.ico HTTP/1.1" 404 683 0.0005

I have a Mac at work, and it should still have the old operating system installed along side Linux. Might be able to test next week, and perhaps try with ruby 2.4.x too.

Thanks for the environment information!
Bruno

@seenukarthi
Copy link
Author

@kinow Just want to mentions that the errors are in the Browser's Javascript Console not in the Terminal.

@kinow
Copy link
Member

kinow commented Jun 10, 2017

Oh, d'oh. It was obvious, sorry for the confusion. Will confitm if I get any similar errors.

@kinow
Copy link
Member

kinow commented Jun 11, 2017

Nothing on the JS console for Chrome (same version reported above) or Firefox 53.0.3 (64-bit).

Kept the dashboard running some minutes, played with the widgets, clicked everywhere, nothing.

Firefox has just one simple warning: Use of getPreventDefault() is deprecated. Use defaultPrevented instead. application.js:4:7108 but not related I believe.

@kinow
Copy link
Member

kinow commented Jun 11, 2017

To complete, both browsers had the default dashboard showing. And in both, the JS console was set to verbose and to include all errors.

@tobias--
Copy link

I am seeing these errors as well. The number of errors correlates with the number of widgets displayed, but even if no Widget is defined in default.erb, the error occurs once.

Also Chrome Version 58.0.3029.110 (64-bit)

@tyler-mauthe-hs
Copy link
Contributor

Hey @seenukarthi and @tobias--, sorry you're having issues.

Can you please provide your smashing version?

Run this and copy-paste the output:
gem list smashing

Mine looks like this:

$ gem list smashing

*** LOCAL GEMS ***

smashing (1.0.0)

@tobias--
Copy link

It looks exactly like your output:

$ gem list smashing

*** LOCAL GEMS ***

smashing (1.0.0)

@kinow
Copy link
Member

kinow commented Jun 11, 2017

Are you using mac os too tobias--?

@tobias--
Copy link

@kinow, yes, I do.

@kinow
Copy link
Member

kinow commented Jun 11, 2017

Thanks tobias--, as both users with this problem are on mac os, I wonder if there was any change from dashing to smashing 1.0.0 that caused this issue, or maybe the ruby version...

@tyler-mauthe-hs
Copy link
Contributor

I'm also using a mac, though I'm not yet on Sierra. Same version of Chrome also. A new dashboard loads for me.

However, this appears to be the code that's failing for them:
https://github.com/Smashing/smashing/blob/master/javascripts/batman.js#L299

This is within batman.js -- it's not clear why it is broken...

@tyler-mauthe-hs
Copy link
Contributor

@tobias-- can you please try to access the dashboard in an incognito window, with all your chrome addons disabled?

It seems this code relates to passing data via postMessage. It would fail if the dashboard receives a postMessage that didn't have a valid data attribute -- this code in batman expects a string.

The only thing I can think of that could send a postMessage to the window would be a Chrome addon...

@tobias--
Copy link

The errors were caused by an extension. In my case it was the developer extension augury.

@kinow
Copy link
Member

kinow commented Jun 15, 2017

Added a page in our Wiki, under the Troubleshooting category

https://github.com/Smashing/smashing/wiki/Uncaught-TypeError:-e.data.search-is-not-a-function

+1 for closing this ticket?

@seenukarthi
Copy link
Author

seenukarthi commented Jun 18, 2017

@kinow i can confirm that with out any plugin/extention this error is not occurring. Thanks.

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

No branches or pull requests

4 participants