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

DSN Errors #23

Closed
waltercool opened this issue Apr 26, 2020 · 11 comments
Closed

DSN Errors #23

waltercool opened this issue Apr 26, 2020 · 11 comments

Comments

@waltercool
Copy link

Hi all,

Tried to make a production build, but got stuck with DSN Exception.

Question: What to do on that case? This is not well documented. I'm only intended to build a Debug release?

Thanks!

@waltercool
Copy link
Author

waltercool commented Apr 26, 2020

I'm sorry, haven't attached the exception:

04-26 01:20:30.575  1401  1401 E AndroidRuntime: java.lang.RuntimeException: Unable to create application com.protonvpn.android.ProtonApplication: io.sentry.dsn.InvalidDsnException: Invalid DSN, the following properties aren't set '[host]'
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6465)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at android.app.ActivityThread.access$1300(ActivityThread.java:219)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:107)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:214)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7356)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
04-26 01:20:30.575  1401  1401 E AndroidRuntime: Caused by: io.sentry.dsn.InvalidDsnException: Invalid DSN, the following properties aren't set '[host]'
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at io.sentry.dsn.Dsn.validate(Dsn.java:222)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at io.sentry.dsn.Dsn.<init>(Dsn.java:66)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at io.sentry.dsn.Dsn.<init>(Dsn.java:41)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at io.sentry.SentryClientFactory.instantiateFrom(SentryClientFactory.java:114)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at io.sentry.SentryOptions.<init>(SentryOptions.java:44)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at io.sentry.SentryOptions.from(SentryOptions.java:89)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at io.sentry.SentryOptions.defaults(SentryOptions.java:116)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at io.sentry.Sentry.init(Sentry.java:110)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at com.protonvpn.android.ProtonApplication.initSentry(ProtonApplication.java:93)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at com.protonvpn.android.ProtonApplication.onCreate(ProtonApplication.java:71)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1189)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
04-26 01:20:30.575  1401  1401 E AndroidRuntime:        ... 8 more

@AlgirdasPundzius
Copy link
Contributor

Hey @waltercool,

You are running trying to build prodDebug variant?

@waltercool
Copy link
Author

Hi @AlgirdasPundzius ,

Right now, yes and works fine, but tried Release and got that error mentioned above.

@lucasl0st
Copy link

I have the same error using the F-Droid version on Android 10:



time: 1588846029523
msg: io.sentry.dsn.InvalidDsnException: Invalid DSN, the following properties aren't set '[host]'
stacktrace: java.lang.RuntimeException: Unable to create application com.protonvpn.android.ProtonApplication: io.sentry.dsn.InvalidDsnException: Invalid DSN, the following properties aren't set '[host]'
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6465)
	at android.app.ActivityThread.access$1300(ActivityThread.java:219)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7356)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: io.sentry.dsn.InvalidDsnException: Invalid DSN, the following properties aren't set '[host]'
	at io.sentry.dsn.Dsn.validate(Dsn.java:222)
	at io.sentry.dsn.Dsn.<init>(Dsn.java:66)
	at io.sentry.dsn.Dsn.<init>(Dsn.java:41)
	at io.sentry.SentryClientFactory.instantiateFrom(SentryClientFactory.java:114)
	at io.sentry.SentryOptions.<init>(SentryOptions.java:44)
	at io.sentry.SentryOptions.from(SentryOptions.java:89)
	at io.sentry.SentryOptions.defaults(SentryOptions.java:116)
	at io.sentry.Sentry.init(Sentry.java:110)
	at com.protonvpn.android.ProtonApplication.initSentry(ProtonApplication.java:93)
	at com.protonvpn.android.ProtonApplication.onCreate(ProtonApplication.java:71)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1189)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
	... 8 more

@AlgirdasPundzius
Copy link
Contributor

Yup, this one impacts F-droid builds. Somehow didn't thought about that scenario on F-droid builds.. Will provide a fix to master soon for nullable SentryDSN value on release builds

@AlgirdasPundzius
Copy link
Contributor

AlgirdasPundzius commented May 7, 2020

Fixed in 2.1.7

Edit: Hopefuly this will land in F-droid soon :)

@thgoebel
Copy link

thgoebel commented Jun 2, 2020

This is happening again to me in v2.2.2 from F-Droid.

@AlgirdasPundzius
Copy link
Contributor

Ugh, yes I can confirm, we messed up here, and 2.2.2 tag does not include F-droid hotfix..
Will address this soon. Sorry everyone for inconvenience

@thgoebel
Copy link

thgoebel commented Jun 2, 2020

@AlgirdasPundzius
Copy link
Contributor

@thgoebel thank you for reporting this 👍 2.2.3 Release for F-droid is live on github

@waltercool
Copy link
Author

Many thanks, resolving this

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

No branches or pull requests

4 participants