bugsense / bugsense.js Goto Github PK
View Code? Open in Web Editor NEWBugSense client for HTML5, PhoneGap and Windows 8 Javascript apps
Home Page: http://www.bugsense.com/docs/html5
BugSense client for HTML5, PhoneGap and Windows 8 Javascript apps
Home Page: http://www.bugsense.com/docs/html5
I get crashes pretty well but it doesn't shows active sessions or uniqueUsers..
Bugsense.initAndStartSession({
apiKey: '*********',
appVersion: '1.0.1',
userIdentifier: device.uuid,
appname: 'MEP Antrag iOS'});
Is it possible with a bugsense.js ?
When an error is handled by bugsense.js, it should also propagate to console
and have crash error messages shown.
Hi,
I am trying to use bugsense.js
as Bugsense client in my HTML application.
I can not make much sense of some the changes you made to with respect to the Bugsense branch
In an empty html file I just load bugsense.js
, do the setup like:
new Bugsense({
apiKey: 'my_real_key'
, appname: "yalst Desktop"
, appversion: "1.0"
});
and then trigger an error say:setTimeout(function(){ access.invalid.var(); }, 1000);
then of course I end up in Bugsense.prototype.onerror
(line 577) with an undefined function error since the is no window.Bugsense
instance. Down there it needs to say window.bugsense
instead I guess.
My other source files are loaded as AMD modules - if bugsense.js
doesn't like to be loaded as module I am fine with it, but since there is support for AMD I like to use it of course:
In the first couple of lines you say:
if ( typeof define === 'function' && define.amd ) {
// AMD. Register as an anonymous module.
define( 'Bugsense', root.Bugsense );
}
which is imho not anonymous at all since it is named 'Bugsense'. In the Bugsense branch the name is left out of the define call which is ok.
More as a general point; I do not need to understand what it is all about with root
, this
and window
in the code, which actually seem to be three variables for the same thing. However when the constructor function silently creates a global variable named bugsense
(line 147) - not in root
, this
or window
- this can be very surprising for users. Maybe one should adapt the installation example accordingly since I was mistakenly thinking that I am free to name my Bugsense instance.
With best regards
Semmel
Apparently this project is dead, so please put something in readme to inform people.
Error in Bugsense.breacrumbs.slice( 1 ); missing d in breadcrumbs
This error does nothing but spam the crap out of our panel!
Bugsense.leaveBreadcrumb = function( breadcrumb ) {
if ( isValidKeyValue( breadcrumb ) ) {
if ( Bugsense.breadcrumbs.length + 1 == 16 ) {
Bugsense.breadcrumbs = Bugsense.breacrumbs.slice( 1 );
}
Bugsense.breadcrumbs.push( breadcrumb );
}
};
<script src="https://www.bugsense.com/static/js/global/bugsense.js" type='text/javascript'></script>
<script type="text/javascript">
Bugsense.initAndStartSession({ apiKey: 'xxx'});
</script>
gives me the following javascript error
Uncaught TypeError: Object function (config){return extend(this.config,config),this.config.uid=this.generateUid(),this.dataFixture=this.generateDataFixture(),this.extraData={},this.breadcrumbs=[],this.queue=[],this.retrieveCache(),"undefined"==type...<omitted>...n' (index):444
(anonymous function)
disableOnError
and appVersion
(as stated in the readme and linked to by your documentation at https://www.bugsense.com/docs/html5) are not supported.
appVersion
(documentation) is named appver
in the source. disableOnError
seems non-existent at all (although this is a MUST have feature in my opinion, as I don't want other script's bugs in my reports...).
I'd open a pull request but I don't know what you want to fix.. source or documentation.
Example:
define(['path/to/bugsense'], function(Bugsense) {
// Bugsense is undefined, as is window.Bugsense
// The correct AMD JS file has however been loaded normally.
});
Any ideas?
While I'm here I'd like a way to prevent Bugsense adding itself globally and taking control of window.onerror. In the application I'm working on the application centrally manages the errors since there is more than one subscriber to the event.
Also there is no documentation on how to change the user_identifier once the logger has been initialized.
Ignore all errors that happened inside the SDK and do not send these over the API.
lib/amd/bugsense.js
defines 2 anonymous modules, one for bugsense and another for Lockr. This is invalid because requirejs (and I believe any amd loader) only allows one anonymous module, that will be named according to the file that contains it.
Because of this, requirejs goes nuts and returns randomly the Lockr module when requiring different modules.
It can be solved easily by naming your modules:
// Bugsense definition
define('bugsense', [], factory);
// Locker definition
define('lockr', ['exports'], function(exports) {
root.Lockr = factory(root, exports);
});
Or by merging Lockr into bugsense so you only declare one anonymous module.
The issue only happens in bugsense 2.2.0. It's fine in 2.1.0.
Thanks
I thought Bugsense would accept the fact that there is no internet connection atm and safes all bugs for uploading it later.
But instead it blocks the whole application..
I'm having an issue where Error Instances in Dashboard have stopped populating, i just get a blank section in Instances. Used to always work until latest 2.0.1 update.
Is there something i could be doing wrong that is a known issue that can cause this to happen.
Thanks
in the custom 'each' method, there is a reference to a 'breaker' variable.
var each = function(obj, iterator, context, breaker) {
if (obj == null) return;
var nativeForEach = Array.prototype.forEach;
if (nativeForEach && obj.forEach === nativeForEach) {
obj.forEach(iterator, context);
} else if (obj.length === +obj.length) {
for (var i = 0, length = obj.length; i < length; i++) {
if (iterator.call(context, obj[i], i, obj) === breaker) return;
}
} else {
var keys = _.keys(obj);
for (var i = 0, length = keys.length; i < length; i++) {
if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;
}
}
};
This variable is never defined. I'm assuming it's a value that that the return of the iterator method checks against to see if you should break out of the each. Where you intending to have it be a separate argument that was passed to the method? Or was it something else entirely.
https://github.com/bugsense/bugsense.js/blob/master/src/libs/bowser.js#L97
The call to match
assumes there will be at least two matches. Yet the webkitVersion
regexp doesn't fulfill this assumption when paired with TV user agents.
Latest bowser have this issue fixed.
Most of the bugs I get are labeled Script Error and have undefined@null stack traces. Why is this?
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
Under loadSource()
var request = getXHR();
request.open('GET', url, false);
request.send('');
Few browsers, like older Opera have onerror handler return value semantics inverted:
http://stackoverflow.com/questions/8087240/if-i-override-window-onerror-in-javascript-should-i-return-true-or-false
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.