Base solution for your next web application
Open Closed

reCaptcha error #11678


User avatar
0
flaskone created

Hi, I have problem with reCaptcha. My version is 11.4.0 , .net core, and angular.

When I try to add a new tenant from UI , I got the error:

Some part of lines from logs.txt: WARN 2023-08-09 09:20:25,325 [19 ] Mvc.ExceptionHandling.AbpExceptionFilter - Unable to determine that you are not a robot. Abp.UI.UserFriendlyException: Unable to determine that you are not a robot. at FlaskOne.Web.Security.Recaptcha.RecaptchaValidator.ValidateAsync(String captchaResponse) in D:\RW\PROGRAMING\PROJECTS\FLASK_ONE\SaaS_11_4\FlaskOne\aspnet-core\src\FlaskOne.Web.Core\Security\Recaptcha\RecaptchaValidator.cs:line 49 at FlaskOne.MultiTenancy.TenantRegistrationAppService.RegisterTenant(RegisterTenantInput input) in D:\RW\PROGRAMING\PROJECTS\FLASK_ONE\SaaS_11_4\FlaskOne\aspnet-core\src\FlaskOne.Application\MultiTenancy\TenantRegistrationAppService.cs:line 78 at lambda_method2801(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) WARN 2023-08-09 09:21:18,134 [4 ] eb.Security.Recaptcha.RecaptchaValidator - {"Score":0.0,"Action":null,"Success":false,"ChallengeTs":"0001-01-01T00:00:00","HostName":null,"ErrorCodes":["browser-error"]} WARN 2023-08-09 09:21:18,152 [30 ] Mvc.ExceptionHandling.AbpExceptionFilter - Unable to determine that you are not a robot. Abp.UI.UserFriendlyException: Unable to determine that you are not a robot. at FlaskOne.Web.Security.Recaptcha.RecaptchaValidator.ValidateAsync(String captchaResponse) in D:\RW\PROGRAMING\PROJECTS\FLASK_ONE\SaaS_11_4\FlaskOne\aspnet-core\src\FlaskOne.Web.Core\Security\Recaptcha\RecaptchaValidator.cs:line 49 at FlaskOne.MultiTenancy.TenantRegistrationAppService.RegisterTenant(RegisterTenantInput input) in D:\RW\PROGRAMING\PROJECTS\FLASK_ONE\SaaS_11_4\FlaskOne\aspnet-core\src\FlaskOne.Application\MultiTenancy\TenantRegistrationAppService.cs:line 78 at lambda_method2801(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

My settings are as :

When I switch on the settings: "Use security image question (captcha) on login" on "User manager" tab nobody cannot log in.


9 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @flaskone

    Did you configure Recaptcha for your domain ? If not, probably there is an error message on the browser console, could you share it with us ?

  • User Avatar
    0
    flaskone created

    Here is the full log saved from the browser console: login:1 Autofocus processing was blocked because a document already has a focused element. DevTools failed to load source map: Could not load content for https://demo.flask.one:8081/assets/metronic/themes/default/plugins/global/sourcemaps/tiny-slider.css.map: Unexpected token '<', "<!DOCTYPE "... is not valid JSON Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'browsing-topics'. polyfills.37187c61a4a413f6.js:1 POST https://demo.flask.one:8071/api/services/app/TenantRegistration/RegisterTenant 500 Vt @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 onScheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleMacroTask @ polyfills.37187c61a4a413f6.js:1 d @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ polyfills.37187c61a4a413f6.js:1 Z.L.<computed> @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 _trySubscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 Se @ main.21360a73aaf5718d.js:1 V @ main.21360a73aaf5718d.js:1 _next @ main.21360a73aaf5718d.js:1 next @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 _trySubscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 b @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 b @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 r @ 23987.6141782ca85a3322.js:1 (anonymous) @ 23987.6141782ca85a3322.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 onInvoke @ main.21360a73aaf5718d.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 run @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ polyfills.37187c61a4a413f6.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 onInvokeTask @ main.21360a73aaf5718d.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 runTask @ polyfills.37187c61a4a413f6.js:1 at @ polyfills.37187c61a4a413f6.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 rt @ polyfills.37187c61a4a413f6.js:1 yt @ polyfills.37187c61a4a413f6.js:1 Gt @ polyfills.37187c61a4a413f6.js:1 scripts.c42ea64d2215c7bd.js:1 ERROR: scripts.c42ea64d2215c7bd.js:1 {code: 0, message: 'Unable to determine that you are not a robot.', details: null, validationErrors: null} main.21360a73aaf5718d.js:1 ERROR Error: An unexpected server error occurred. at Ue (main.21360a73aaf5718d.js:1:1542858) at main.21360a73aaf5718d.js:1:1172228 at Se (main.21360a73aaf5718d.js:1:1692192) at V (main.21360a73aaf5718d.js:1:1692128) at p._next (main.21360a73aaf5718d.js:1:1689029) at p.next (main.21360a73aaf5718d.js:1:1679595) at t.onload (main.21360a73aaf5718d.js:1:1542958) at V.invoke (polyfills.37187c61a4a413f6.js:1:6865) at Object.onInvoke (main.21360a73aaf5718d.js:1:2109449) at V.invoke (polyfills.37187c61a4a413f6.js:1:6802) handleError @ main.21360a73aaf5718d.js:1 next @ main.21360a73aaf5718d.js:1 next @ main.21360a73aaf5718d.js:1 _next @ main.21360a73aaf5718d.js:1 next @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 next @ main.21360a73aaf5718d.js:1 emit @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 run @ polyfills.37187c61a4a413f6.js:1 runOutsideAngular @ main.21360a73aaf5718d.js:1 onHandleError @ main.21360a73aaf5718d.js:1 handleError @ polyfills.37187c61a4a413f6.js:1 runTask @ polyfills.37187c61a4a413f6.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 W.invoke @ polyfills.37187c61a4a413f6.js:1 W.args.<computed> @ polyfills.37187c61a4a413f6.js:1 setTimeout (async) nt @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 onScheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleMacroTask @ polyfills.37187c61a4a413f6.js:1 d @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ polyfills.37187c61a4a413f6.js:1 Z.L.<computed> @ polyfills.37187c61a4a413f6.js:1 setTimeout @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 q @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 u @ main.21360a73aaf5718d.js:1 _trySubscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 Se @ main.21360a73aaf5718d.js:1 V @ main.21360a73aaf5718d.js:1 _next @ main.21360a73aaf5718d.js:1 next @ main.21360a73aaf5718d.js:1 t.onload @ main.21360a73aaf5718d.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 onInvoke @ main.21360a73aaf5718d.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 runGuarded @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ polyfills.37187c61a4a413f6.js:1 load (async) set @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 _trySubscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 b @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 u @ main.21360a73aaf5718d.js:1 _trySubscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 u.subscribe.P @ main.21360a73aaf5718d.js:1 _next @ main.21360a73aaf5718d.js:1 next @ main.21360a73aaf5718d.js:1 be.onload @ main.21360a73aaf5718d.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 onInvoke @ main.21360a73aaf5718d.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 runGuarded @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ polyfills.37187c61a4a413f6.js:1 load (async) set @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 _trySubscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 _error @ main.21360a73aaf5718d.js:1 error @ main.21360a73aaf5718d.js:1 Rt @ main.21360a73aaf5718d.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 onInvokeTask @ main.21360a73aaf5718d.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 runTask @ polyfills.37187c61a4a413f6.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 rt @ polyfills.37187c61a4a413f6.js:1 yt @ polyfills.37187c61a4a413f6.js:1 Gt @ polyfills.37187c61a4a413f6.js:1 load (async) x @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 onScheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleTask @ polyfills.37187c61a4a413f6.js:1 scheduleEventTask @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 _trySubscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 Se @ main.21360a73aaf5718d.js:1 V @ main.21360a73aaf5718d.js:1 _next @ main.21360a73aaf5718d.js:1 next @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 _trySubscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 b @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 b @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 (anonymous) @ main.21360a73aaf5718d.js:1 p @ main.21360a73aaf5718d.js:1 subscribe @ main.21360a73aaf5718d.js:1 r @ 23987.6141782ca85a3322.js:1 (anonymous) @ 23987.6141782ca85a3322.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 onInvoke @ main.21360a73aaf5718d.js:1 invoke @ polyfills.37187c61a4a413f6.js:1 run @ polyfills.37187c61a4a413f6.js:1 (anonymous) @ polyfills.37187c61a4a413f6.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 onInvokeTask @ main.21360a73aaf5718d.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 runTask @ polyfills.37187c61a4a413f6.js:1 at @ polyfills.37187c61a4a413f6.js:1 invokeTask @ polyfills.37187c61a4a413f6.js:1 rt @ polyfills.37187c61a4a413f6.js:1 yt @ polyfills.37187c61a4a413f6.js:1 Gt @ polyfills.37187c61a4a413f6.js:1

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It seems like you haven't registered your website for recaptcha, see the screenshot below (sorry it is in Turkish because of my browser settings);

    Which means

    ERROR that the site owner should see: Invalid field for site key

    You need to generate recaptcha key from Google and set it in your appsettings.json file here

  • User Avatar
    0
    flaskone created

    Thank you, its works when I used Recaptcha version 3. Is it possible to use version 2 ? I didn't see any effect when I pushed submit button after setting tenant information. Absolutely nothing happened. I stayed on the same registration page.

  • User Avatar
    0
    ismcagdas created
    Support Team

    I tried to check the app online but, I see the errors below when I visit your app, see screenshot below. We haven't tried current code with Recaptcha version 2. But the problem might be something else.

    If you can access the tenant registration page, could you share the browser console after pressing submit button ?

  • User Avatar
    0
    flaskone created

    The site is working, but then there was some problem with the server.

    Console log after clicking submit button

    and source:

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It seems like this happens when your created recaptcha and used recaptcha versions are different, see https://stackoverflow.com/a/60879868

  • User Avatar
    0
    flaskone created

    OK, thank you, I see that angular code is used recaptcha in 3 versions ( ReCaptchaV3Service ). I will have to do the service in version 2 myself.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks :)