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

Function calls are not supported in decorators but 'SentryModule' was called. #25

Open
goyote opened this issue Feb 11, 2019 · 10 comments

Comments

@goyote
Copy link

goyote commented Feb 11, 2019

I get this error when building for prod:

ERROR in Error during template compile of 'AppModule'

Function calls are not supported in decorators but 'SentryModule' was called.

However during dev there's no problem.

My code in app.module.ts

import {SentryModule} from 'nativescript-sentry/angular';
@NgModule({
    imports: [
        SentryModule.forRoot({dsn: 'https://...'}),
    ],
})
@danielgek
Copy link
Owner

@goyote just published 1.8.1 with rc tag, can you try it out ? thanks

@dottodot
Copy link

I get the same error on 1.8.1 have I install the correct version

tns plugin add [email protected]

@danielgek
Copy link
Owner

humm ok will take a deeper look and report back

@dottodot
Copy link

dottodot commented Feb 14, 2019

By the way this only happens when using aot tns run ios --bundle --env.uglify --env.aot

@danielgek
Copy link
Owner

danielgek commented Mar 13, 2019

Hi @dottodot and @goyote i think it's fixed, can you check with tns plugin add [email protected] ?

@dottodot
Copy link

OK so aot is working now but I get error when using Sentry.captureException(error) that's regardless of aot or not

null is not an object (evaluating 'SentryClient.sharedClient.sendEventWithCompletionHandler')

@danielgek
Copy link
Owner

Strange i got no errors while i was testing, will do more tests to see if i can sort it out, thanks ;)

@danielgek
Copy link
Owner

Hi @dottodot i can't reproduce it, can you send a longer stacktrace or a test case?

@dottodot
Copy link

OK I've found the cause of the issue. It was because I'd add my own custom error handler not realising you'd already done that. So for some reason doing that causes the error.

@danielgek
Copy link
Owner

it shouldn't do that, humm will investigate further, thanks ;) will release this in the coming days ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants