codingteam / emulsion

XMPP ↔ Telegram bridge
MIT License
33 stars 3 forks source link

.net error when trying to run emulsion #175

Closed CeVladimirich closed 1 year ago

CeVladimirich commented 1 year ago

Server: Debian 11, .NET Runtime 6.0 I'm installing on a server for the first time. When trying to run the command dotnet run --project ./Emulsion emulsion.json an error

Unhandled exception. System.ArgumentException: The path must be absolute. (Parameter 'root')
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root)
   at Microsoft.Extensions.Configuration.FileConfigurationExtensions.SetBasePath(IConfigurationBuilder builder, String basePath)
   at Emulsion.Program.getConfiguration(String directory, String fileName) in /home/www-user/emulsion/Emulsion/Program.fs:line 20
   at Emulsion.Program.main(String[] _arg1) in /home/www-user/emulsion/Emulsion/Program.fs:line 121
ForNeVeR commented 1 year ago

Ow, it turns out that Emulsion requires an absolute path to emulsion.json in the arguments right now. Try passing it as absolute (/home/www-user/emulsion/Emulsion/emulsion.json, I presume), or try omitting it: the ./emulsion.json is used by default anyway.

This is not intended, of course, and I'll fix it soon. Let me know if you want a release with this fix on Docker Hub ASAP (if not, then the fix will be included into the next release, which is not planned, yet, at this point).

CeVladimirich commented 1 year ago

Try passing it as absolute (/home/www-user/emulsion/Emulsion/emulsion.json, I presume), or try omitting it: the ./emulsion.json is used by default anyway

It works! Thanks.