Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Not catching errors for Android and Ios builds #113

@viveksriram1

Description

@viveksriram1

Hi,
We have implemented ember-cli-rollbar with our ember app and its working fine but its not catching errors for Android build we are using ember-cli-cordova for android build.

In our /services/logger.js

import Ember from "ember";
import config from "../config/environment";
import rollbar from 'rollbar';

export default Ember.Service.extend({
  session: Ember.inject.service(),

  notifyError: function(reason) {
    var userName = this.get("session.currentUser.fullName");
    var userId = this.get("session.currentUser.id");
    var error = reason instanceof Error || typeof reason !== "object" ?
        reason : JSON.stringify(reason);
    var environment = config.staging ? "staging" : config.environment;
    var version = `${config.APP.SHA}`;

    this.notifyRollBar(error, { id: userId, username: userName, environment: environment});
  },

  notifyRollBar(err, log_details) {
    rollbar.error(err, log_details);
  }
});

When we get error on browser rollbar.error(err, log_details); send request to rollbar but when we get an error on android build Its not making request to rollbar and rollbar.notifier is null .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions