titaniumnetwork-dev / Ultraviolet-App

Example application of Ultraviolet which can be deployed in production.
https://docs.titaniumnetwork.org/proxies/ultraviolet
MIT License
290 stars 4.46k forks source link

Javascript error #7

Closed smikkelbakje closed 2 years ago

smikkelbakje commented 2 years ago

Issue tracker is ONLY used for reporting bugs. New features should be discussed on our Discord server.

Expected Behavior

website would search things

Current Behavior

doesnt search the thing i want because of a javascript error

Possible Solution

Steps to Reproduce

  1. install UV
  2. try searching something
  3. in webconsole it spits errors out when i press enter

Context (Environment)

Detailed Description

the host is Ubuntu 22.04.1 LTS x86_64 npm version 8.19.2

image image

Possible Implementation

e9x commented 2 years ago

What version of chrome are you running? It looks like navigator.serviceWorker is undefined.

smikkelbakje commented 2 years ago

image

smikkelbakje commented 2 years ago

i can also try it on edge and it does the same thing image

e9x commented 2 years ago

Ah, then it must be because you're missing SSL. SSL or HTTPS is required for service workers to be registered. This repository assumes you setup SSL yourself or a deploy service did for you.

smikkelbakje commented 2 years ago

tried launching it on port 80 or 443 to proxy it trough cloudflare but it refuses to launch image

smikkelbakje commented 2 years ago

already fixed it on my own it stopped complaining

smikkelbakje commented 2 years ago

yep now it seems to work

e9x commented 2 years ago

tried launching it on port 80 or 443 to proxy it trough cloudflare but it refuses to launch image

btw, it will listen on http without encryption on port 443 which is unintended.. you will need to patch this repository to use the https module and call createServer with your SSL cert data

cloudflare is a much easier solution