MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.17k stars 809 forks source link

Open Movie Database (OMDB API) "Error: Invalid API key!" While getting movie poster. #3013

Closed jbmorgado closed 6 years ago

jbmorgado commented 6 years ago

Can't get the movie poster for a certain movies since OMDB fails in that part with an error message about an Invalid API key.

Using the official Emby docker image emby/embyserver:latest

2017-11-13 00:36:58.607 Info HttpServer: HTTP POST http://emby.server.net:8096/Items/RemoteSearch/Movie. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
2017-11-13 00:36:58.613 Info HttpClient: HttpClientManager GET: https://www.omdbapi.com?apikey=fe53f97e&plot=full&r=json&y=2005&s=Vinicius&type=movie
2017-11-13 00:36:58.740 Info App: MovieDbProvider: Finding id for item: Vinicius
2017-11-13 00:36:58.740 Info HttpClient: HttpClientManager GET: https://api.themoviedb.org/3/search/movie?api_key=f6bd687ffa63cd282b6ff2c6877f2669&query=Vinicius&language=en
2017-11-13 00:36:59.271 Info HttpServer: HTTP Response 200 to 94.60.8.27. Time: 664ms. http://emby.server.dynu.net:8096/Items/RemoteSearch/Movie 
2017-11-13 00:37:04.899 Info HttpServer: HTTP POST http://emby.server.net:8096/Items/RemoteSearch/Apply/0b12d40a0db66aad1a0743299b786af9?ReplaceAllImages=true. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
2017-11-13 00:37:04.904 Info App: Setting provider id's to item 0b12d40a-0db6-6aad-1a07-43299b786af9-Vinicius: {"Tmdb":"74482"}
2017-11-13 00:37:05.261 Info HttpClient: HttpClientManager GET: https://www.omdbapi.com?apikey=fe53f97e&plot=full&r=json&y=2005&t=Vinicius&type=movie
2017-11-13 00:37:05.283 Info HttpClient: HttpClientManager GET: https://img.omdbapi.com/?i=tt0493175&apikey=82e83907
2017-11-13 00:37:05.339 Error App: Error in The Open Movie Database
    *** Error Report ***
    Version: 3.2.36.0
    Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /config -restartpath /usr/lib/emby-server/restart.sh
    Operating system: Unix 4.14.0.3
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: False
    Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Sun Oct  1 17:55:43 UTC 2017)
    Processor count: 2
    Program data path: /config
    Application directory: /usr/lib/emby-server/bin
    System.ArgumentException: Unable to determine image file extension from mime type text/html; charset=utf-8
      at MediaBrowser.Providers.Manager.ImageSaver.GetStandardSavePath (MediaBrowser.Controller.Entities.IHasMetadata item, MediaBrowser.Model.Entities.ImageType type, System.Nullable`1[T] imageIndex, System.String mimeType, System.Boolean saveLocally) [0x0002c] in <cac65bd63e294243bc2c5331c7920343>:0 
      at MediaBrowser.Providers.Manager.ImageSaver.GetSavePaths (MediaBrowser.Controller.Entities.IHasMetadata item, MediaBrowser.Model.Entities.ImageType type, System.Nullable`1[T] imageIndex, System.String mimeType, System.Boolean saveLocally) [0x00016] in <cac65bd63e294243bc2c5331c7920343>:0 
      at MediaBrowser.Providers.Manager.ImageSaver+<SaveImage>d__8.MoveNext () [0x001a0] in <cac65bd63e294243bc2c5331c7920343>:0 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at MediaBrowser.Providers.Manager.ItemImageProvider+<DownloadImage>d__16.MoveNext () [0x0023d] in <cac65bd63e294243bc2c5331c7920343>:0 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at MediaBrowser.Providers.Manager.ItemImageProvider+<RefreshFromProvider>d__11.MoveNext () [0x002de] in <cac65bd63e294243bc2c5331c7920343>:0 
    System.ArgumentException
      at MediaBrowser.Providers.Manager.ImageSaver.GetStandardSavePath (MediaBrowser.Controller.Entities.IHasMetadata item, MediaBrowser.Model.Entities.ImageType type, System.Nullable`1[T] imageIndex, System.String mimeType, System.Boolean saveLocally) [0x0002c] in <cac65bd63e294243bc2c5331c7920343>:0 
      at MediaBrowser.Providers.Manager.ImageSaver.GetSavePaths (MediaBrowser.Controller.Entities.IHasMetadata item, MediaBrowser.Model.Entities.ImageType type, System.Nullable`1[T] imageIndex, System.String mimeType, System.Boolean saveLocally) [0x00016] in <cac65bd63e294243bc2c5331c7920343>:0 
      at MediaBrowser.Providers.Manager.ImageSaver+<SaveImage>d__8.MoveNext () [0x001a0] in <cac65bd63e294243bc2c5331c7920343>:0 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at MediaBrowser.Providers.Manager.ItemImageProvider+<DownloadImage>d__16.MoveNext () [0x0023d] in <cac65bd63e294243bc2c5331c7920343>:0 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
      at MediaBrowser.Providers.Manager.ItemImageProvider+<RefreshFromProvider>d__11.MoveNext () [0x002de] in <cac65bd63e294243bc2c5331c7920343>:0 
LukePulverenti commented 6 years ago

Thanks. Looks like a change we will need to adjust to. For now you might as well just go ahead into Metadata settings and put MovieDb ahead with higher priority. That's what new server installations are doing by default now anyway.

jbmorgado commented 6 years ago

"For now you might as well just go ahead into Metadata settings and put MovieDb ahead with higher priority."

I think that is also an issue although a separate one. I have all other metadata providers ahead of OMDB and yet I still have the issue.

screenshot from 2017-11-14 07-36-41

If I uncheck OMDB from the list then I get no image metadata download at all in Emby.

2017-11-14 07:39:10.082 Info HttpClient: HttpClientManager GET: https://www.omdbapi.com?apikey=fe53f97e&plot=full&r=json&y=2016&s=Zootopia&type=movie
2017-11-14 07:39:10.085 Error HttpClient: Error NameResolutionFailure getting response from https://www.omdbapi.com?apikey=fe53f97e&plot=full&r=json&y=2016&s=Zootopia&type=movie
    *** Error Report ***
    Version: 3.2.36.0
    Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /config -restartpath /usr/lib/emby-server/restart.sh
    Operating system: Unix 4.13.12.1
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: False
    Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Sun Oct  1 17:55:43 UTC 2017)
    Processor count: 2
    Program data path: /config
    Application directory: /usr/lib/emby-server/bin
    System.Net.WebException: Error: NameResolutionFailure
      at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00064] in <5641e4edad4f4464ba58c620a7b8ea48>:0 
      at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x00014] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
    System.Net.WebException
      at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00064] in <5641e4edad4f4464ba58c620a7b8ea48>:0 
      at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x00014] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
LukePulverenti commented 6 years ago

Please discuss an example and attach the complete emby server log, thanks.

LukePulverenti commented 6 years ago

Resolved for next release.