Ombi-app / Ombi

Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
http://ombi.io
GNU General Public License v2.0
3.65k stars 391 forks source link

Updater #1460

Open tidusjar opened 7 years ago

tidusjar commented 7 years ago

Need to finish the Auto updater

tidusjar commented 6 years ago

I need to look into it. I've not had time yet.

On Wed, 10 Jan 2018, 7:07 pm goldenpipes, notifications@github.com wrote:

I wonder whats causing this not to work. it seems like it'd be pretty straightforward.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tidusjar/Ombi/issues/1460#issuecomment-356704372, or mute the thread https://github.com/notifications/unsubscribe-auth/AGVaLHcUuFpPIPFH12TkkfdzojAqp25Zks5tJQp-gaJpZM4ON9MN .

carnivorouz commented 6 years ago

Would be awesome if you could get this ironed out. It's the only thing keeping me on version 3.0.2467 as setting it all up again is too much of a PITA, so waiting until this issue is resolved then hopefully one final reinstall and configure.

tidusjar commented 6 years ago

https://github.com/dotnet/corefx/issues/29085

ghost commented 6 years ago

@tidusjar, smaller self-contained kind of steps to repro would help. i tried reproducing with:

/test1/Program.cs

static void Main(string[] args)
{
  var updaterFile = @"/users/kasper/test2/bin/Debug/netcoreapp2.0/win-x64/publish/test2.exe";
  // for linux
  // var updaterFile = @"/home/kasper/test2/bin/Debug/netcoreapp2.0/linux-x64/publish/test2";
  var start = new ProcessStartInfo
  {
    UseShellExecute = false,
    CreateNoWindow = true,
    FileName = updaterFile
  };
  using (var proc = new Process { StartInfo = start })
  {
    proc.Start();
  }

  Console.WriteLine("hello from test1");
}

where test2 is a hello world published app cd ~ && dotnet new console -n test2 && cd test2 && dotnet publish /p:RuntimeIdentifier=linux-x64 (or win-x64 when building on Windows).

On Linux, I've gotten both hello from test1 and Hello World! (from test2). But on Windows it only showed hello from test1.

Note either in csproj of both apps, add <RuntimeIdentifier>linux-x64</RuntimeIdentifier> or pass /p:RuntimeIdentifier=linux-x64 (or win-x64) to dotnet publish

Tested on .NET Core 2.0 on Windows 10 and Debian stretch

demonbane commented 6 years ago

So I'm not sure what changed, but when I checked for updates today it actually managed to at least run my test script. Here's the parameters it provided:

https://github.com/tidusjar/Ombi/releases/download/v3.0.3293/linux.tar.gz
--applicationPath
/opt/Ombi
--processname
Ombi

Here's my Mono info:

# mono --version
Mono JIT compiler version 5.12.0.226 (tarball Thu May  3 09:48:32 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        Interpreter:   yes
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)

And this is on 3.0.3164.

carnivorouz commented 6 years ago

Trying this now with attempting to get .3293 up to .3304. I see it creates a TempUpdate dir as @mattohm mentioned up above. But it doesn't appear anything further happens after that and it stays on .3293. chmod'd the whole Ombi dir to 777 for testing, didn't help.

demonbane commented 6 years ago

Ok, I managed to get this working with a custom script. A couple of observations:

If anyone would like to try it until Ombi is updated to do it on it's own, here's a gist.

norrisp90 commented 5 years ago

Referencing issues that were caused after running the auto-updater:

2615

1996

iammortimer commented 5 years ago

Issue with the autoupdate on Windows (Server 2019):

fail: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[0] Exception thrown in the OmbiUpdater, see previous messages System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\OMBI\TempUpdate\cypress\'. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.Compression.ZipFileExtensions.ExtractToFile(ZipArchiveEntry source, String destinationFileName, Boolean overwrite) at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.Extract(String zipDir, String tempPath) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 306 at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.Update(PerformContext c) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 204

justinpeterson13 commented 5 years ago

For as long as I can remember I've been stopping the Ombi service in Windows, starting it again in the command line, requesting the update via browser, then starting the Windows service again. Its a long process but nothing else worked for me. Now I get the same error as @iammortimer.

Danknness commented 5 years ago

Issue with the autoupdate on Windows (Server 2019):

fail: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[0] Exception thrown in the OmbiUpdater, see previous messages System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\OMBI\TempUpdate\cypress\'. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.Compression.ZipFileExtensions.ExtractToFile(ZipArchiveEntry source, String destinationFileName, Boolean overwrite) at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.Extract(String zipDir, String tempPath) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 306 at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.Update(PerformContext c) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 204

I am running into this same exact error when trying to update. Can windows users follow some steps to get ombi manually updated to work around this?

iammortimer commented 5 years ago

Issue with the autoupdate on Windows (Server 2019): fail: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[0] Exception thrown in the OmbiUpdater, see previous messages System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\OMBI\TempUpdate\cypress\'. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.Compression.ZipFileExtensions.ExtractToFile(ZipArchiveEntry source, String destinationFileName, Boolean overwrite) at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.Extract(String zipDir, String tempPath) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 306 at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.Update(PerformContext c) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 204

I am running into this same exact error when trying to update. Can windows users follow some steps to get ombi manually updated to work around this?

I just download the newest version and extract it so the same directory

metalcated commented 4 years ago

I get this trying the updater on the latest version.

Aug 15 19:46:12 hostname Ombi[85110]: fail: Ombi.ErrorHandlingMiddleware[0] Aug 15 19:46:12 hostname Ombi[85110]: Something bad happened, ErrorMiddleware caught this Aug 15 19:46:12 hostname Ombi[85110]: Quartz.JobPersistenceException: The job (System.IOmbiAutomaticUpdater) referenced by the trigger does not exist. Aug 15 19:46:12 hostname Ombi[85110]: at Quartz.Simpl.RAMJobStore.StoreTriggerInternal(IOperableTrigger newTrigger, Boolean replaceExisting) Aug 15 19:46:12 hostname Ombi[85110]: at Quartz.Simpl.RAMJobStore.StoreTrigger(IOperableTrigger newTrigger, Boolean replaceExisting, CancellationToken cancellationToken) Aug 15 19:46:12 hostname Ombi[85110]: at Quartz.Core.QuartzScheduler.TriggerJob(JobKey jobKey, JobDataMap data, CancellationToken cancellationToken) Aug 15 19:46:12 hostname Ombi[85110]: at Ombi.Schedule.OmbiQuartz.TriggerJob(String jobName, String group) in C:\projects\requestplex\src\Ombi.Schedule\OmbiQuartz.cs:line 79 Aug 15 19:46:12 hostname Ombi[85110]: at Ombi.Controllers.JobController.ForceUpdate() in C:\projects\requestplex\src\Ombi\Controllers\JobController.cs:line 41 Aug 15 19:46:12 hostname Ombi[85110]: at lambda_method(Closure , Object ) Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync() Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync() Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync() Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter() Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context) Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync() Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync() Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) Aug 15 19:46:12 hostname Ombi[85110]: at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.Invoke(HttpContext httpContext) Aug 15 19:46:12 hostname Ombi[85110]: at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext) Aug 15 19:46:12 hostname Ombi[85110]: at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context) Aug 15 19:46:12 hostname Ombi[85110]: at Ombi.ApiKeyMiddlewear.Invoke(HttpContext context) in C:\projects\requestplex\src\Ombi\ApiKeyMiddlewear.cs:line 51 Aug 15 19:46:12 hostname Ombi[85110]: at Ombi.ErrorHandlingMiddleware.Invoke(HttpContext context) in C:\projects\requestplex\src\Ombi\ErrorHandlingMiddlewear.cs:line 24

tucker19 commented 3 years ago

I am still seeing the same error with TempUpdate/cypress directory missing on my Windows as well. I keep having to update manually.

Abhi441 commented 1 year ago

I want fix this bugs

Yw0ke commented 2 months ago

image Yo wtf, the exe file version of the auto updater script is actually infected ?!

Unimatrix0 commented 2 months ago

image Yo wtf, the exe file version of the auto updater script is actually infected ?!

@Yw0ke, Where did you get this Get-OmbiUpdate.exe? We don't have any file with that name in the package. Also, please don't hijack existing issues. If this is actually in the current version of Ombi, open a new issue.

Yw0ke commented 2 months ago

@Unimatrix0 Sorry I thought this was the thread about the updater. I downlaoded it from the official Ombi doc -> Updating -> External Script (Windows) ; and renamed it ; https://docs.ombi.app/guides/updating/#manual-updates image Should I open another issue ?

Unimatrix0 commented 2 months ago

@Unimatrix0 Sorry I thought this was the thread about the updater. I downlaoded it from the official Ombi doc -> Updating -> External Script (Windows) ; and renamed it ; https://docs.ombi.app/guides/updating/#manual-updates image Should I open another issue ?

Yes, but not in this project, as it's unrelated. Post it in https://github.com/Ombi-app/Ombi.Docs/ I will note that this is definitely a false positive, the updater exe is simply a packaged version of the PowerShell script.

Yw0ke commented 2 months ago

Oh ok my bad. Thanks @Unimatrix0