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

The type initializer for 'Grpc.Core.Internal.PlatformApis' threw an exception. #450

Open
3 tasks
pccai opened this issue Oct 11, 2021 · 1 comment
Open
3 tasks

Comments

@pccai
Copy link

pccai commented Oct 11, 2021

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • [* ] Bug
  • Requirement
  • Feature or performance improvement

Question

  • What do you want to know?

Bug

  • 1.3.0

Sometimes exception on net5.0.400:

[Error] SkyApm.Transport.Grpc.ConnectService : SkyApm.Transport.Grpc.ConnectService.ExecuteAsync(token.Token) fail
System.TypeInitializationException: The type initializer for 'Grpc.Core.Internal.PlatformApis' threw an exception.
---> System.Globalization.CultureNotFoundException: Culture is not supported. (Parameter 'name')
ader is an invalid culture identifier.
at System.Globalization.CultureInfo.GetCultureInfo(String name)
at System.Reflection.RuntimeAssembly.GetLocale()
at System.Reflection.RuntimeAssembly.GetName(Boolean copiedName)
at Grpc.Core.Internal.PlatformApis.<>c.b__43_0(Assembly assembly)
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Func2 predicate, Boolean& found)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate)
at Grpc.Core.Internal.PlatformApis.TryGetUnityApplicationPlatform()
at Grpc.Core.Internal.PlatformApis..cctor()
--- End of inner exception stack trace ---
at Grpc.Core.Internal.PlatformApis.get_IsXamarinIOS()
at Grpc.Core.GrpcEnvironment.get_IsNativeShutdownAllowed()
at Grpc.Core.GrpcEnvironment.GrpcNativeInit()
at Grpc.Core.GrpcEnvironment..ctor()
at Grpc.Core.GrpcEnvironment.AddRef()
at Grpc.Core.Channel..ctor(String target, ChannelCredentials credentials, IEnumerable`1 options)
at Grpc.Core.Channel..ctor(String target, ChannelCredentials credentials)
at SkyApm.Transport.Grpc.ConnectionManager.ConnectAsync()
at SkyApm.Transport.Grpc.ConnectService.ExecuteAsync(CancellationToken cancellationToken)
at SkyApm.ExecutionService.Callback(Object state)

@feiyun0112
Copy link
Contributor

ader is an invalid culture identifier.

@pccai

did you change current culture?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants