Hi @chrislambertus,
@ericc checked for logs and here is what he got (after thing-ifying it):
info: AccelByte.ExtensionThing.Server.DebugLoggerServerInterceptor[0]
REQUEST Grpc.Core.Metadata
fail: AccelByte.ExtensionThing.Server.DebugLoggerServerInterceptor[0]
Error thrown by /accelbyte.custom.thing.Thingservice/GetThingState.
AccelByte.Sdk.Core.HttpResponseException: {"error":"invalid_client","error_description":"unknown client"}
at AccelByte.Sdk.Api.Iam.Operation.TokenGrantV3.ParseResponse(HttpStatusCode code, String contentType, Stream payload)
at AccelByte.Sdk.Api.Iam.Wrapper.OAuth20.TokenGrantV3(TokenGrantV3 input)
at AccelByte.Sdk.Core.AccelByteSDK.LoginClient(Action`1 onTokenReceived)
at AccelByte.Sdk.Feature.AutoTokenRefresh.Sdk_ExtensionMethods.LoginClient(AccelByteSDK sdk, Boolean autoRefresh, Single refreshThreshold)
at AccelByte.ExtensionThing.Server.DefaultAccelByteServiceProvider..ctor(IConfiguration config, ILogger`1 logger) in /build/Classes/DefaultAccelByteServiceProvider.cs:line 43
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, Boolean isDefaultParameterRequired)
at lambda_method5(Closure , IServiceProvider , Object[] )
at Grpc.AspNetCore.Server.Internal.DefaultGrpcServiceActivator`1.Create(IServiceProvider serviceProvider)
at Grpc.Shared.Server.UnaryServerMethodInvoker`3.ResolvedInterceptorInvoker(TRequest resolvedRequest, ServerCallContext resolvedContext)
at Grpc.Shared.Server.UnaryServerMethodInvoker`3.ResolvedInterceptorInvoker(TRequest resolvedRequest, ServerCallContext resolvedContext)
at AccelByte.ExtensionThing.Server.DebugLoggerServerInterceptor.UnaryServerHandler[TRequest,TResponse](TRequest request, ServerCallContext context, UnaryServerMethod`2 continuation) in /build/Classes/DebugLoggerServerInterceptor.cs:line 32
fail: Grpc.AspNetCore.Server.ServerCallHandler[6]
Error when executing service method 'GetThingState'.
AccelByte.Sdk.Core.HttpResponseException: {"error":"invalid_client","error_description":"unknown client"}
at AccelByte.Sdk.Api.Iam.Operation.TokenGrantV3.ParseResponse(HttpStatusCode code, String contentType, Stream payload)
at AccelByte.Sdk.Api.Iam.Wrapper.OAuth20.TokenGrantV3(TokenGrantV3 input)
at AccelByte.Sdk.Core.AccelByteSDK.LoginClient(Action`1 onTokenReceived)
at AccelByte.Sdk.Feature.AutoTokenRefresh.Sdk_ExtensionMethods.LoginClient(AccelByteSDK sdk, Boolean autoRefresh, Single refreshThreshold)
at AccelByte.ExtensionThing.Server.DefaultAccelByteServiceProvider..ctor(IConfiguration config, ILogger`1 logger) in /build/Classes/DefaultAccelByteServiceProvider.cs:line 43
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
Looking at the logs it seems to be from either an incorrect combination of client ID, client secret, and maybe even an incorrect base URL.
This aligns with your observation:
I checked the AB settings (AccelByte->Edit Settings) and noticed that they were stale, apparently using old client info.
It looks like there’s one client ID and one client secret per service extension. What if we want to use two different service extensions in the same Unity project?
It is also possible to create a confidential IAM client and share it between two (2) service extensions.