rhenium2 / MyHeliumCat

MyHeliumCat - Helium hotspot utility (beacon stats, hotspot directions, etc.)
MIT License
5 stars 1 forks source link

Access to Cache.db is denied #5

Closed egamitilps closed 2 years ago

egamitilps commented 2 years ago

Ive installed HeliumCat on a web app service in azure. My first query using any of the commands (front, radius, etc.) I get results output.

Subsequent commands though result in the following error: Unhandled exception. System.TypeInitializationException: The type initializer for 'HeliumCat.Services.CacheService' threw an exception. ---> System.UnauthorizedAccessException: Access to the path 'D:\home\site\wwwroot\cache.db' is denied. at System.IO.Strategies.FileStreamHelpers.FlushToDisk(SafeFileHandle handle) at System.IO.Strategies.BufferedFileStreamStrategy.Flush(Boolean flushToDisk) at System.IO.FileStream.Flush(Boolean flushToDisk) at LiteDB.StreamExtensions.FlushToDisk(Stream stream) at LiteDB.Engine.DiskService.Write(IEnumerable 1 pages, FileOrigin origin) at LiteDB.Engine.WalIndexService.CheckpointInternal() at LiteDB.Engine.WalIndexService.Checkpoint() at LiteDB.Engine.LiteEngine.Rebuild(RebuildOptions options) at LiteDB.LiteDatabase.Rebuild(RebuildOptions options) at HeliumCat.Services.CacheService..ctor() at HeliumCat.Services.CacheService..cctor() --- End of inner exception stack trace --- at HeliumCat.Services.HotspotService.GetHotspotByName(String name) at HeliumCat.Commands.Commands.GetHotspotByIdentifier(String identifier) at HeliumCat.Commands.Commands.RadiusBeaconStats(RadiusOptions options) at Program.<>c.<<<Main>$>b__0_1>d.MoveNext() --- End of stack trace from previous location --- at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult1 result, Func2 action) at Program.<Main>$(String[] args) at Program.<Main>(String[] args)

If I delete cache.db, rerun my query \ cmd, then I get results again. FWIW, i'm using AzureDevOps to perform a deployment to the app service using zip deploy

rhenium2 commented 2 years ago

Thanks for reporting this. Do you upload cache.db file as well ?

It might be a good idea to run a command first on your local machine so that it creates the cache.db file. Then upload all the files (including cache.db) to azure.