Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Jeffrey Bosch
@Jefiozie
hi everyone, we are expermineting with glitchtip and are facing an error with the social provider of Gitlab. After the gitlab login we see a 500 internal server error on the endpoint: /rest-auth/gitlab/. The app configuration in Gitlab is good and "looks" like it works.
Jeffrey Bosch
@Jefiozie
it starts with the oauth/autorize flow i see the tokens thenredirects to /auth/gitlab en then redirects to rest-auth/gitlab
Jeffrey Bosch
@Jefiozie
@david:burkesoftware.com any ideas?
bufke
@david:burkesoftware.com
[m]
That's gitlab.com right?
Jeffrey Bosch
@Jefiozie
Yes
I dont wanne file and issue if it isnt ☺
That is why im checking here
bufke
@david:burkesoftware.com
[m]
it's working fine on https://app.glitchtip.com/ for me
what's the error say?
For any oauth stuff, I would generally say triple check settings. They can be finicky.
Jeffrey Bosch
@Jefiozie
The error is just an error 500
bufke
@david:burkesoftware.com
[m]
you could try turning on DEBUG and see if it says more
Jeffrey Bosch
@Jefiozie
Going to do that and come back then thanks
bufke
@david:burkesoftware.com
[m]
oh I just realized in search that we explicitly use english to set the search vector. Then we don't when searching. Which is fine if your database defaults to english!
but if not - then it will produce indexes that don't work great with searching... :(
What should it do?
bufke
@david:burkesoftware.com
[m]

What's really strange is, I'm not sure why. I have two databases that produce different results using ts_vector without specifying the language. But both report

 lc_collate 
------------
 en_US.utf8

😆 😢

The choice is likely between 🇬🇧 for all or use the default, which I cannot explain what the default is at this time.
ah show default_text_search_config; gives the language
I'm leaning towards "use default" for both.
It could in theory be an organization wide setting, but no time for that right now.
bufke
@david:burkesoftware.com
[m]
I mean maybe it wouldn't be too hard to make configurable org wide. Would anyone want to set their issue search to use a specific language? For example, search issue data using French settings. This isn't the language you see and read. It's how it searches. It would only make sense if you were collecting event data in that language. Most programming languages are English centric, so it would be of limited use.
bufke
@david:burkesoftware.com
[m]
I decided to make search use the database default language glitchtip/glitchtip-backend!109
james.kiger
@james.kiger:burkesoftware.com
[m]
Hello everyone. We're trying to boost GlitchTip's visibility. If you've been finding GlitchTip helpful, we would greatly appreciate it if you could give us a star on our repo at Gitlab.
https://gitlab.com/glitchtip
Mark Freer
@Nanyte25
@david:burkesoftware.com is there any official docs around what version of Postgres Glitchtip supports ?
james.kiger
@james.kiger:burkesoftware.com
[m]
@Nanyte25: Hi Mark. PostgreSQL 11 and above are supported
Mark Freer
@Nanyte25
Thanks much appreciated @james.kiger:burkesoftware.com
thomas
@thomastrinn

Hi!
I am trying to use GlitchTip.

I have a Java EE 8 web application with TomEE plume 8.
In my maven pom I use sentry and sentry-servlet 5.6.0 dependencies.
I initialised Sentry with ServletContainerInitializer, and I added a ServletContextListener to the ServletContext, where in the contextDestroyed method I call Sentry.close();

On undeploy or TomEE shutdown I see the fallowing in the log:
DEBUG: UncaughtExceptionHandlerIntegration removed.
INFO: Closing SentryClient.
DEBUG: Shutting down
27-Jan-2022 08:05:33.679 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@40fa8766]) and a value of type [io.sentry.Hub] (value [io.sentry.Hub@67774e29]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
27-Jan-2022 08:05:33.680 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@40fa8766]) and a value of type [io.sentry.Hub] (value [io.sentry.Hub@49a6f486]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

Maybe that is not the right place to call Sentry.close() ?

Thanks for any response!

Mark Freer
@Nanyte25
Screenshot 2022-01-27 at 09.31.58.png
Hi , I am trying to configure social auth for github on both our self hosted kubernetes cluster /accounts/github/login/callback/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch => generated 487 bytes in 775 msecs (HTTP/1.1 200) 8 headers in 636 bytes (1 switches on core 0)
I have added the social account credentials in django admin. Is there and enviroment variables I need to configure etc?
according to docs the callback url should contain https://route-url/accounts/github/login/callback/. If someone could provide some guidance I would be very much appreciate it thank's.
Mark Freer
@Nanyte25
bufke
@david:burkesoftware.com
[m]
In my experience with oauth, that error is often correct. It might be a very small detail like a http vs https. https://docs.github.com/en/developers/apps/managing-oauth-apps/troubleshooting-authorization-request-errors
although in your case, I think that url IS incorrect, the hosted site uses https://app.glitchtip.com/auth/github
If this is helpful, please consider contributing documentation.
I think you're using the default django-allauth path, which GlitchTip doesn't use.
bufke
@david:burkesoftware.com
[m]
Related to oauth, we use django-allauth + dj-rest-auth for it as described here. I'm trying to think if there is a more generic way. I don't like having to declare classes for every possible case and declare frontend urls. Worse case, I guess I could declare those frontend urls in the backend and pipe them over, so at least they are centralized. It's still an annoying amount of work just to set up a new oauth provider that django-allauth already works with.
Mark Freer
@Nanyte25
are you guys using github enterprise instance? I will take a look and give it another try @david:burkesoftware.com. Happy to contributed to docs or blogs once I have this working
bufke
@david:burkesoftware.com
[m]
That's basically what I'm talking about a "more generic way". We don't. The work to add support wouldn't be huge though. (or I'd be happy to include it in a support contract). A one off solution for github would be welcome for sure, but what I really want is something that makes it easier to add anything allauth supports. I'm looking around a little now, but my time is pretty limited.
Mark Freer
@Nanyte25
updating the URL seems to work, thanks @david:burkesoftware.com is there a doc in could update for you guys with an MR that might improve this social auth flow ?
bufke
@david:burkesoftware.com
[m]
You could expand on https://glitchtip.com/documentation/install#social-authentication-oauth just for basic info for what we already have. I don't think the URL you set is obvious. We can add more as we go
even if we make it more generic, we still need to tell users how to set it up on the provider's end.
Mark Freer
@Nanyte25
so a pr here might so the trick https://gitlab.com/glitchtip/glitchtip-marketing/-/blob/master/documentation/install.md @david:burkesoftware.com
?
bufke
@david:burkesoftware.com
[m]
Correct
bufke
@david:burkesoftware.com
[m]
I made a little progress, I can add the authorize_url to the settings API (where oauth settings are already). It works for me with google and github. That should let us delete a hard coded value in the frontend which would be great. I don't love my implementation, it would be better if dj-rest-auth handled this IMO but I'm sure they don't want that kind of scope. It would be better to have one OAuthView instead of many for each provider (given that any dj-rest-auth + allauth user would always have to copy and past the same exact views)
class SocialAppSerializer(serializers.ModelSerializer):
    authorize_url = serializers.SerializerMethodField()

    class Meta:
        model = SocialApp
        fields = ("provider", "name", "client_id", "authorize_url")

    def get_authorize_url(self, obj):
        provider = PROVIDER_MAP.get(obj.provider, None)
        if provider:
            return provider.authorize_url
No idea if this works for self hosted oauth providers, but it's a step in the right direction
bufke
@david:burkesoftware.com
[m]
glitchtip/glitchtip-backend!111 james.kiger care to review? Maybe someone in the community could see if this let's them start using self hosted options. Note that it won't actually log in until the frontend is updated, but you should see the settings api call with the correct authorize_url.