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

Spotlight Frontend crashes when accessing it on remote host without https -> crypto.randomUUID is not a function. #436

Closed
dani2112 opened this issue Feb 23, 2024 · 1 comment · Fixed by #439
Assignees
Labels
bug Something isn't working

Comments

@dani2112
Copy link
Contributor

Describe the bug
Spotlight crashes with crypto.randomUUID is not a function. This happens when Spotlight is accessed on a remote host without https. E.g., on a EC2 instance. The crypto API is not available when used without https outside of localhost.

To Reproduce
Steps to reproduce the behavior:

  1. Spin up Spotlight and expose on 0.0.0.0
  2. Access from other host via HTTP

You will see a blank page as the javascript crashes.

Expected behavior
It should not crash.

Screenshots
If possible, include screenshots or screen recordings to better illustrate the issue.

Desktop (please complete the following information):
Chrome 121

Additional context
Was an issue from Discord. Workaround was to forward port to localhost via VSCODE remote development but this is annoying.

@dani2112 dani2112 added the bug Something isn't working label Feb 23, 2024
@druzsan druzsan self-assigned this Feb 27, 2024
@druzsan
Copy link
Collaborator

druzsan commented Feb 27, 2024

From now on, you can pass SSL key and certificate to Spotlight at start.

Python

spotlight.show(dataset, host="0.0.0.0", port=5000, ssl_keyfile="path/to/key", ssl_certfile="path/to/cert")

If the key file is locked, you will be prompted to enter the password. Alternatively, you cann pass it to show:

spotlight.show(..., ssl_keyfile_password="password")

CLI

spotlight --host 0.0.0.0 --port 5000 --ssl-keyfile path/to/key --ssl-certfile path/to/cert [--ssl-keyfile-password password] dataset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants