CORS Issues with Kit 106 USD Viewer Template and Kubernetes Deployment

Problem:

I’m developing an application using the Kit 106 USD Viewer template from the NVIDIA Omniverse GitHub repository. My goal is to deploy the React web client to Kubernetes and run the Kit 106 streaming app on a separate VM. The web client ingress utilizes HTTPS, which I cannot change.

After successfully deploying the application, I encountered the following issues:

  1. Mixed Content Error: Initially, the web client experienced a mixed content error due to the insecure WebSocket connection. I resolved this by implementing Nginx to proxy HTTPS traffic.
  2. CORS Errors: Despite resolving the mixed content issue, CORS errors are now preventing proper communication between the web client and the Kit app.

Attempted Solutions:

I’ve implemented the following CORS configuration in my app toml file, based on the recommendations from the NVIDIA developer forums:

Plain Text

[settings.exts."omni.services.transport.server.http"]
https.enabled = truehttps.port = 443  # Or another port of your choice
ssl.ssl_keyfile = "# Path to your SSL private key"ssl.ssl_certfile = "
# Path to your SSL certificate"ssl.ssl_version = "
TLSv1_2"  # Specify the SSL version
cors.enabled = truecors.allow_origins = ['*']
cors.allow_credentials = false
cors.allow_methods = ['*']
cors.allow_headers = ['*']

However, these configurations have not resolved the CORS errors.

Am I missing additional configuration and is there anything I’m missing that needs to be implemented ?

Could you please detail your setup and list streaming extensions you’re trying to use currently?
Also please note that NVIDIA has released Omniverse application streaming (OVAS) sample artifacts, that you can use as a blueprint and starting point to develop your own Omniverse streaming infrastructure. It’s running on Kubernetes and managed by means of Helm, which seems to match your target environment.

I’m linking the OVAS docs so you get started: Overview — Kit App Streaming API

Hey @alexanderku, thanks for getting back to me.

I’m just running the sample USD Viewer extension in the documentation:

Ok, this uses omni.kit.livestream.webrtc extension which is exactly what OVAS uses too. Do you use OVAS sample already? If not, how do you run a Kit app on Kubernetes?

@alexanderku , I’m only running the react front-end client on kubernetes, the kit app is run on a separate VM.

Same issue, this git sample doesn’t seem to be cross-domain, I had to hire a network architect to try and deploy the full project on K8S, but it hasn’t worked so far

Ok this comes up a lot. Please note that our Kit Streaming technology is NOT DESIGNED to cross network domains. Not unless you have a very custom network that gets around a lot of the cross network issues and CORS. The streaming kit samples are designed for LOCAL NETWORKS only. You cannot have a front end on one VM and the kit app on another. Not unless you configure both of those VMs to be in the “same local network”. These streaming “samples” are designed for you to take and write your own custom versions for custom networks. But again, the samples are really designed to go from your local kit app to your local browser and that’s it.

I am running Kit App (example), Web viewer sample app and NGINX all on a single VM. I have built the react app (npm run build) and copied the dist files to NGINX required file locations (in my case /var/www/html). The NGINX serves the react app fine on an external site but the connectivity between react app and Kit app is failing which I notice from browser logs. I get “https://localhost:49100/v2/session?keyboardLayout=en-US&languageCode=en_US net::ERR_CONNECTION_REFUSED”? which I see in the browser log.

How can I address this?

As I have said, you cannot do anything with an “external” anything. It all is designed to stay within a network domain. There is no way to get your data out to anything external.

Your react app, if you run it on the same local VM, should connect to the kit app, correct? Because they are running together on the same machine. Then if you want to “view” that stream from a remote computer, you can use a normal remote desktop viewer, that can cross domains. But you cannot stream out of the VM to an external source.

Ok got it. Thanks for the clarification Richard. I greatly appreciate your help.

Thanks,
Nandu

1 Like

No problem

Hey @Richard3D,

I’m working with Omniverse streaming and have some questions regarding the End-of-Life/Support status of some components.

I noticed the Omniverse USD Explorer is marked as EOL/EOS on the legacy tools page:

The streaming example I’m using relies on the ‘usd_explorer’ within the ‘kit-app-template’

[kit-app-template/templates/apps/usd_viewer at main · NVIDIA-Omniverse/kit-app-template · GitHub]

I’m also a bit confused about the Omniverse Streaming Client. It was previously listed under legacy tools, but it’s no longer there. Could you clarify its current status ?

I’d like to know if the EOL/EOS designation applies only to the example in the repo, or to the underlying React library used to communicate with the Kit 106 application.

Finally, given that the Omniverse USD Explorer is being deprecated, what’s the recommended alternative for streaming workflows that currently depend on it?

Thanks for your help!

Just to clarify, it is only the USD Explorer as a ready built app on Launcher. Not the same as you building your own app from the Kit KAT templates. Sorry, its confusing. So in summary we are EOL for pre-built apps on Launcher. The templates in KAT are all fine.

Hey @Richard3D ,

thanks for the reply.

Does this include Farm Agent and Queue , if they are removed from the launcher how do I get the latest releases and how do I launch it ?

Also, is there any additional documentation on the React Library which is in the web-viewer sample:

Sample Repo: [GitHub - NVIDIA-Omniverse/web-viewer-sample: This sample demonstrates how a front-end client can present a streamed Omniverse Kit application and how to send messages between the two apps.]

React Library: “@nvidia/omniverse-webrtc-streaming-library”

Thanks.

Let check on Farm and Queue.

@Richard3D

Any update on this ?

Also, is there any documentation on the React Library :

@nvidia/omniverse-webrtc-streaming-library”

Thanks.

Yes. There is some great news on this. I found out that we just released Farm 2.0 and it’s free to download on The NGC website !

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.