joshdholtz / Sentry-Android

[Deprecated] Use official "raven-java" library
https://github.com/getsentry/sentry-java
MIT License
180 stars 48 forks source link

I get SendEvent - 400 {"error":"Invalid project_id: u'3'"} #45

Closed Christophe31 closed 8 years ago

Christophe31 commented 8 years ago

note: it is a possible duplicate of #1 I changed my DNS/DSN (redeployed on a new server with sentry 8.3.2) while python/raven works on my new instance. SentryAndroid log this issue:

D/Sentry: URI - http://x:y@sentry.my_domain.net/3 I/System.out: AsyncTask #5 calls detatch() D/Sentry: SendEvent - 400 {"error":"Invalid project_id: u'3'"} D/Sentry: Adding request - UUID

My init is the common: Sentry.init(ctx, ctx.getString(R.string.sentry_dsn));

I used to init with also base domain but currently it return a CSRF failure.

(I tryed to recreate the project in multi organisation as I saw it worked for some persons, the sentry server works well with my django app (raven client))

joshdholtz commented 8 years ago

@Christophe31 Can you try doing me a favor? Can you try adding ?verify_ssl=0 to the end of your DSN? So... http://x:y@sentry.my_domain.net/3?verify_ssl=0

Not sure if this will work but yolo

Christophe31 commented 8 years ago

Yolo! I tryed but the result was not different… Let's live again!

joshdholtz commented 8 years ago

Dang! I won't have time to look into today or tomorrow but I can try to look into this on Thursday for ya if that's cool? How are you running this self instance? (Will help me debug) 😊

Christophe31 commented 8 years ago

Yes, I specified version in bug report message. Thank you.

joshdholtz commented 8 years ago

@Christophe31 Ah my bad! Reading is hard 😒

Hunter712 commented 8 years ago

use this Sentry.init(this, "http://your-base-url.com", "YOUR-SENTRY-DSN"); it work for me

Christophe31 commented 8 years ago

Oops, I pmed back josh thinking he wrote that… It worked for me until I changed my server domain/sentry version. It must be related to a sentry's version or domain specificity (I had probelms a while ago with underscore in domains, I don't know what could go wrong here but I transmited infos to josh by PM)

joshdholtz commented 8 years ago

@Christophe31 For some reason the server seems to be interpreting things as non utf-8. There was an issue with this a while ago that I got fixed in #31 (and it was because of that). I'm going to try replacing this networking logic with another networking dependency that might be able to do things better/smarter since I'm pretty sure I'm quite possibly using some deprecated stuff right now.

joshdholtz commented 8 years ago

@Christophe31 GOT IT! I was a dingus... Parsing for base url wrong 😔

Christophe31 commented 8 years ago

Will you release it soon on bintray? Or I should get it classic way? Thanx for your help/support.

joshdholtz commented 8 years ago

@Christophe31 Uploading to jcenter thingy right now! I will link you to it when its all up

Christophe31 commented 8 years ago

Awesome, Thanx a lot <3.

joshdholtz commented 8 years ago

@Christophe31 Should be good to go with this - https://bintray.com/joshdholtz/maven/sentry-android/1.4.0

Please let me know if this works or doesn't work for you 😇

Christophe31 commented 8 years ago

Awesome, It works great!

joshdholtz commented 8 years ago

Woooooo!! Thanks for the help with this ✊