sentry-dart-plugin icon indicating copy to clipboard operation
sentry-dart-plugin copied to clipboard

sentry_dart_plugin default release version

Open ekuleshov opened this issue 1 year ago • 6 comments

Environment

sentry_dart_plugin: 2.1.0

Steps to Reproduce

  1. run flutter packages pub run sentry_dart_plugin
  2. observe release uploaded to the Sentry web UI

Expected Result

The plugin docs says the release is constructed from the pubspec, so I'd expect release look like buildName+buildNumber.

My Sentry initialization sets release at runtime to buildName+buildNumber (matching with pubspec as it should be) and because of that uploaded symbols are not linked/not used with issues and I have two sets of releases shown in Sentry web UI.

Actual Result

The release is shown as buildName (buildNumber).

ekuleshov avatar Jul 20 '24 13:07 ekuleshov

My Sentry initialization sets release at runtime to buildName+buildNumber

you mean the release set by default through SentryFlutter.init?

buenaflor avatar Jul 22 '24 13:07 buenaflor

you mean the release set by default through SentryFlutter.init?

That is correct

ekuleshov avatar Jul 22 '24 13:07 ekuleshov

@denrase could you have a look pls

buenaflor avatar Jul 22 '24 14:07 buenaflor

@ekuleshov Could you sahre the code with us where you set buildName+buildNumber? If the values from pubspec.yaml are the ones you want, you do not have to set this explicitly in options setup.

denrase avatar Jul 30 '24 09:07 denrase

I'm using the package_info_plus to get the version info:

      PackageInfo pi = await PackageInfo.fromPlatform();
      _appVersion = '${pi.version}+${pi.buildNumber}';

@ekuleshov Could you sahre the code with us where you set buildName+buildNumber? If the values from pubspec.yaml are the ones you want, you do not have to set this explicitly in options setup.

I would hope so, but uploaded artifacts wasn't linked with the app release. I've hacked it around in pubspec.yaml like this for now, but this shouldn't be required.

version: &ver 2.0.7+32
...
sentry:
  ...
  release: *ver
  ...

ekuleshov avatar Jul 30 '24 16:07 ekuleshov

Thx, i'll try to reproduce this. How exactly are you using _appVersion in relation to the Sentry SDK?

denrase avatar Aug 05 '24 11:08 denrase

let us know if this is still an issue

buenaflor avatar Nov 21 '24 15:11 buenaflor