openreferral / ServiceNet

7 stars 6 forks source link

Investigation: Temporary Error on Login/Registration in Public View #1406

Closed EnriqueCorado closed 3 years ago

EnriqueCorado commented 3 years ago

On https://servicenet.benetech.org/#/public/BayArea

If you click sign-in this error pops up

Screenshot 2020-11-19 074156

If you click on registration this error pop-up

Screenshot 2020-11-19 074219
johnhbenetech commented 3 years ago

@EnriqueCorado can you provide more details, step to reproduce, environment, etc. I'm having a hard time reproducing it

EnriqueCorado commented 3 years ago
johnhbenetech commented 3 years ago

Might be hard to track down. I had just done the release that introduced the captcha functionality earlier, so maybe there was a weird issue with a cached non captcha'd version that was resolved when the latest frontend was loaded.

I guess the idea that the login/registration panes wouldn't load at all (they just displayed error before the user even had opportunity to see fields) is a little confusing since I assume the validation occurs on submission.

Looking at container logs around this time I see: 2020-11-19 15:44:26.273 WARN 1 --- [ XNIO-1 task-5] o.z.problem.spring.common.AdviceTraits : Unauthorized: Invalid credentials 2020-11-19 15:44:30.622 ERROR 1 --- [ XNIO-1 task-1] io.undertow.request : UT005023: Exception handling request to /auth/login

org.springframework.security.authentication.BadCredentialsException: Captcha invalid! at org.benetech.servicenet.security.CaptchaVerifierFilter.doFilterInternal(CaptchaVerifierFilter.java:59) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:92) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

johnhbenetech commented 3 years ago

dev note, this is mostly an investigation task to see if anything jumps out as a possible cause of this or possible opportunity for more graceful error handling (or if we just think its the result of some temporary cache problem)

awalkowiak commented 3 years ago

@johnhbenetech @EnriqueCorado I can not reproduce the issue. I tried logging in/registering with proper and wrong interaction with reCaptcha. ReCaptcha always was propertly displayed/loaded. I think this was caused by invalidated cache files.

@abaranowska1 could you also try to reproduce this issue?

abaranowska1 commented 3 years ago

@awalkowiak @johnhbenetech @EnriqueCorado I cannot replicate this issue too.

EnriqueCorado commented 3 years ago

@awalkowiak @abaranowska1 I can't replicate it anymore. Must have been resolved. Thank you for looking into it