Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Azure function Isolated process give runtime error #5580

Closed
1 task done
erandac opened this issue Dec 4, 2022 · 1 comment · Fixed by #5581
Closed
1 task done

Running on Azure function Isolated process give runtime error #5580

erandac opened this issue Dec 4, 2022 · 1 comment · Fixed by #5581
Labels
🐛 bug Something isn't working 🌶️ hot chocolate

Comments

@erandac
Copy link

erandac commented Dec 4, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Latest prerelease (13.0.0-preview.84) Running with Azure function Isolated process not working the minimal application comes with the template. have tried my prerelease version but didn't able to make the application working on any except 13.0.0-preview.51

Steps to reproduce

  1. Get the latest (13.0.0-preview.84) prerelease example template
    dotnet new -i HotChocolate.Templates::13.0.0-preview.84
  2. Create minimal sample app from the template
    dotnet new graphql-azf-ip
  3. start the function
    func start
  4. Request to the url

Relevant log output

Azure Functions Core Tools
Core Tools Version:       4.0.4829 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.11.2.19273

[2022-12-04T18:11:22.991Z] Found /Users/erandac/Development/NewCMS/AzfTest/AzfTest.csproj. Using for user secrets file configuration.

Functions:

        GraphQLHttpFunction: [GET,POST] http://localhost:7071/api/graphql/{**slug}

For detailed output, run func with --verbose flag.
[2022-12-04T18:11:26.714Z] Worker process started and initialized.
[2022-12-04T18:11:30.974Z] Host lock lease acquired by instance ID '000000000000000000000000D44E3CD8'.
[2022-12-04T18:12:12.727Z] Executing 'Functions.GraphQLHttpFunction' (Reason='This function was programmatically called via the host APIs.', Id=e6f2135a-ef5d-47fa-af65-7e916bb62090)
[2022-12-04T18:12:13.018Z] Executed 'Functions.GraphQLHttpFunction' (Failed, Id=e6f2135a-ef5d-47fa-af65-7e916bb62090, Duration=327ms)
[2022-12-04T18:12:13.018Z] System.Private.CoreLib: Exception while executing function: Functions.GraphQLHttpFunction. System.Private.CoreLib: Result: Failure
[2022-12-04T18:12:13.018Z] Exception: System.NullReferenceException: Object reference not set to an instance of an object.
[2022-12-04T18:12:13.018Z]    at lambda_method2(Closure , IServiceProvider , RequestDelegate )
[2022-12-04T18:12:13.018Z]    at HotChocolate.AzureFunctions.PipelineBuilder.Compile(IServiceProvider services)
[2022-12-04T18:12:13.018Z]    at Microsoft.Extensions.DependencyInjection.HotChocolateAzureFunctionServiceCollectionExtensions.<>c__DisplayClass1_0.<AddAzureFunctionsGraphQLRequestExecutorDependency>b__0(IServiceProvider sp)
[2022-12-04T18:12:13.018Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
[2022-12-04T18:12:13.018Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
[2022-12-04T18:12:13.018Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
[2022-12-04T18:12:13.019Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
[2022-12-04T18:12:13.019Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
[2022-12-04T18:12:13.019Z]    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
[2022-12-04T18:12:13.019Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
[2022-12-04T18:12:13.019Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
[2022-12-04T18:12:13.019Z]    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
[2022-12-04T18:12:13.019Z]    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
[2022-12-04T18:12:13.019Z]    at Microsoft.Azure.Functions.Worker.DefaultFunctionActivator.CreateInstance(Type instanceType, FunctionContext context) in D:\a\1\s\src\DotNetWorker.Core\Invocation\DefaultFunctionActivator.cs:line 23
[2022-12-04T18:12:13.019Z]    at Microsoft.Azure.Functions.Worker.Invocation.DefaultFunctionInvoker`2.CreateInstance(FunctionContext context) in D:\a\1\s\src\DotNetWorker.Core\Invocation\DefaultFunctionInvoker.cs:line 26
[2022-12-04T18:12:13.019Z]    at Microsoft.Azure.Functions.Worker.Invocation.DefaultFunctionExecutor.ExecuteAsync(FunctionContext context) in D:\a\1\s\src\DotNetWorker.Core\Invocation\DefaultFunctionExecutor.cs:line 27
[2022-12-04T18:12:13.019Z]    at Microsoft.Azure.Functions.Worker.OutputBindings.OutputBindingsMiddleware.Invoke(FunctionContext context, FunctionExecutionDelegate next) in D:\a\1\s\src\DotNetWorker.Core\OutputBindings\OutputBindingsMiddleware.cs:line 13
[2022-12-04T18:12:13.020Z]    at Microsoft.Azure.Functions.Worker.GrpcWorker.InvocationRequestHandlerAsync(InvocationRequest request, IFunctionsApplication application, IInvocationFeaturesFactory invocationFeaturesFactory, ObjectSerializer serializer, IOutputBindingsInfoProvider outputBindingsInfoProvider) in D:\a\1\s\src\DotNetWorker.Grpc\GrpcWorker.cs:line 167
[2022-12-04T18:12:13.020Z] Stack:    at lambda_method2(Closure , IServiceProvider , RequestDelegate )
[2022-12-04T18:12:13.020Z]    at HotChocolate.AzureFunctions.PipelineBuilder.Compile(IServiceProvider services)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.HotChocolateAzureFunctionServiceCollectionExtensions.<>c__DisplayClass1_0.<AddAzureFunctionsGraphQLRequestExecutorDependency>b__0(IServiceProvider sp)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
[2022-12-04T18:12:13.020Z]    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
[2022-12-04T18:12:13.020Z]    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
[2022-12-04T18:12:13.020Z]    at Microsoft.Azure.Functions.Worker.DefaultFunctionActivator.CreateInstance(Type instanceType, FunctionContext context) in D:\a\1\s\src\DotNetWorker.Core\Invocation\DefaultFunctionActivator.cs:line 23
[2022-12-04T18:12:13.020Z]    at Microsoft.Azure.Functions.Worker.Invocation.DefaultFunctionInvoker`2.CreateInstance(FunctionContext context) in D:\a\1\s\src\DotNetWorker.Core\Invocation\DefaultFunctionInvoker.cs:line 26
[2022-12-04T18:12:13.020Z]    at Microsoft.Azure.Functions.Worker.Invocation.DefaultFunctionExecutor.ExecuteAsync(FunctionContext context) in D:\a\1\s\src\DotNetWorker.Core\Invocation\DefaultFunctionExecutor.cs:line 27
[2022-12-04T18:12:13.021Z]    at Microsoft.Azure.Functions.Worker.OutputBindings.OutputBindingsMiddleware.Invoke(FunctionContext context, FunctionExecutionDelegate next) in D:\a\1\s\src\DotNetWorker.Core\OutputBindings\OutputBindingsMiddleware.cs:line 13
[2022-12-04T18:12:13.021Z]    at Microsoft.Azure.Functions.Worker.GrpcWorker.InvocationRequestHandlerAsync(InvocationRequest request, IFunctionsApplication application, IInvocationFeaturesFactory invocationFeaturesFactory, ObjectSerializer serializer, IOutputBindingsInfoProvider outputBindingsInfoProvider) in D:\a\1\s\src\DotNetWorker.Grpc\GrpcWorker.cs:line 167.

Additional Context?

No response

Product

Hot Chocolate

Version

13.0.0-preview.84

@erandac erandac added the 🐛 bug Something isn't working label Dec 4, 2022
@cajuncoding
Copy link
Contributor

Yes, Azure Functions are currently not passing unit tests for v13, likely due to recent changes and optimizations. But we are working to resolve the issues soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🌶️ hot chocolate
Projects
None yet
3 participants