Skip to content

[Bug]: onesignal-cordova-plugin causing issues with Capacitor Preference & App Plugin in Android App #1109

@aoneahsan

Description

@aoneahsan

What happened?

Video showing the whole issue
Part1: https://www.youtube.com/watch?v=GlPexSl9aXI
Part2: https://www.youtube.com/watch?v=qfCZMr5JSTE

app used in demo, whole app zip file

perkforce-onesignal-plugin-issue-demo-app.zip

Issue details
Uncaught SyntaxError: Unexpected token 'export'

  • @param {boolean} granted
  • @returns void
    */
    setConsentGiven(s) {
    window.cordova.exec(i, i, "OneSignalPush", "setPrivacyConsentGiven", [
    s
    ]);
    }
    }
    const b = new S();
    window.plugins || (window.plugins = {});
    window.plugins.OneSignal || (window.plugins.OneSignal = b);
    export {
    l as LogLevel,
    p as NotificationWillDisplayEvent,
    g as OSNotification,
    w as OSNotificationPermission,
    S as OneSignalPlugin,
    b as default
    };
    });

Steps to reproduce?

1) watch the video i shared
2) use the zip file i provided or create your own

What did you expect to happen?

app not working
capacitor preference plugin when this onesignal-cordova-plugin installed gives error that not implemented, without it works fine

OneSignal Cordova SDK version

5.2.10 - 5.2.16

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

Issue details
Uncaught SyntaxError: Unexpected token 'export'


   * @param  {boolean} granted
   * @returns void
   */
  setConsentGiven(s) {
    window.cordova.exec(i, i, "OneSignalPush", "setPrivacyConsentGiven", [
      s
    ]);
  }
}
const b = new S();
window.plugins || (window.plugins = {});
window.plugins.OneSignal || (window.plugins.OneSignal = b);
export {
  l as LogLevel,
  p as NotificationWillDisplayEvent,
  g as OSNotification,
  w as OSNotificationPermission,
  S as OneSignalPlugin,
  b as default
};
});

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions