Skip to content

Type mismatch when upgrading from 7.109.0 to 7.110.1 #11644

@Stanzilla

Description

@Stanzilla

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

7.110.1

Framework Version

React 18

Link to Sentry event

No response

SDK Setup

import * as Sentry from '@sentry/electron/renderer';
import { init as reactInit } from '@sentry/react';
Sentry.init(
    {
      dsn: 'https://xxx.ingest.us.sentry.io/4xxx368',
      integrations: [Sentry.browserTracingIntegration()],
      tracesSampleRate: 1.0,
    },
    reactInit,
  );

Steps to Reproduce

  1. "@sentry/browser": "7.110.1",
    "@sentry/electron": "^4.22.0",
    "@sentry/react": "^7.110.1",
    "@sentry/vite-plugin": "^2.16.1",
  2. Build the app

Expected Result

No errors

Actual Result

Error: src/renderer/index.tsx(29,5): error TS2345: Argument of type '(options: BrowserOptions) => void' is not assignable to parameter of type '(if_you_get_a_typescript_error_ensure_sdks_use_version_v7_109_0: ElectronRendererOptions) => void'.
  Types of parameters 'options' and 'if_you_get_a_typescript_error_ensure_sdks_use_version_v7_109_0' are incompatible.
    Type 'ElectronRendererOptions' is not assignable to type 'BrowserOptions'.
      Type 'ElectronRendererOptions' is not assignable to type 'Options<BrowserTransportOptions>'.
        Types of property 'defaultIntegrations' are incompatible.
          Type 'false | import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/integration").Integration[] | undefined' is not assignable to type 'false | import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/integration").Integration[] | undefined'.
            Type 'Integration[]' is not assignable to type 'false | Integration[] | undefined'.
              Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/integration").Integration[]' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/integration").Integration[]'.
                Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/integration").Integration' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/integration").Integration'.
                  Types of property 'setupOnce' are incompatible.
                    Types of parameters 'getCurrentHub' and 'getCurrentHub' are incompatible.
                      Call signature return types 'Hub' and 'Hub' are incompatible.
                        The types of 'bindClient' are incompatible between these types.
                          Type '(client?: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sent...' is not assignable to type '(client?: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/action...'.
                            Types of parameters 'client' and 'client' are incompatible.
                              Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/...' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/t...'.
                                Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/...' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/t...'.
                                  Types of property 'captureException' are incompatible.
                                    Type '(exception: any, hint?: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/event").EventHint | undefined, scope?: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/scope").Scope ...' is not assignable to type '(exception: any, hint?: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/event").EventHint | undefined, scope?: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/scope").Scope | undefined) => string | undefined'.
                                      Types of parameters 'scope' and 'scope' are incompatible.
                                        Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/scope").Scope | undefined' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/scope").Scope | undefined'.
                                          Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/scope").Scope' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/scope").Scope'.
                                            The types returned by 'getClient()' are incompatible between these types.
                                              Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/t...' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/...'.
                                                Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/t...' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/client").Client<import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/options").ClientOptions<import("/home/cobalt/actions-runner2/...'.
                                                  The types of 'getOptions().transport' are incompatible between these types.
                                                    Type '(transportOptions: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/transport").BaseTransportOptions) => import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/transport").Transport' is not assignable to type '(transportOptions: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/transport").BaseTransportOptions) => import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/transport").Transport'.
                                                      Types of parameters 'transportOptions' and 'transportOptions' are incompatible.
                                                        Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/transport").BaseTransportOptions' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/transport").BaseTransportOptions'.
                                                          Types of property 'recordDroppedEvent' are incompatible.
                                                            Type '(reason: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/clientreport").EventDropReason, dataCategory: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/datacategory").DataCat...' is not assignable to type '(reason: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/clientreport").EventDropReason, dataCategory: import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/datacategory").DataCategory, event?: import("/home/cobalt/actions-runner2/...'.
                                                              Types of parameters 'dataCategory' and 'dataCategory' are incompatible.
                                                                Type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/types/types/datacategory").DataCategory' is not assignable to type 'import("/home/cobalt/actions-runner2/_work/wago-app/wago-app/node_modules/@sentry/node/node_modules/@sentry/types/types/datacategory").DataCategory'.
                                                                  Type '"metric_bucket"' is not assignable to type 'DataCategory'.
 ELIFECYCLE  Command failed with exit code 2.
Error: Process completed with exit code 1.
0s
0s

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPackage: reactIssues related to the Sentry React SDK

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions