Open Closed

No BLOB Storage provider was registered and cli add-module fails #1569


0
[email protected] created
  • ABP Framework version: v4.4.0 RC2
  • UI type: MVC
  • DB provider: EF Core (Unified)
  • Tiered (MVC) or Identity Server Separated (Angular): Tiered
  • Exception message and stack trace:

Volo.Abp.AbpException: No BLOB Storage provider was registered! At least one provider must be registered to be able to use the Blog Storing System. at Volo.Abp.BlobStoring.DefaultBlobProviderSelector.Get(String containerName) at Volo.Abp.BlobStoring.BlobContainerFactory.Create(String name) at Volo.Abp.BlobStoring.BlobContainerFactoryExtensions.Create[TContainer](IBlobContainerFactory blobContainerFactory) at Volo.Abp.BlobStoring.BlobContainer`1..ctor(IBlobContainerFactory blobContainerFactory) at lambda_method1856(Closure , Object[] ) at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()

  • Steps to reproduce the issue:"
  1. Start with a tiered MVC unified EFCore project, like https://community.abp.io/articles/unifying-dbcontexts-for-ef-core-removing-the-ef-core-migrations-project-nsyhrtna
  2. Attempt to add the module for db blob storage:

C:\Users\kfrancis\Projects\MysteryProject\aspnet-core>abp add-module Volo.Abp.BlobStoring.Database [16:16:40 INF] ABP CLI (https://abp.io) [16:16:41 INF] Version 4.4.0-rc.2 (Prerelease) [16:16:42 INF] Installing module 'Volo.Abp.BlobStoring.Database' to the solution 'MysteryProject' Build started... Build failed. Use dotnet build to see the errors. Reinforced.Typings.settings.xml : warning : Reinforced.Typings will not run because it is disabled in its configuration [C:\Users\kfrancis\Projects\MysteryProject\aspnet-core\src\MysteryProject.Domain.Shared\MysteryProject.Domain.Shared.csproj] [16:16:51 INF] Started database migrations... [16:16:51 INF] Migrating schema for host database... [16:16:52 INF] Executing host database seed... [16:16:55 INF] Successfully completed host database migrations. [16:16:55 INF] Executing default tenant database seed... [16:16:55 INF] Successfully completed default tenant database migrations. [16:16:55 INF] Successfully completed all database migrations. [16:16:55 INF] You can safely end this process...

  1. Attempt to add it manuallly, but the tables related to the database storage aren't being added when I do add-migration

11 Answer(s)
  • 0
    [email protected] created

    dotnet build runs without error as well, so the abp add-module failure I can't figure out why it's failing. There's no verbose mode for the add-module command.

  • 0
    liangshiwei created
    Support Team

    Hi,

    I will check it out.

  • 0
    liangshiwei created
    Support Team

    Hi,

    I can't reproduce the problem, can you share a project to reproduce? thanks. [email protected]

  • 0
    kfran[email protected] created

    So, I've been trying to re-create the issue but I haven't yet found a set of steps useful.

    I'm wondering if it's due to us adding the CmsPro kit module before this. Is there an order that is important?

  • 0
    liangshiwei created
    Support Team

    Hi,

    Seems you need to add the module manually.

    Install

    Volo.Abp.BlobStoring.Database.Domain.Shared, Volo.Abp.BlobStoring.Database.Domain Volo.Abp.BlobStoring.EntityFrameworkCore

    to Domain.Shared, Domain and EntityFrameworkCore project.

    [DependsOn(typeof(BlobStoringDatabaseDomainModule))]
    public class ...DomainModule : AbpModule
        ....
    
    [DependsOn(typeof(BlobStoringDatabaseEntityFrameworkCoreModule))]
    public class ...EntityFrameworkCoreModule : AbpModule
        ....
    

    Open ...DbContext class

    protected override void OnModelCreating(ModelBuilder builder)
    {
        .......
    
        builder.ConfigureBlobStoring();
    }
    

    Then Add & Apply migrations.

  • 0
    [email protected] created

    All of those things are in place, and I've done them again with no success. Also, when I go to add a migration - it's empty and I can see that it's because the blob related tables are in from when I added CmsKitPro.

    Can I email you? Since I can't produce this on a new project.

  • 0
    [email protected] created

    Here's the related code:

    Domain

    [DependsOn(
            typeof(CabMDDomainSharedModule),
            typeof(AbpAuditLoggingDomainModule),
            typeof(AbpBackgroundJobsDomainModule),
            typeof(AbpFeatureManagementDomainModule),
            typeof(AbpIdentityProDomainModule),
            typeof(AbpPermissionManagementDomainIdentityModule),
            typeof(AbpIdentityServerDomainModule),
            typeof(AbpPermissionManagementDomainIdentityServerModule),
            typeof(AbpSettingManagementDomainModule),
            typeof(SaasDomainModule),
            typeof(TextTemplateManagementDomainModule),
            typeof(LeptonThemeManagementDomainModule),
            typeof(LanguageManagementDomainModule),
            typeof(VoloAbpCommercialSuiteTemplatesModule),
            typeof(AbpEmailingModule),
            typeof(BlobStoringDatabaseDomainModule),
            typeof(AbpPaymentDomainModule),
            typeof(AbpPaymentPayuDomainModule),
            typeof(AbpPaymentTwoCheckoutDomainModule),
            typeof(FileManagementDomainModule), 
            typeof(DocsDomainModule),
            typeof(CmsKitProDomainModule)
            )]
        public class CabMDDomainModule : AbpModule
        {
            // lots of code
        }
    

    EfCore (Unified)

    [DependsOn(
            typeof(CabMDDomainModule),
            typeof(AbpIdentityProEntityFrameworkCoreModule),
            typeof(AbpIdentityServerEntityFrameworkCoreModule),
            typeof(AbpPermissionManagementEntityFrameworkCoreModule),
            typeof(AbpSettingManagementEntityFrameworkCoreModule),
            typeof(AbpEntityFrameworkCoreSqlServerModule),
            typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
            typeof(AbpAuditLoggingEntityFrameworkCoreModule),
            typeof(AbpFeatureManagementEntityFrameworkCoreModule),
            typeof(LanguageManagementEntityFrameworkCoreModule),
            typeof(SaasEntityFrameworkCoreModule),
            typeof(TextTemplateManagementEntityFrameworkCoreModule),
            typeof(BlobStoringDatabaseEntityFrameworkCoreModule),
            typeof(AbpPaymentEntityFrameworkCoreModule),
            typeof(FileManagementEntityFrameworkCoreModule),
            typeof(DocsEntityFrameworkCoreModule),
            typeof(CmsKitProEntityFrameworkCoreModule)
            )]
        public class CabMDEntityFrameworkCoreModule : AbpModule
        {
            // lots of code
        }
    

    Unified DbContext:

    protected override void OnModelCreating(ModelBuilder builder)
            {
                base.OnModelCreating(builder);
    
                /* Include modules to your migration db context */
    
                builder.ConfigurePermissionManagement();
                builder.ConfigureSettingManagement();
                builder.ConfigureBackgroundJobs();
                builder.ConfigureAuditLogging();
                builder.ConfigureIdentityPro();
                builder.ConfigureIdentityServer();
                builder.ConfigureFeatureManagement();
                builder.ConfigureLanguageManagement();
                builder.ConfigureSaas();
                builder.ConfigureTextTemplateManagement();
                builder.ConfigureCmsKitPro();
                builder.ConfigureBlobStoring();
                builder.ConfigurePayment();
                builder.ConfigureFileManagement();
                builder.ConfigureDocs();
    
                /* Configure the shared tables (with included modules) here */
    
                //builder.Entity<IdentityUser>(b =>
                //{
                //    b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Users"); //Sharing the same table "AbpUsers" with the IdentityUser
    
                //    b.ConfigureByConvention();
                //    b.ConfigureAbpUser();
    
                //    /* Configure mappings for your additional properties.
                //     * Also see the CabMDEfCoreEntityExtensionMappings class.
                //     */
                //});
    
                /* Configure your own tables/entities inside the ConfigureCabMD method */
    
                builder.ConfigureCabMD();
            }
    

    I'll note also that the abp suite refuses to bring up modules and the abp add-module command says it's failing but provides no information. Is there a way to get more verbose information from the CLI there?

  • 0
    albert created
    Support Team

    can you check out this https://support.abp.io/QA/Questions/529/ABP-Upgrade-from-310-to-330#answer-0d9caf26-c6bd-b4f8-30cd-39f8a0144ec0

  • 0
    ServiceBot created
    Support Team

    This question has been automatically marked as stale because it has not had recent activity.

  • 0
    [email protected] created

    The issue still persists and we're on v5.0.0 RC1 now. The last article made no difference either, all of those things were already in place.

  • 0
    gterdem created
    Support Team

    Can you provide steps to reproduce the problem?