Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different namings between android package name or ios bundle id and pubspec's name. #137

Closed
klnfreedom opened this issue Jul 19, 2023 · 6 comments · Fixed by #139
Closed
Assignees
Labels
bug Something isn't working Platform: Dart

Comments

@klnfreedom
Copy link

klnfreedom commented Jul 19, 2023

When a developer uploads source mappings to the sentry dashboard by the current lib, there appears a new release with a package name, which is different from the android package name or ios' bundle id. But when a crash of the app happens, the sentry io of the native side sends a native package names or bundle id which is not the same as the pubspec's package (name@version).

The decision, add a name parameter of sentry config (configuration.dart -> 96 row)
name = config?['name']?.toString() ?? pubspec['name'].toString();

@klnfreedom
Copy link
Author

PR is left in #138

@marandaneto
Copy link
Contributor

@klnfreedom For configuring the release's name that will be created by the plugin, you have to configure the release yaml entry or the SENTRY_RELEASE env. var.
The name is just a fallback in case the release isn't set or the SENTRY_RELEASE.

On the SDK side, you init the SDK, you can set your own release as well, you have to make them both match.

So what you wanna do is instead of setting the name, you actually set the release, does that work for you?

@klnfreedom
Copy link
Author

klnfreedom commented Jul 19, 2023

@marandaneto
Unfortunately, setting the release parameter does not work for me.

Example:
pubspec.yaml has got a name parameter (e.g. myapp_mobile)

When I set a release parameter to sentry config (e.g. co.myapp.client), the plugin will create a release name as myapp_mobile@co.myapp.client@1.0 and send it to the dashboard and create it (if it does not exist).

But the native sides of my app has got a different package name such as the android package name/ios bundle id is co.myapp.client. When the crash happens, the sentry io does not send an event about the crash to myapp_mobile@co.myapp.client@1.0. It sends and creates a new one co.myapp.client@1.0.

As a result, I have two releases with different packages name, but one of them has got a source mapping (which was created by the plugin) and the other one hasn't got it (which was created by the event of the crash), so it creates a problem of inability to read the stack trace from the native sides.

@marandaneto
Copy link
Contributor

@klnfreedom gotcha, I guess the error is somewhere else then, if release is set, it has precedence over the name.
Let me check that.

@marandaneto
Copy link
Contributor

#139 should address this issue, can you take a look?

@marandaneto marandaneto added the bug Something isn't working label Jul 19, 2023
@marandaneto marandaneto self-assigned this Jul 19, 2023
@marandaneto
Copy link
Contributor

name was being used even if release was provided, that was an oversight.
if release is provided, the name should be ignored since it has precedence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Platform: Dart
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants