Open Closed

File-Management - Not downloading files #2069


User avatar
0
Rrader30 created
  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Identity Server Separated (Angular)
  • Exception message and stack trace:

This site can’t be reachedThe webpage at https://localhost:44350/api/file-management/file-descriptor/download/ee301db0-5092-0437-3545-39ffeeafb36e?token=752f06c9-3310-43b5-8a8f-3b34cb52cae1 might be temporarily down or it may have moved permanently to a new web address. ERR_INVALID_RESPONSE

  • Steps to reproduce the issue:" Upload File to File management, click on or download file and get this error.

I installed File-Management component to my project. When I upload a file things work fine. When I go to download or simply click on file name I get the error

This site can’t be reachedThe webpage at https://localhost:44350/api/file-management/file-descriptor/download/ee301db0-5092-0437-3545-39ffeeafb36e?token=752f06c9-3310-43b5-8a8f-3b34cb52cae1 might be temporarily down or it may have moved permanently to a new web address. ERR_INVALID_RESPONSE

If you go to the backend service and manually run it through SWAG the file appears to be corrupt.

Here is the log file entries

2021-11-01 17:11:38 ::1 GET /api/file-management/file-descriptor/download/e4bd11f8-341c-79ca-1e21-39ffee85d537 token=ddb88a0b-e5c0-4ce2-97ed-30149c796e90 44350 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/95.0.4638.54+Safari/537.36 http://localhost:4200/ 406 0 0 62 2021-11-01 17:11:39 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:11:49 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:11:59 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:12:09 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:12:19 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:12:29 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:12:39 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:12:49 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:12:59 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:13:09 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:13:19 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:13:29 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:13:39 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:13:49 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:13:59 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:14:10 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:14:20 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:14:30 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:14:40 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:14:50 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:15:00 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:15:10 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:15:20 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:15:30 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:15:40 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:15:50 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:16:00 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:16:10 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 8 2021-11-01 17:16:20 ::1 GET /health-status - 44350 - ::1 - - 200 0 0 9 2021-11-01 17:16:23 ::1 GET /api/file-management/file-descriptor/download/e4bd11f8-341c-79ca-1e21-39ffee85d537 token=ddb88a0b-e5c0-4ce2-97ed-30149c796e90 44350 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/95.0.4638.54+Safari/537.36 http://localhost:4200/ 406 0 0 63

My next question is, is there a way to use this component within another component? If so, how would you do this with Angular?


5 Answer(s)
  • User Avatar
    0
    Rrader30 created

    I just noticed in the audit logs this error. I checked the authorizations and admin seems to have everything granted to it. So not sure why the error

             [
    

    { "code": null, "message": "Invalid download token: fffe6dc3-27a4-46f5-aa25-00f0e1869c3a", "details": "AbpAuthorizationException: Invalid download token: fffe6dc3-27a4-46f5-aa25-00f0e1869c3a\r\nSTACK TRACE: at Volo.FileManagement.Files.FileDescriptorAppService.DownloadAsync(Guid id, String token)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)\r\n at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Volo.FileManagement.Files.FileDescriptorController.DownloadAsync(Guid id, String token)\r\n at lambda_method3262(Closure , Object )\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n", "data": null, "validationErrors": null }, { "code": null, "message": "Invalid download token: fffe6dc3-27a4-46f5-aa25-00f0e1869c3a", "details": "AbpAuthorizationException: Invalid download token: fffe6dc3-27a4-46f5-aa25-00f0e1869c3a\r\nSTACK TRACE: at Volo.FileManagement.Files.FileDescriptorAppService.DownloadAsync(Guid id, String token)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)\r\n at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Volo.FileManagement.Files.FileDescriptorController.DownloadAsync(Guid id, String token)\r\n at lambda_method3262(Closure , Object )\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n", "data": null, "validationErrors": null } ]

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce the problem, can you share a simple project to reproduce? thanks. shiwei.liang@volosoft.com

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    The project you provided is complex, I actually can't build solution, can you use suite to create a new project to reproduce it? thanks.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I tried the project you provided, there is no error. I can upload and download the file.

    Can you share the full logs? and what file type you uploaded?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Solved, you should use the latest version of redis

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09