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

Application not run if empty string used as DSN #326

Closed
3 of 11 tasks
JonathanSiddle opened this issue Mar 2, 2021 · 3 comments
Closed
3 of 11 tasks

Application not run if empty string used as DSN #326

JonathanSiddle opened this issue Mar 2, 2021 · 3 comments
Labels

Comments

@JonathanSiddle
Copy link

Platform:

  • Dart
  • Flutter Android or iOS
  • Flutter Web

IDE:

  • VSCode
  • IntelliJ/AS
  • XCode
  • Other, which one?

split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):

  • Enabled
  • Disabled

Platform installed with:

  • pub.dev
  • GitHub

Output of the command flutter doctor -v below:
octor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 1.22.3, on Linux, locale en_GB.UTF-8)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.53.2)
[✓] Connected device (1 available)

• No issues found!

The version of the SDK (See pubspec.lock):
4.0.6


I have the following issue:

Passing an empty for DSN does not continue to run the application.

When passing in null an exception is thrown with the message: 'DSN is required. Use empty string to disable SDK.' If you pass an empty string the _init method returns without executing appRunner.

Is this expected behavior? I would have still expected my application to run with sentry disabled.

Steps to reproduce:

  • Run a full application with sentry init and pass an empty string for the dsn value. e.g.
    await SentryFlutter.init((options) {
    options.dsn = "";
    }, appRunner: () {
    ...code to run application
    });

Actual result:

  • Application is not run

Expected result:

  • Application should still be run
@marandaneto
Copy link
Contributor

@JonathanSiddle thanks, will check this out asap

@JonathanSiddle
Copy link
Author

Just an update on this, one of my colleagues managed to get it working, the exception I was getting says you need to pass an empty string, passing '', does not seem to work but passing a string with a ' ' does seem to disable the SDK and continue to start the application as normal

@marandaneto
Copy link
Contributor

@JonathanSiddle makes sense, it's a bug actually and we've fixed it already, it'll be included in the next version, thanks for reporting.

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

No branches or pull requests

2 participants