Jump to content

Instant Mix Api - "Value cannot be null" error


sampsonight
 Share

Recommended Posts

Having some trouble determining the parameter I'm missing to successfully call any of the instant mix api endpoints. 

So far each call returns:

 

Value cannot be null.
Parameter name: g

 

 

 

Instant Mix endpoints I've attempted to hit:

 

In addition to a few others. All return the same error.

I can successfully return other API requests, retrieving albums/artists and similar. I have been poking around in the swagger ui from the newest beta build but have not been able to find any specific params. Consumes/produces just state "application/json".

 

Any help on what parameter I'm missing would be greatly appreciated. 

 

Link to comment
Share on other sites

Error in logs: 

2017-09-10 17:26:31.538 Info HttpServer: HTTP GET http://localhost:8096/Albums/d317099909bb0e80e58d835c33c5fa23/InstantMix. UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/60.0.3112.78 Chrome/60.0.3112.78 Safari/537.36
2017-09-10 17:26:31.540 Error HttpServer: Error processing request
	*** Error Report ***
	Version: 3.2.30.14
	Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh
	Operating system: Unix 4.10.0.32
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: False
	Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Tue May  2 22:26:20 UTC 2017)
	Processor count: 8
	Program data path: /var/lib/emby-server
	Application directory: /usr/lib/emby-server/bin
	System.ArgumentNullException: Value cannot be null.
	Parameter name: g
	  at System.Guid..ctor (System.String g) [0x00006] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
	  at Emby.Server.Implementations.Library.UserManager.GetUserById (System.String id) [0x00000] in <9a5ecfeef3ec4bbe84de23b530f30bd0>:0 
	  at MediaBrowser.Api.Music.InstantMixService.Get (MediaBrowser.Api.Music.GetInstantMixFromAlbum request) [0x0001e] in <c15d738a1a5646f9912af921bbab8017>:0 
	  at (wrapper dynamic-method) System.Object:lambda_method (System.Runtime.CompilerServices.Closure,object,object)
	  at Emby.Server.Implementations.Services.ServiceExecGeneral+<Execute>c__async0.MoveNext () [0x000e4] in <9a5ecfeef3ec4bbe84de23b530f30bd0>: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 Emby.Server.Implementations.Services.ServiceHandler+<ProcessRequestAsync>c__async1.MoveNext () [0x0016b] in <9a5ecfeef3ec4bbe84de23b530f30bd0>: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 Emby.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>c__async0.MoveNext () [0x006a6] in <9a5ecfeef3ec4bbe84de23b530f30bd0>:0 
	System.ArgumentNullException
	  at System.Guid..ctor (System.String g) [0x00006] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 
	  at Emby.Server.Implementations.Library.UserManager.GetUserById (System.String id) [0x00000] in <9a5ecfeef3ec4bbe84de23b530f30bd0>:0 
	  at MediaBrowser.Api.Music.InstantMixService.Get (MediaBrowser.Api.Music.GetInstantMixFromAlbum request) [0x0001e] in <c15d738a1a5646f9912af921bbab8017>:0 
	  at (wrapper dynamic-method) System.Object:lambda_method (System.Runtime.CompilerServices.Closure,object,object)
	  at Emby.Server.Implementations.Services.ServiceExecGeneral+<Execute>c__async0.MoveNext () [0x000e4] in <9a5ecfeef3ec4bbe84de23b530f30bd0>: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 Emby.Server.Implementations.Services.ServiceHandler+<ProcessRequestAsync>c__async1.MoveNext () [0x0016b] in <9a5ecfeef3ec4bbe84de23b530f30bd0>: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 Emby.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>c__async0.MoveNext () [0x006a6] in <9a5ecfeef3ec4bbe84de23b530f30bd0>:0 
	

Full log attached. Note I was messing around with URLs and patterns, but the latest call is the non modified instant mix call.

Link to comment
Share on other sites

Add userId as a query string param. Until swagger is fully restored you will not be able to see all of the necessary params, but what you can do on your own is use the chrome debugger to see what the web app is sending up.

  • Like 1
Link to comment
Share on other sites

Gotcha. I initially attempted to see what the web app is sending up but could never seem to find it in the network tab. Either way, adding userId as a query param replied with at 200. Thanks!

 

Request now looks like this in case anyone else runs into this issue:

http://localhost:8096/Albums/d317099909bb0e80e58d835c33c5fa23/InstantMix?userId=3460211960b54181bb9c16e483d9f282
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...