-
Notifications
You must be signed in to change notification settings - Fork 369
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
deploy perfetto ui in the remote server #170
Comments
It's not clear to me what you're trying to accomplish. Are you trying to replicate a ui.perfetto.dev instance somewhere else? Or are you just trying to load a remote trace on ui.perfetto.dev? Each of these has a different solution. |
Yes, I want to replicate ui.perfetto.dev in our cluster, where internet access is blocked by firewall. |
Or, I just want to use simply like jupyter or tensorboard, if it is possible. |
If you just want to replicate ui.perfetto.dev, then you just need to run the build You can then use any webserver (Apache, NGINX, whatever your company uses to host static content) and serve the contents of the |
Yes, It was what I did. My question is about the address. Is there any restriction? do I have to use localhost or the same domain name like perfetto.dev? |
I don't follow the discussion here. |
Thanks, I expect so. I think I can reproduce it simply, just using python, could you test this? I just downloaded the output files in dist folder(index.html, v18.0.0 folder, ...)
which will run a simple http server listening to 0.0.0.0:31015, NOT 127.0.0.1:31015 In each page, using the devtools to check if we can use caches or not. |
What is the exception you are concerned about? |
Ah I know what's going on, you need to use a HTTPS server with SSL/TLS if it's != localhost.
so if you bind 0.0.0.0 and then connect to 192.168.x.y (even if that happens to be your own IP) that will be considered as non-secure. It really needs to be 127.0.0.1 to be considered secure. Otherwise use SSL. |
Okay, I got it. |
It was exactly the secure origin problem! Thanks again. I just tested using chrome with unsafely-treat-insecure-origin-as-secure flag as in and It works well, as expected. |
Is this possible to deploy the perfetto ui in the remote server?
I'm just testing using run-dev-server, which seems to use build.js to create a http server.
I slightly modify startServer function in the perfetto/ui/build.js to run the server to listen 0.0.0.0:30000 for example.
I passed the perfetto protobuf file using window.postMessage to open a new tab.
It seems work(my trace is showing well) but an error occurs like:
when I use the default setting, localhost:10000, It works well.
The text was updated successfully, but these errors were encountered: