Open Closed

DataTables ABPException in AuthServer after upgrading to v8.3.1 #8118


User avatar
0
okains created
  • ABP Framework version: v8.3.1
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server )
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I upgraded to 8.3.1 from v8.2.x using ABP Suite. Upon deploying this code I am getting the following exception thrown on the AuthServer, causing a 400 Error page to show to the user:

4-10-17 07:12:26.032 +00:00 [ERR] Connection ID "16429131441452883878", Request ID "40001fa7-0000-e400-b63f-84710c7967bb": An unhandled exception was thrown by the application. Volo.Abp.AbpException: Could not find file '/libs/datatables.net/js/jquery.dataTables.js' at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.GetFileInfo(IBundlerContext context, String file)

Not sure why it is looking for the jquery.dataTables.js file as that file no longer exists in v2.x of DataTables, it is just dataTables.js now. In any case, I created that file in my libs folder, just copying the dataTables.js file:

And this is deployed:

Yet still getting the exception. My version of DataTables is 2.1.7 :

Not sure if that makes a difference here since this seems to be a bundling issue of some kind.

Any ideas on how to resolve this?

Thanks,

Karim


11 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    please remove yarn.lock and package.json.lock files and run abp bundle to restore new NPM packages.

    Make sure all Volo NPM packages are the 8.3.1 version. (leptonx theme version is 3.3.1)

  • User Avatar
    0
    okains created

    Hi,

    Package.json file is configured OK. But when I run abp bundle on the AuthServer project I am gettting an Unsuported Project Type exception:

    I can see there is a -t param, I tried a few options here, mvc / blazor / blazor-server but got the same exception.

    Any ideas on how to get this to run?

    Thanks,

    Karim

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Sorry, my fault. should be abp install-libs

  • User Avatar
    0
    okains created

    Hi,

    OK I ran that on the AuthServer and Blazor projects. Still getting the same exception on AuthServer:

    Both projects now just have the dataTables.min.js file in libs, which is what you would expect.

    So why are we looking for the jquery.dataTables.js file?

    Volo.Abp.AbpException: Could not find file '/libs/datatables.net/js/jquery.dataTables.js'

    Even if I add this file it isn't picking it up somehow. Any ideas on how to either fix this or a workaround of some sort to get the site up and running?

    Thanks,

    Karim

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Will it work if you run project locally?

  • User Avatar
    0
    okains created

    Hi,

    Yeah it is running locally, when deployed to our test environment I get this exception. I had deployed a few times on v 8.2.x to test without any issues, this just started happening when I upgraded to 8.3.x .

    Thanks,

    Karim

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Does the '/libs/datatables.net/js/jquery.dataTables.js' exist in your test environment?

    You can run the dotnet publish command and check the files under wwwroot folder

  • User Avatar
    0
    okains created

    Hi,

    Yes it did, when I ran abp install-libs it took it out, and left the dataTables.min.js file in there as I mentioned. This is what I would expect.

    Just not clear on why the system is requesting the jquery.dataTables.js file:

    Volo.Abp.AbpException: Could not find file '/libs/datatables.net/js/jquery.dataTables.js'

    As this file has been removed from dataTables in v2.x.

    Here is my local environment, I have added the jquery.dataTables.js file back in :

    And test environment, also added the jquery.dataTables.js file back in :

    Still getting this error. So even though I have added this file it isn't picking it up somehow. Any ideas on how to either fix this or a workaround of some sort to get the site up and running?

    Thanks,

    Karim

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you try to add /libs/datatables.net/js/dataTables.min.js file?

    https://we.tl/t-2XaEpWwcz7

    If still not working, Can you share a test project?

    liming.ma@volosoft.com

    Thanks

  • User Avatar
    0
    okains created

    Hi,

    After going through all of that, I redeployed, not not seeing any reference in the logs anymore to jquery.dataTables.js. And everything is working OK. Not really sure what resolved this, I have the jquery.dataTables.js file in the lib folder the entire time. But OK it is working now, though I wish I knew what fixed it!

    Anyway, thanks for your help. I will close this ticket now.

    Karim

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

Made with ❤️ on ABP v9.1.0-preview. Updated on October 22, 2024, 09:35