bugsnag-js icon indicating copy to clipboard operation
bugsnag-js copied to clipboard

Support for Mini Program (Alipay & WeChat Mini Apps)

Open jcchikikomori opened this issue 4 years ago • 1 comments

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:

  • https://miniprogram.gcash.com/docs/miniprogram_gcash/1efqxn6n/framework_mini-program-javascript-engine#41e0d24e
  • https://global.alipay.com/platform/site/product/mini-program

Steps to reproduce

Unavailable

Environment

  • Bugsnag version: 7.10.1
  • Browser framework version (if any): N/A
  • Server framework version (if any): N/A
  • Browser version (e.g. chrome, safari): N/A (Griver or Alipay Mini Program driver)
  • Device (e.g. iphonex): Griver or Alipay Mini Program driver (Cross-platform engine)

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

jcchikikomori avatar Jun 04 '21 08:06 jcchikikomori

Hi @jcchikikomori,

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

johnkiely1 avatar Jun 23 '21 07:06 johnkiely1