Is gRPC supported on Oculus Quest?

18 views
Skip to first unread message

Joe Hardy

unread,
Nov 17, 2020, 11:04:07 PM11/17/20
to grpc.io
Has anyone been able to get gRPC working on Oculus Quest?

I have a VR project that runs in Unity (C#) and uses gRPC. It works fine in the editor and works fine when built on Windows. However, when I compile to Android/Quest, nothing gRPC-related works at all. I get a runtime exception like: 

(Filename: <f7a04f2dd64143e0bba9257dc32cc3db> Line: 0)

2020-11-17 19:49:40.407 10631-10651/? E/Unity: InvalidOperationException: Operation is not valid due to the current state of the object.

      at Grpc.Core.Internal.NativeCallbackDispatcher.Init (Grpc.Core.Internal.NativeMethods native) [0x0002e] in <fcf85defed7d4657a25a4006a87f381f>:0 

      at Grpc.Core.Internal.NativeExtension..ctor () [0x0001c] in <fcf85defed7d4657a25a4006a87f381f>:0 

      at Grpc.Core.Internal.NativeExtension.Get () [0x00022] in <fcf85defed7d4657a25a4006a87f381f>:0 

      at Grpc.Core.Internal.NativeMethods.Get () [0x00000] in <fcf85defed7d4657a25a4006a87f381f>:0 

      at Grpc.Core.GrpcEnvironment.GrpcNativeInit () [0x00016] in <fcf85defed7d4657a25a4006a87f381f>:0 

      at Grpc.Core.GrpcEnvironment..ctor () [0x0001e] in <fcf85defed7d4657a25a4006a87f381f>:0 

      at Grpc.Core.GrpcEnvironment.AddRef () [0x00028] in <fcf85defed7d4657a25a4006a87f381f>:0 

      at Grpc.Core.Channel..ctor (System.String target, Grpc.Core.ChannelCredentials credentials, System.Collections.Generic.IEnumerable`1[T] options) [0x00041] in <fcf85defed7d4657a25a4006a87f381f>:0 

      at Grpc.C


Jan Tattermusch

unread,
Nov 23, 2020, 10:05:04 AM11/23/20
to grpc.io
Note that gRPC's support for Unity is not official (is marked as "experimental") - so it's not all that surprising that you are facing issues when trying out a new target platform. I don't know the details of Oculus Quest, but if it's an android device, you still might be able to get things working with some extra effort (sorry, Unity platform doesn't really make things easy for us).

Joe Hardy

unread,
Nov 23, 2020, 11:28:47 AM11/23/20
to Jan Tattermusch, grpc.io
Thanks Jan,

I was able to get the latest Unity gRPC package to work with Oculus Quest (which does run on Android). There's just a minor modification to the package that is needed. You need to place all the DLLs in the lowest level folder, or Unity won't find them. This approach works on Windows and Android, at least. I haven't tested the other platforms. It might be worth exploring if this approach is broadly applicable for Unity and changing the distro accordingly. I found the workaround on another forum, but I can't find it right now to properly attribute. 
 

--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/7pEIgbT6RQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/22d1a354-962b-4744-9ee2-1e96cb283d91n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages