musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.21k stars 2.64k forks source link

[MU4 Issue] muse-hub: Unable to save user settings #14108

Closed cesarizu closed 1 year ago

cesarizu commented 1 year ago

Describe the bug When trying to launch muse-hub nothing happens and I just get this on the command line:

2022-10-27 12:15:03.3509|ERROR|Muse.Client.Common.Services.UserSettingsService|Unable to load settings, resetting to default
2022-10-27 12:15:03.4894|ERROR|Muse.Client.Common.Services.UserSettingsService|Unable to save user settings

To Reproduce Steps to reproduce the behavior:

  1. Download muse-hub
  2. Run

Expected behavior muse-hub should open

Screenshots N/A

Platform information

Additional context I tried running muse-hub-service as a user and as root directly and as a systemd service. This are the results:

As user:

2022-10-27 12:19:46.6318|DEBUG|Microsoft.Extensions.Hosting.Internal.Host|Hosting starting
2022-10-27 12:19:46.7115|WARN|Muse.Common.Services.CommonSettingsService|Unable to set setting file permissions: Could not set Unix socket permissions. Status: -1
2022-10-27 12:19:46.7712|INFO|Muse.Service.Interop.ServiceCore|Setting SSL_CERT_DIR to /etc/ssl/certs
2022-10-27 12:19:46.7734|INFO|Muse.Service.Interop.ServiceCore|Setting SSL_CERT_FILE to /etc/ssl/ca-bundle.pem
2022-10-27 12:19:46.7759|INFO|Muse.Service.Interop.ServiceCore|Calling init
2022-10-27 12:19:46.7759|ERROR|Muse.Service.Interop.ServiceCore|Could not write to config file!
2022-10-27 12:19:46.7759|INFO|Muse.Service.Interop.ServiceCore|Initial state callback for: Muse Hub
2022-10-27 12:19:46.7797|DEBUG|Muse.Service.Interop.ServiceCore|[MuseDownloaderInitialStateCallbackHandler] ID: hub, Name: Muse Hub, Item Type: Application, State: Installed, Version: 0.9.7.273
2022-10-27 12:19:46.7797|DEBUG|Muse.Common.Services.MuseHubStateManager|Updating Item State: Type: Application, Id: hub, Name: Muse Hub, Version: 0.9.7.273, Progress: 0, State: Installed, BPS: 0, Seconds Remaining: 0
2022-10-27 12:19:46.8000|ERROR|Muse.Service.Interop.ServiceCore|Couldn't load resume data for Muse Hub from hub.resume
unexpected end of file in bencoded string [bdecode:3]
2022-10-27 12:19:46.8000|INFO|Muse.Service.Services.MuseBackgroundService|Muse Background Service Started!
2022-10-27 12:19:46.8044|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down.
2022-10-27 12:19:46.8044|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Production
2022-10-27 12:19:46.8044|INFO|Microsoft.Hosting.Lifetime|Content root path: /home/cesar/opt/musescore
2022-10-27 12:19:46.8044|DEBUG|Microsoft.Extensions.Hosting.Internal.Host|Hosting started
2022-10-27 12:19:46.8197|INFO|Muse.Service.Services.MuseBackgroundService|Waiting for client to connect...

As root:

2022-10-27 12:20:55.2524|DEBUG|Microsoft.Extensions.Hosting.Internal.Host|Hosting starting
2022-10-27 12:20:55.3343|INFO|Muse.Service.Interop.ServiceCore|Setting SSL_CERT_DIR to /etc/ssl/certs
2022-10-27 12:20:55.3687|INFO|Muse.Service.Interop.ServiceCore|Setting SSL_CERT_FILE to /etc/ssl/ca-bundle.pem
2022-10-27 12:20:55.3687|INFO|Muse.Service.Interop.ServiceCore|Calling init
2022-10-27 12:20:55.3720|INFO|Muse.Service.Interop.ServiceCore|Initial state callback for: Muse Hub
2022-10-27 12:20:55.3720|DEBUG|Muse.Service.Interop.ServiceCore|[MuseDownloaderInitialStateCallbackHandler] ID: hub, Name: Muse Hub, Item Type: Application, State: Installed, Version: 0.9.7.273
2022-10-27 12:20:55.3720|DEBUG|Muse.Common.Services.MuseHubStateManager|Updating Item State: Type: Application, Id: hub, Name: Muse Hub, Version: 0.9.7.273, Progress: 0, State: Installed, BPS: 0, Seconds Remaining: 0
2022-10-27 12:20:55.3895|ERROR|Muse.Service.Interop.ServiceCore|Couldn't load resume data for Muse Hub from hub.resume
unexpected end of file in bencoded string [bdecode:3]
2022-10-27 12:20:55.3917|INFO|Muse.Service.Services.MuseBackgroundService|Muse Background Service Started!
2022-10-27 12:20:55.3917|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down.
2022-10-27 12:20:55.3917|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Production
2022-10-27 12:20:55.3917|INFO|Microsoft.Hosting.Lifetime|Content root path: /root
2022-10-27 12:20:55.3917|DEBUG|Microsoft.Extensions.Hosting.Internal.Host|Hosting started
2022-10-27 12:20:55.4043|INFO|Muse.Service.Services.MuseBackgroundService|Waiting for client to connect...

As systemd service:

Oct 27 12:22:14 kiarostami systemd[1]: Started Muse Hub Helper Service.
Oct 27 12:22:15 kiarostami muse-hub-service[14271]: Stack overflow.
Oct 27 12:22:15 kiarostami muse-hub-service[14271]: Repeat 174519 times:
Oct 27 12:22:15 kiarostami muse-hub-service[14271]: --------------------------------
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher+RunningInstance+WatchedDirectory.Write(System.Text.StringBuilder, Boolean)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]: --------------------------------
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher+RunningInstance+WatchedDirectory.GetPath(Boolean, System.String)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher+RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory, System.String)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher+RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory, System.String)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher+RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory, System.String)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher+RunningInstance..ctor(System.IO.FileSystemWatcher, Microsoft.Win32.SafeHandles.SafeFileHandle, System.String, Boolean, System.IO.NotifyFilters, System.Threading.CancellationToken)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher.StartRaisingEvents()
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(System.String)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(System.String)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b__1_0()
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Primitives.ChangeToken+ChangeTokenRegistration`1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]..ctor(System.Func`1<Microsoft.Extensions.Primitives.IChangeToken>, System.Action`1<System.__Canon>, System.__Canon)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Primitives.ChangeToken.OnChange(System.Func`1<Microsoft.Extensions.Primitives.IChangeToken>, System.Action)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(Microsoft.Extensions.Configuration.FileConfigurationSource)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider..ctor(Microsoft.Extensions.Configuration.Json.JsonConfigurationSource)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(Microsoft.Extensions.Configuration.IConfigurationBuilder)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Microsoft.Extensions.Hosting.HostBuilder.Build()
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Program+<<Main>$>d__0.MoveNext()
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Program+<<Main>$>d__0, Muse.Service, Version=0.9.7.273, Culture=neutral, PublicKeyToken=null]](<<Main>$>d__0 ByRef)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[Program+<<Main>$>d__0, Muse.Service, Version=0.9.7.273, Culture=neutral, PublicKeyToken=null]](<<Main>$>d__0 ByRef)
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Program.<Main>$(System.String[])
Oct 27 12:22:15 kiarostami muse-hub-service[14271]:    at Program.<Main>(System.String[])
Oct 27 12:22:15 kiarostami systemd[1]: muse-hub.service: Main process exited, code=exited, status=134/n/a
Oct 27 12:22:15 kiarostami muse-hub-service[14270]: /usr/bin/muse-hub-service: line 3: 14271 Aborted                 (core dumped) /opt/muse-hub/Muse.Service $@
Oct 27 12:22:15 kiarostami systemd[1]: muse-hub.service: Failed with result 'exit-code'.
cesarizu commented 1 year ago

An update: Running the hub from the command line fails as stated, but running from the launcher it works. I still need to run the muse-hub-service manually as root as the systemd service is not starting as noted on the issue description.

After downloading the Muse Sounds packs they are not showing on MuseScore, but this is probably related to https://github.com/musescore/MuseScore/issues/13934

oktophonie commented 1 year ago

Muse Hub issues are now being handled elsewhere, so will be closed here. If this issue is still valid, please raise it here. You can link to this GitHub issue if it provides useful context or discussion.