Skip to content
This repository was archived by the owner on Nov 14, 2020. It is now read-only.
This repository was archived by the owner on Nov 14, 2020. It is now read-only.

_document.attachEvent is not a function - NativeScript Angular Issues #7

Closed
@sean-perkins

Description

@sean-perkins

When trying to implement this plugin in a NativeScript Angular environment, underlying web-related functions are being called.

Resulting error trace:

CONSOLE LOG file:///app/core/services/ns-app.service.js:42:16: toggling http logs: OFF
CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: ns-renderer: _document.attachEvent is not a function. (In '_document.attachEvent('onclick', self._breadcrumbEventHandler('click'))', '_document.attachEvent' is undefined)
CONSOLE WARN file:///app/tns_modules/tns-core-modules/ui/text-view/text-view.js:14:46: Class "UITextViewDelegateImpl" already implements the "UIScrollViewDelegate" protocol.
11:03:21 AM - Compilation complete. Watching for file changes.

Minimum steps to reproduce:

  1. Add module import on the AppModule
SentryModule.forRoot({
     dsn: 'https://foo:[email protected]/10'
}),

(we have a valid dsn, just not wanting to share the public one).

On the latest of everything:

All NativeScript components versions information
┌──────────────────┬─────────────────┬────────────────┬─────────────┐
│ Component        │ Current version │ Latest version │ Information │
│ nativescript     │ 3.4.0           │ 3.4.0          │ Up to date  │
│ tns-core-modules │ 3.4.0           │ 3.4.0          │ Up to date  │
│ tns-android      │ 3.4.0           │ 3.4.0          │ Up to date  │
│ tns-ios          │ 3.4.0           │ 3.4.0          │ Up to date  │
└──────────────────┴─────────────────┴────────────────┴─────────────┘

Any ideas?

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