bugsnag / bugsnag-js

JavaScript error handling tool for BugSnag. Monitor and report JavaScript bugs & errors.
https://docs.bugsnag.com/platforms/javascript
MIT License
856 stars 251 forks source link

Support for Mini Program (Alipay & WeChat Mini Apps) #1429

Open jcchikikomori opened 3 years ago

jcchikikomori commented 3 years ago

Describe the bug

Support for Mini Programs such as GCash, Alipay & WeChat. It almost works since the Mini Program supports ES6/ES2015, however, this library uses window which is one of the reserved modules for Mini Program's engine

References:

Steps to reproduce

Unavailable

Environment

Example code snippet

import { observable, state } from '@goldfishjs/core';
import Bugsnag from '@bugsnag/js';

class MiniApp {
  bugsnagStarted = state(false);

  async startBugsnag() {
    if (!this.bugsnagStarted) {
      Bugsnag.start({
        apiKey: 'REDACTED',
        appType: 'worker',
        appVersion: process.env.npm_package_version,
        autoDetectErrors: false,
        enabledErrorTypes: {
          unhandledExceptions: false,
          unhandledRejections: true
        }
      });
      this.bugsnagStarted = true;
    }
  }
}
Error messages: ![image](https://user-images.githubusercontent.com/4709030/120770377-a880c900-c550-11eb-93d7-d1c1d1b1d726.png)
johnkiely1 commented 3 years ago

Hi @jcchikikomori,

Thanks for raising this feature request. We will consider this when priorities allow. We will let you know of any updates here.