Base solution for your next web application
Open Closed

Social Logins Failing on New Build #2789


User avatar
0
robdocherty created

Hi there I'm getting the "An internal error occurred during your request!" popup from the Angular 2 app whenever I run it against either of the two available social logins using the latest build. When I first purchased the product a few weeks ago, this was working OK (or it was working with the asp boilerplate download - cant remember which but definitely was not an issue with my fb setup) but seems not to be working on the latest build. Are you able to check this please? How can we troubleshoot this issue? Also, on the facebook auth settings should the site URL be <a class="postlink" href="http://localhost:22742/">http://localhost:22742/</a> or <a class="postlink" href="http://localhost:4200/">http://localhost:4200/</a>? ie, is the angular app making the facebook request or the .core app? Thanks


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

    Hi,

    First you can check Logs.txt file under *.Host project to see a detailed error message. Then we can try to fix it according to error message.

    Thanks.

  • User Avatar
    0
    robdocherty created

    log details for the transaction shown below. cheers rob

    INFO 2017-03-28 11:39:02,797 [23 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS <a class="postlink" href="http://localhost:22742/api/TokenAuth/ExternalAuthenticate">http://localhost:22742/api/TokenAuth/Ex ... thenticate</a>
    DEBUG 2017-03-28 11:39:02,797 [23 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL3LC41UQD7M" completed keep alive response. INFO 2017-03-28 11:39:02,797 [23 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 0.2546ms 204 INFO 2017-03-28 11:39:02,933 [9 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST <a class="postlink" href="http://localhost:22742/api/TokenAuth/ExternalAuthenticate">http://localhost:22742/api/TokenAuth/Ex ... thenticate</a> application/json; charset=UTF-8 270 DEBUG 2017-03-28 11:39:02,933 [9 ] NetCore.StaticFiles.StaticFileMiddleware - POST requests are not supported DEBUG 2017-03-28 11:39:02,933 [9 ] osoft.AspNetCore.Routing.Tree.TreeRouter - Request successfully matched the route with name '(null)' and template 'api/TokenAuth/ExternalAuthenticate'. DEBUG 2017-03-28 11:39:02,937 [9 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action tiktok.Web.Controllers.TokenAuthController.ExternalAuthenticate (tiktok.Web.Core) DEBUG 2017-03-28 11:39:02,972 [9 ] Mvc.ModelBinding.Binders.BodyModelBinder - Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter' for content type 'application/json; charset=UTF-8'. WARN 2017-03-28 11:39:02,974 [9 ] Abp.MultiTenancy.TenantResolver - System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at Abp.AspNetCore.MultiTenancy.DomainTenantResolveContributor.ResolveTenantId() at Abp.MultiTenancy.TenantResolver.GetTenantIdFromContributors() System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at Abp.AspNetCore.MultiTenancy.DomainTenantResolveContributor.ResolveTenantId() at Abp.MultiTenancy.TenantResolver.GetTenantIdFromContributors() INFO 2017-03-28 11:39:02,975 [9 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method tiktok.Web.Controllers.TokenAuthController.ExternalAuthenticate (tiktok.Web.Core) with arguments (tiktok.Web.Models.TokenAuth.ExternalAuthenticateModel) - ModelState is Valid ERROR 2017-03-28 11:39:02,985 [15 ] Mvc.ExceptionHandling.AbpExceptionFilter - Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) System.IO.FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at System.Net.Http.WinHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetAsync(String requestUri) at tiktok.Web.Authentication.External.Facebook.FacebookAuthProviderApi.<GetUserInfo>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at tiktok.Web.Controllers.TokenAuthController.<GetExternalUserInfo>d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at tiktok.Web.Controllers.TokenAuthController.<ExternalAuthenticate>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.<CastToObject>d__40`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.

    WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    DEBUG 2017-03-28 11:39:02,986 [15 ] ore.Mvc.Internal.ControllerActionInvoker - Request was short circuited at exception filter 'Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter'. DEBUG 2017-03-28 11:39:02,987 [15 ] etCore.Mvc.Internal.ObjectResultExecutor - Could not find an output formatter based on content negotiation. Accepted types were (application/json; charset=UTF-8) DEBUG 2017-03-28 11:39:02,987 [15 ] etCore.Mvc.Internal.ObjectResultExecutor - Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter' and content type 'application/json' to write the response. INFO 2017-03-28 11:39:02,987 [15 ] etCore.Mvc.Internal.ObjectResultExecutor - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. INFO 2017-03-28 11:39:02,987 [15 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action tiktok.Web.Controllers.TokenAuthController.ExternalAuthenticate (tiktok.Web.Core) in 49.652ms DEBUG 2017-03-28 11:39:02,987 [15 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL3LC41UQD7M" completed keep alive response. INFO 2017-03-28 11:39:02,987 [15 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 54.5456ms 500 application/json; charset=utf-8

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It seems like app is not able to find related tenant for social login. Which version of ABP do you use on your projet ? Also can you share configs for host and client apps ?

    Client app redirects you to facebook but as far as I know Facebook does not check port number, so adding localhost for your facebook app should be enough.

  • User Avatar
    0
    robdocherty created

    Hi - ABP is per the latest version of aspnetzero (3.3) on the 14th march. i am using the angular 2 front end. I tried with host set to allow new users to register and without. same error each time. what other details can i give you to help?

    also, what is supposed to happen when you click the social login and the tenant does not allow user accounts to be created? is there any provision anywhere to associate a social login with an existing user account?

    thanks.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    In that case, social login buttons should not be visible. Please send your project to <a href="mailto:[email protected]">[email protected]</a> and we will take a look at it locally.

    Thanks.