Sentry Logger [Error]: SDK not enabled, will not send event

I have used Sentry in my Ionic project for a month. Everything works fine until I upgrade cordova platforms to 8.0.0 from 6.4.0 and sdk to 28 from 26.

this is the errors:

image

I have reinstalled my platform and sentry several times and I tried everything I could do but nothing works. I have no clue about that.

Could you guy point out the problems?
Thanks you for help.

How does you setup code look like? It seems that you are not passing a correct DSN.

I did pass DSN.
At first, I also thought it’s because the DSN not correct. So I checked it multiple times but it was correct.

Here is the code in my app.module.ts

import * as Sentry from ‘sentry-cordova’;

Sentry.init({
dsn: environment.sentryDsn,
environment: environment.sentryEnv,
debug: true,
release: ‘example@1.0.1’,
enabled: environment.production
});

Environment:
production: true,
sentryEnv: ‘prod’,
sentryDsn: ‘https://d66bABC...XYZ581@sentry.io/1500190