Skip to content

Can't install if /umbraco/Data is missing #19948

@skttl

Description

@skttl

Which Umbraco version are you using?

16.1.1

Bug summary

Can we make the unattend install function a bit friendlier? When /umbraco/Data is missing, the unattended install fails to create the sqlite database file.

Specifics

If I don't have the /umbraco/Data folder (eg. if I just cloned a project, and no files in that folder were committed), my project fails to start giving me this error:

DirectoryNotFoundException: Could not find a part of the path 'C:\Workspaces\Website\umbraco\Data\Umbraco.sqlite.db'.
System.IO.FileSystem.CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
Umbraco.Cms.Persistence.Sqlite.Services.SqliteDatabaseCreator.Create(string connectionString)
Umbraco.Cms.Infrastructure.Persistence.DbProviderFactoryCreator.CreateDatabase(string providerName, string connectionString)
Umbraco.Cms.Infrastructure.Install.UnattendedInstaller.HandleAsync(RuntimeUnattendedInstallNotification notification, CancellationToken cancellationToken)
Umbraco.Cms.Core.Events.INotificationAsyncHandler<TNotification>.HandleAsync(IEnumerable<TNotification> notifications, CancellationToken cancellationToken)
Umbraco.Cms.Core.Events.EventAggregator.PublishCoreAsync<TNotification>(IEnumerable<Func<IEnumerable<TNotification>, CancellationToken, Task>> allHandlers, IEnumerable<TNotification> notifications, CancellationToken cancellationToken)
Umbraco.Cms.Core.Events.NotificationAsyncHandlerWrapperImpl<TNotificationType>.HandleAsync<TNotification, TNotificationHandler>(IEnumerable<TNotification> notifications, CancellationToken cancellationToken, ServiceFactory serviceFactory, Func<IEnumerable<Func<IEnumerable<TNotification>, CancellationToken, Task>>, IEnumerable<TNotification>, CancellationToken, Task> publish)
Umbraco.Cms.Core.Events.EventAggregator.PublishNotificationsAsync<TNotification, TNotificationHandler>(IEnumerable<TNotification> notifications, CancellationToken cancellationToken)
Umbraco.Cms.Core.Events.EventAggregator.PublishAsync<TNotification, TNotificationHandler>(IEnumerable<TNotification> notifications, CancellationToken cancellationToken)
Umbraco.Cms.Core.Events.EventAggregator.PublishAsync<TNotification>(TNotification notification, CancellationToken cancellationToken)
Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken, bool isRestarting)
Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken)
Umbraco.Extensions.WebApplicationExtensions.BootUmbracoAsync(WebApplication app)
Program.<Main>$(string[] args) in Program.cs
+
await app.BootUmbracoAsync();
Program.<Main>(string[] args)

Steps to reproduce

  • Create a new umbraco project
  • "Mimic" having it cloned from git, by removing the /umbraco/Data folder, as its content is usually ignored in git
  • Try to start the project with unattended install enabled
  • Watch it fail creating the database.

Expected result / actual result

I would expect it to be able to create the folders it needs.


This item has been added to our backlog AB#55974

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions