Coder Social home page Coder Social logo

ember-cli-bugsnag's People

Stargazers

 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

ember-cli-bugsnag's Issues

Install instructions

Since Ember-CLI 0.2.3, ember addons should not be installed using ember install ember-cli-bugsnag - the readme should be upated.

When I ran the above install the package installed correctly. However, it threw an error after install:

version: 0.2.3 # Ember CLI version
Installed packages for tooling via npm.
installing
installing
The `ember generate` command requires an entity name to be specified. For more details, use `ember help`. # error

Promises are not being reported correctly

This might not be an issue and maybe it's something I did wrong. We installed bugsnag a couple weeks ago and our app has been reporting errors regularly, both on production and our staging server. But none of them have been due to error caused by unfulfilled promises. And I'm pretty sure we have a few of those.

This is the stacktrace generated by an error in bugsnag right after Ember triggers and exception on RSVP when our api responds with a 500. It's really hard to debug due to the assets being minified.

screen shot 2015-06-05 at 12 54 09 pm

Any clue on how to solve it?

Better urls

Route names instead of urls. Open questions: what happens if error is thrown mid transition?

Should not catch TransitionAborted error

It seems that a TransitionAborted error doesn't have a stack trace.

image

This is causing us problems for now but having looked through the Ember code base this appears to be something that might not be an error situation. I think we abort some transitions manually in our apps.

emberjs/ember.js@322fc0e

Cannot `import Bugsnag from 'bugsnag'` in test environment

I'm using the Bugsnag.notify API and therfore have to

import Bugsnag from 'bugsnag';

However, this breaks my tests:

Chrome 43.0 - Global error: Uncaught Error: Could not find module bugsnag imported from

Any suggestions here? I'm curious why index.js explicitly does not include bugsnag in test environments.

// index.js
this._includeBugsnag =
      this.isDevelopingAddon() || process.env.EMBER_ENV !== 'test';

Any chance we could import just the bugsnag/shim in test environments?

Can't return promise from getMetaData

In our Ember app, we have a currentUser computed property on our session service, which returns a promise.

I'm hoping to use this currentUser() method to populate the Bugsnag user metadata via this promise-based method. However, returning a promise from utils/bugsnag.js getMetadata() is not currently possible.

Do you forsee this being possible? Or will I have to develop a local workaround?

Library URL config option

Thanks for putting this add-on together, it was really easy to setup.

I was wondering if the config.bugsnag.libraryUrl property is still relevant. From what I can tell the add-on was updated to pull the Bugsnag library from Bower and then, more recently, to use inline node assets to use the node module.

Thanks!

CSP inline-script error

Chrome gives the following CSP error when using the addon:

[Report Only] Refused to execute inline script because it violates the following 
Content Security Policy directive: "script-src ... ". Either the 'unsafe-inline' keyword, 
a hash ('sha256-Li1kX2hSsXxBIvK1YWeekOV49Asr5QAOvrIrILWqql0='), or a 
nonce ('nonce-...') is required to enable inline execution.

It would be reasonably straightforward to generate a hash of the contents and inject that into the CSP rules in development, but I'm not sure how this would work in production. Obviously the addon doesn't integrate with the web-server in any way so there'd be no way of injecting this.

Adding a nonce to the config and using that in the script tag would also work, we'd just need to use the same nonce in the web-server config for it to work on live.

Another approach would be to not inject the script tag into the HTML at build time at all and instead dynamically inject the script at run-time using something like ember-inject-script.

1.0.0+ always thinks I am in production

1.0.0+ always thinks I am in production so is always logging when in development. I made sure it was properly in development still checking right before an error occurred.

I went through code and couldn't find out why, mine and yours. But it works fine on 0.2.0 so just sticking with that as I haven't got time to find the actual issue or diff what changed between versions.

Potential regressions in 2.0.0

I published 2.0.1 today which had a fix for Ember 3.13+
I also made some changes to the version of node which required bumping ember-cli to 3.1.3+
In testing it on my work app I am seeing some regressions in our test suite that seem unrelated. Like floats being 1.250 instead of 1.25 all of a sudden.
Working on reproducing those errors, I am a little confused as it feels like if should be a simple dependency upgrade.

How to require bugsnag

I need to require Bugsnag in a before hook to the ember build.

I have no problem requiring it when I install it using npm: npm install bugsnag --save-dev

However, I think since it's an ember-cli add-on, I'm having issues.

Docs say to require('bugsnag'), but it doesn't seem available at this stage.

Do you have any thoughts on how I can require it in a file outside the app directory in the tasks directory, and before ember gets built ?

Allow overriding releaseStage

Ember-CLI only supports development, test, and production, so we end up using config.environment = "production" for production and staging.

I'd love to be able to override that with

// config/environment.js:
bugsnag: {
  releaseStage: process.env.MY_APP_ENVIRONMENT
}

and have this addon default to config.environment if that isn't specified:

// index.js:
var releaseStage = bugsnagConfig.releaseStage || config.environment;
...
'Bugsnag.releaseStage = "' + releaseStage + '";',

No tests

There's no tests. I'm working on it!

user/metadata not always provided when using Bugsnag.notifyException

I'm reviewing some recent Bugsnags and realizing that the user and metadata tags are not always provided as part of the Bugsnag. I'm not 100% certain but I believe it's because there's some instances in our app where we recover from an error but still want to use Bugsnag.notifyException.

The problem seems to be, from my understanding of that code, that getUser() and getMetadata() don't get called except from within onerror: https://github.com/binhums/ember-cli-bugsnag/blob/master/app/instance-initializers/bugsnag.js#L50

The result of this seems to be that if the first Bugsnag report issued is a manual notifyException, it won't contain pull in your user data / metadata. But if an onerror occurred, it'll set these values for all future notifyExceptions.

I'm surprised no one's noticed this; it makes me wonder if I'm misusing the API somehow? Is it ok that I'm still using Bugsnag.notifyException to report handled exceptions? Or is there a better workflow?

Upgrade bugsnag-js to new major version 4

Bugsnag has put out a new major version. Currently 4.3.3

This is a complete rewrite that changes how bugsnag is used and thus just upgrading the package doesn't work.
I played around for an hour or so trying to get this to work but couldn't get it working again.

I can help if I get some direction but I don't have a lot of experience with Ember Addons and am running into a few walls.

Here is what I tried so far: https://github.com/Alonski/ember-cli-bugsnag/tree/upgradeBugsnag

Fix breaking changes in FastBoot 1.0

The current ember-cli-fastboot releases (1.0.0-rc.1 and above) introduce breaking changes. These will most likely break your current FastBoot implementation.

See ember-fastboot/ember-cli-fastboot#387 for more information and a guide on how to fix your addon. Also you may want to visit the -fastboot Slack channel to get help from other users.

Note: this issue has been created automatically, by searching for certain patterns in your code. If you think this has been falsely created, feel free to close!

User id is always IP address

I'm assuming this is an upstream issue, and I've reported it as bugsnag/bugsnag-js#171.

Nonetheless, I wanted to note it here.

I'm hitting an annoyance, when adding user metadata to my exception - my user ID is being ignored, and the default IP address is always being used instead.

Error when no api key is set

This line will issue the following error if we don't set an api key:

Uncaught TypeError: Cannot read property '_config' of null
    at Object.initialize (bugsnag.js:15)

What do you think of improving the guard like this ?

  if (!Bugsnag._client || Bugsnag._client._config.apiKey === undefined) {
    return;
  }

container.lookup is not a function [email protected]

This addon is using the Application Initializers API, which doesn't have access to app.lookup anymore. It should probably be migrated to be an instance initializer to access app.lookup as it fails in new ember versions.

It's fixed as easily as renaming app/initializers to app/instance-initializers I believe.

Fastboot support

Any plans on getting fastboot support out of the box for this addon?

The ideal would be that this addon uses the node version of bugsnag when running in fastboot, and then when running in the browser it uses the JS version.

First step, at least, is to get this to not include the browser version of JS in fastboot land.

instance.container is not a function

I'm trying to upgrade to Ember 2.5 from 2.0 and getting this: TypeError: instance.container is not a function

Sample initializer:
App.initializer({
name: 'appInitializers',
initialize: function(app) {
app.inject('controller', 'test', 'test:main');
app.inject('component', 'test', 'test:main');
app.inject('route', 'test', 'test:main');
app.inject('adapter', 'test', 'test:main');
app.inject('serializer', 'test', 'test:main');
},
});

wondering what I'm doing wrong. Thanks for any help.

Cannot read property 'apply' of undefined. Ember 1.13.x

For some reason Ember 1.13.x doesn't have treeForApp available on this._super on line 23:36

ember-cli-bugsnag/index.js:

  ...

  treeForApp: function() {
    if (this._includeBugsnag) {
      return this._super.treeForApp.apply(this, arguments); // Cannot read property 'apply' of undefined
    }
  },

  ...

Seems the ember-data team discovered this also: https://github.com/emberjs/data/blob/master/index.js#L95

Currently installed ember-cli-bugsnag v1.0.2.

Is there any way to fix this?

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.