top | item 4081524

Show HN: Proxino -- Monitor and Debug your JavaScript

105 points| unignorant | 14 years ago |proxino.com | reply

48 comments

order
[+] ricardobeat|14 years ago|reply
For hackers:

    window.onerror = function(m, f, l){
      var err = JSON.encode({ message:m, file:f, line:l })
      (new Image).src = '/errors?e='+err
    }
For Google Analytics users:

    window.onerror = function(m, f, l){
      var err = [f, l, m].join(' : ')
      _gaq.push(['_trackEvent', 'Errors', 'App', err, null, true])
    }
Analytics will allow you to filter by OS, browser, and all the other environment data it already captures. And nice graphs as a bonus :)
[+] ars|14 years ago|reply
Why wrap everything in json? Then you'll just have to decode it on the other end. Just use url parameters, it's what they are for:

    (new Image).src = '/errors?m='+encodeURIComponent(m)+
       '&f='+encodeURIComponent(f)+'&l='+encodeURIComponent(l);
This way it also works on browsers that don't have native JSON (old IE mainly, but also firefox before 3.5). And those are also exactly the browsers where you are likely to get errors since you are probably not testing using them.
[+] DevMonkey|14 years ago|reply
How do you keep a nefarious script kiddie from filling up your logs with bogus data? My thoughts were this:

1. Set the window.onerror to immediately push errors to an array 2. Load a small unique script that will create a basic sendError function to post the onerror arguments to an endpoint with a unique csrf set. 3. Loop through the arguments that are queued up and send them to the endpoint. 4. Replace the window.onerror with the sendError function.

Your endpoint can be an API that will log the data to either something like Graylog2 or whatever your favorite logging system is. Not 100% bullet proof but better then nothing.

[+] tlrobinson|14 years ago|reply
For some reason I thought they were doing more than this, like proxying your JavaScript (hence PROXino), instrumenting it with try/catches to provide robust stack traces, but apparently not: https://www.proxino.com/p.js
[+] bdr|14 years ago|reply
There are already services (like Sentry) that track errors well. I want a service that focuses on the non-error logging part.

I typically develop my JS with a lot of console.log calls. Let's say a hundred at page load, and more for each user action, and when there's new data coming down from the server. I'm trying to fix a bug that my friend is having on my new project, but I can't reproduce it locally. I want to see those console logs from her sessions. There's no tool that's designed for this right now. For example, most analytics platforms send an HTTP request on every event.

I'm already using this wrapper http://paulirish.com/2009/log-a-lightweight-wrapper-for-cons..., which wraps console.log and keeps a history client-side. That would be a good starting point. Just push that history up to the server, up to once a second or so.

I should be able to filter by user and browser window session, and ideally other features of the client or log contents, but really the user+browser session are the most important.

Does a good solution exist?

[+] ricardobeat|14 years ago|reply
Not feasible for most apps, but if you already have a websocket open, just stream the logs back to the server. Be prepared to store massive amounts of data even for a few hundred clients.
[+] sim0n|14 years ago|reply
In the Proxino video, I believe it said you can log arbitrary messages which can then be accessed via the web backend. You could probably just make a wrapper for console.log which both pushes the message to Proxino and logs it in the console.
[+] nealerickson|14 years ago|reply
Personally, I use Loggr (http://loggr.net) for tracking errors and events. You can tag your events however you want so it is really easy to track user sessions and so on.
[+] cheeaun|14 years ago|reply
Seriously, the beacon/tracker JS requires the whole jQuery (1.7.1)? https://www.proxino.com/p.js
[+] ricardobeat|14 years ago|reply
Wow. jQuery is 80% or more of the whole file. It could be loaded asynchronously, and completely avoided if it's already loaded (which is very likely).

Worst of all, it uses exactly one function, jQuery.ajax, which could be replaced with a `new Image; image.src = message` call or a 10 line XHR wrapper.

[+] unignorant|14 years ago|reply
Yes, fixing this is high on my todo list. I chose to launch first anyway. You know, MVP and all that ;)
[+] lucasjans|14 years ago|reply
And they are not even using a common CDN. Ouch.
[+] RoboTeddy|14 years ago|reply
More and more of the world is occurring in browsers in javascript, so this problem is important! I'm going to try it out.
[+] septerr|14 years ago|reply
@unignorant are you the dude in the demo video? I haven't met a more modle-esque JS developer.
[+] lucasjans|14 years ago|reply
I think you could better communicate potential objections and overcome them with your copy/video.

One I have is, how's this going to impact performance?

Also, once I sign up for the free trial, I'm presented with an account screen but not really told what to do next. Sure, I figured it out, but I think it should be more welcoming.

Good luck! I may use this.

[+] lucasjans|14 years ago|reply
One more suggestion, don't send emails from [email protected]. Especially considering that your registration email comes from here, and is sent to potential customers who may have a quick question before buying.

noreply@ says you don't want to talk to me.

Make is easy to answer questions and help people. Utilize a tool like Zendesk, if needed.

[+] aristidesfl|14 years ago|reply
How does this compare with http://errorception.com/ ?
[+] lucajona|13 years ago|reply
I've only played with both for a few days, but to summarise: Proxino's UI is drastically nicer, whereas errorception has been around longer and is more reliable.

Proxino is still in beta, so I wouldn't use it for mission-critical websites yet. But Proxino seems to be fixing problems and iterating quickly.

[+] nodesocket|14 years ago|reply
Who made your demo video? It is quite good.
[+] unignorant|14 years ago|reply
Thank you :) It was an in-house production.
[+] noinput|14 years ago|reply
Looking forward to trying it out, but the fact 'localhost' is not changeable is tough since nothing I build is direct on 'localhost'. typically it's site.dev or a local version of the site.com hostname, sometimes with a port to better simulate the real project. any chance you can add the option to change the 'localhost' on the fly in your console?
[+] unignorant|14 years ago|reply
Good point... I will likely fix this.
[+] delambo|13 years ago|reply
How does this work with minified/obfuscated production code? Some of the other comments suggest that proxino is listening to and logs on 'window.onerror'. If that is the case, I don't think you can get stack traces in all browsers, and the line number for a minified file will alway be 1.
[+] manuelflara|14 years ago|reply
Hmmm. Didn't this launch like a year ago? I remember emailing them about some questions I had a couple times and never got a reply, I assumed they shut down. Too bad since during this time a few competitors have come up: Sentry, ExceptionHub, etc
[+] unignorant|14 years ago|reply
This is a new product (made by one of the same people) with the same (old) name. It does have some functionality in common with the old product.
[+] joshstrange|14 years ago|reply
I tried to test this out but even on localhost it kept throwing:

status: "That domain isn't registered..."

And I don't really feel like paying $10 to TEST if the tool really works, let alone if I want to use it. Working demo please.

[+] unignorant|14 years ago|reply
Did you set the API key? You should be able to test on localhost with a free account. I'm happy to help over email if you like ([email protected]).
[+] dwynings|14 years ago|reply
The only pimple on this beautifully designed site is the lack of a favicon =)
[+] c-oreills|13 years ago|reply
Does this handle cross domain errors? We're currently doing this in house but some of our script errors are very nondescript as some of our JS is hosted on another domain.
[+] leandono|14 years ago|reply
Question: The service has a workaround about the errors with the message "Script Error." in scripts hosted on externals domains (for example, a CDN)?
[+] thepumpkin1979|14 years ago|reply
I really like the landing page and the video. I'm not sure how the product itself can be better than window.onerror+Google Analytics though.
[+] MarxGames|14 years ago|reply
doesn't work with mobile browsers(most of them) that don't support window.onerror
[+] ryanstout|14 years ago|reply
exceptionhub.com is also good and gives nice stack traces.