Coder Social home page Coder Social logo

bugsense.js's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bugsense.js's Issues

Bugsense didn't recognize uniqueUsers or sessions

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 ?

Confused AMD implementation

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

appVersion option doesn't seem to work

I initialize Bugsense like this:

Bugsense.initAndStartSession({ apiKey: AppSettings.bugsense_apikey, appVersion: "1.0.0" });

Notherless all bugs in the report state version as unknown.

image

Bugsense.leaveBreadcrumb method spelling error breaks slice method.

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 );
}
};

Uncaught TypeError: Object function

<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)

Option parameters without effect

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.

AMD loading seems to have died: 'Bugsense is undefined'.

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 SDK errors

Ignore all errors that happened inside the SDK and do not send these over the API.

amd version doesn't work with requirejs because there are 2 anonymous modules

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

Error Instances in Dashboard have stopped populating.

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

Undefined variable "breaker" in custom "each" method.

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.

Uses a sync XHR instead of async.

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('');

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.