Giter VIP home page Giter VIP logo

errorboard's Introduction

ErrorBoard

Track and fix JavaScript errors fired by your visitor's browsers.

Screenshots

Messages view

Details view

Browsers view

Prerequisites

  • Node.js and NPM
  • A free port

Installation

$ git clone git://github.com/Lapple/ErrorBoard.git
$ cd ErrorBoard
$ npm install

Configuration

Edit the config section of package.json:

// ...
"config": {
    "dbfile": "db", // path to database file
    "port": 3000    // web application port
},
// ...

Running

After you have everything installed and configured, run:

npm start

Once the app has started successfully, navigate to localhost at specified port (e.g. http://127.0.0.1:3000/) to get the error data. Similar error messages are not grouped, however the one can navigate to Scripts tab to get the idea which file:line pairs produce most errors.

Browser snippet

The first time you visited http://127.0.0.1:3000/ you probably won't see any errors since they were not being sent to the board. To start sending errors, make sure that the following JavaScript snippet is the first code, executed on your pages:

// JavaScript
window.onerror = function( message, url, line, column, error ) {
  var e = encodeURIComponent;
  ( new Image() ).src = 'http://127.0.0.1:3000/error?message=' + e( message ) +
                                                   '&url='     + e( url ) +
                                                   '&line='    + e( line ) +
                          ( error && error.stack ? '&stack='   + e( error.stack ) : '' ) +
                                        ( column ? '&column='  + e( column ) : '' );
};

Replace 127.0.0.1:3000 with the address and the port number your ErrorBoard is running.

Metadata

The error reporting snippet might optionally pass a meta= parameter that can either be a plain or JSON string. Use this parameter if you need to pass other contextual information about the page or user, for example, locale, environment or build number.

License

(The MIT License)

Copyright (c) 2014 Aziz Yuldoshev <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

errorboard's People

Contributors

amio avatar codinfox avatar lapple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

errorboard's Issues

Install and listing stored issues

Hi there, and apologies in advance if these are really simple questions as I'm pretty new to both node and mongo lands.

I believe everything is installed correctly at this point in my environment (tried it on both Win7 and OS X Mountain Lion boxes) and I can get issues to store via the pusherror posting in the mongodb but the app itself is not displaying them. It just shows an empty list (I can use the "Clear all errors" button to clear them out though.

I'm hoping it's something simple in the configuration file that I've missed but tweaks there don't appear to make a difference. My guess is either they're not being stored in the expected format somehow or the

this.collection.group()

section of the getErrors() method in "modules\stats.js" is somehow not finding the stored messages in the database since it always returns an empty array.

I'm not seeing any errors in the console from either node or mongo (though I did initially need to tweak the configuration's:

collectionOptions: { w: 1 }

to prevent some mongodb complaints about opening a connection to the database when I did not include the "w: 1" parameter. Let me know if there's anything else I can try or attach here to track it down.

How to make test data?

Hello, I make test success, but

ErrorBorad show "No errors, time to relax"

may I do something for mongodb?

20131205

Q: Is it possible to secure the web interface?

Love the ErrorBoard service and web interface, but was wondering to protect the web interface from public visitors via a password or by moving it to the certain URL path instead of the root?

Any tips or suggestions?

"Latest Report" always "44 years ago"

Great work on this tool. Helping me a lot.

Anyway, just did a fresh clone. This is my configuration:
nodejs 0.10.16
npm 1.3.8
mongodb 2.4.5

Any reported error has its latest report equal to 44 years ago.

Any ideas?

MongoHQ

Is it posible to use MongoHQ instead of the local MongoDB?

Why forceUpdate report page every hour

This line: https://github.com/Lapple/ErrorBoard/blob/master/client/component-report.jsx#L85

The report page is forced ti update every hour. According to react documentation:

If your render() method reads from something other than this.props or this.state, you'll need to tell React when it needs to re-run render() by calling forceUpdate(). You'll also need to call forceUpdate() if you mutate this.state directly.

But I didn't see any outside data rendered in this application. Why force update at all?

Can ErrorBoard accept any custom parameter to provide better filter and grouping?

Let me tell you my current scenario. We have our application deployed on multiple servers and they all are using the same instance(same url and port) of ErrorBoard.
For any new feature, we release first to one or two servers and then after QA we release it to all servers. So, it is difficult to track any error occurred on a newly updated server.
Just wondering whether I can pass a custom parameter like server name using ErrorBoard code snippet and apply filter on that in dashboard.

500 TypeError: Object #<Object> has no method 'put'

Express
500 TypeError: Object # has no method 'put'
at routes.pushError (/home/fpmashery/ErrorBoard/routes/index.js:27:7)
at callbacks (/home/fpmashery/ErrorBoard/node_modules/express/lib/router/index.js:272:11)
at param (/home/fpmashery/ErrorBoard/node_modules/express/lib/router/index.js:246:11)
at pass (/home/fpmashery/ErrorBoard/node_modules/express/lib/router/index.js:253:5)
at Router._dispatch (/home/fpmashery/ErrorBoard/node_modules/express/lib/router/index.js:280:5)
at Object.Router.middleware as handle
at next (/home/fpmashery/ErrorBoard/node_modules/express/node_modules/connect/lib/http.js:204:15)
at Object.bodyParser as handle
at next (/home/fpmashery/ErrorBoard/node_modules/express/node_modules/connect/lib/http.js:204:15)
at Object.handle (/home/fpmashery/ErrorBoard/node_modules/express/lib/http.js:84:5)

How to clear the errors

How to wipe all errors in one go with new ErrorBoard? It was easy with previous version with a button at bottom.

How about the performance?

The NeDB says:

Its goal is to provide you with a clean and easy way to query data and persist it to disk, for web applications that do not need lots of concurrent connections, for example a continuous integration and deployment server and desktop applications built with Node Webkit.

Will it suitable for an event tracker backend?

why cannot catch ajax error, net error ?

why cannot catch ajax error, net error ?
this my code

window.onerror = function( message, url, line, column, error ) {
// var e = encodeURIComponent;
// ( new Image() ).src = 'http://127.0.0.1:3000/error?message=' + e( message ) +
// '&url=' + e( url ) +
// '&line=' + e( line ) +
// ( error && error.stack ? '&stack=' + e( error.stack ) : '' ) +
// ( column ? '&column=' + e( column ) : '' );
console.warn(message, url, line, column, error);
}

$.getJSON( '',
{f: 'json', 'asdebug-tag': ''},
function(json){
setContent(json);
setTimeout('refresh()',500);
} );

if the url cannot load, the brower return 404 net error , but this error cannot catch

Dependecies update?

Seems a lots of dependecies need to be updated:

» npm outdated --depth=0
Package          Current   Wanted  Latest  Location
envify             1.2.1    1.2.1   3.2.0  envify
vow                0.4.3    0.4.8   0.4.8  vow
sockjs             0.3.8   0.3.12  0.3.12  sockjs
superagent        0.18.0   0.18.2  0.21.0  superagent
ejs                1.0.0    1.0.0   2.2.4  ejs
nedb              0.10.5  0.10.11   1.1.1  nedb
browserify-shim    3.4.1    3.8.2   3.8.2  browserify-shim
reactify          0.13.1   0.13.2   1.0.0  reactify
watchify           0.8.3    0.8.3   2.3.0  watchify
page               1.3.7    1.6.0   1.6.0  page
react-tools       0.10.0   0.10.0  0.12.2  react-tools
react             0.10.0   0.10.0  0.12.2  react
serve-favicon      2.0.0    2.2.0   2.2.0  serve-favicon
moment             2.6.0    2.9.0   2.9.0  moment
useragent          2.0.8    2.1.5   2.1.5  useragent
lodash             2.4.1    2.4.1   3.0.1  lodash
compression        1.0.8    1.4.0   1.4.0  compression
uglify-js         2.4.14   2.4.16  2.4.16  uglify-js
nodemon           1.0.17    1.3.6   1.3.6  nodemon
express            4.1.1   4.11.2  4.11.2  express
browserify        3.46.0   3.46.1   8.1.3  browserify

Why use image to do JSONP?

I was surprised to come across the following snipped in your readme.

window.onerror = ( errorMsg, url, lineNumber ) ->
  e = encodeURIComponent
  ( new Image() ).src = "http://127.0.0.1:3000/pusherror/?message=#{ e errorMsg }&url=#{ e url }&line=#{ e lineNumber }"

Most of the times, script tags are used to perform JSONP.
Why are you using images?
We are currently evaluating your app and it would great difference if you cared to clarify the issue.

Thanks.
Dimitris.

Unable to start ErrorBoard using npm start

Below is the log output:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\node.exe
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart [email protected]
7 info start [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec start script
10 error [email protected] start: npm run browserify && npm run uglify && node eb.js
10 error Exit status 1
11 error Failed at the [email protected] start script.
11 error This is most likely a problem with the ErrorBoard package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error npm run browserify && npm run uglify && node eb.js
11 error You can get their info via:
11 error npm owner ls ErrorBoard
11 error There is likely additional logging output above.
12 error System Windows_NT 6.2.9200
13 error command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
14 error cwd D:\Apps\ErrorBoard
15 error node -v v0.10.28
16 error npm -v 1.4.9
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]

node eb.js works but npm start doesn't

Current ErrorBoard is incompatible with latest page.js

I updated all the dependencies used in this project to latest versions, but ErrorBoard cannot work properly. The only problem is that the detailed side bar cannot display itself. I tracked down the issue and found out that the problem is caused by slashes in the message content. The issue is also described in page.js project: visionmedia/page.js#187

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.