FIRST-Tech-Challenge / FIRST-Tech-Challenge/scorekeeper

WSS connection when using HTTPS

Open
#685 2 comments 1 reaction 0 assignees View on GitHub
bug Local
Dominant language
No language data
Stars
110
Forks
26
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When Using HTTPS (ngrok) everything is HTTPS and working great but not the WebSocket in Display or Match Control Page

**To Reproduce**
Steps to reproduce the behavior:
1. run FTC Locally
2. ngrok HTTP 80
3. Visit the link
4. login as local
5. login you will see DISCONNECTED!! above

**Expected behavior**
it should works I fixed the issue by looking for the file of the code and making these changes:
from new c(t)
to new c(t.replace("ws",window.location.href.includes("https") ? "wss" : "ws"))

**Screenshots**
![Screenshot 2023-12-25 190450](https://github.com/FIRST-Tech-Challenge/scorekeeper/assets/95718825/20d39001-46e7-4a2d-bb2f-442a288b49b6)
![1- error log](https://github.com/FIRST-Tech-Challenge/scorekeeper/assets/95718825/a5b27db5-43bd-4f85-ba4c-1ffc05222001)
![2- code error](https://github.com/FIRST-Tech-Challenge/scorekeeper/assets/95718825/e45a741d-f8d3-413d-8011-2b10ce849ec7)
![3- fixing](https://github.com/FIRST-Tech-Challenge/scorekeeper/assets/95718825/9ed3b18f-ee09-49f5-95b1-f339473cf41f)
![4- log after fix](https://github.com/FIRST-Tech-Challenge/scorekeeper/assets/95718825/6246376d-1f14-4fd2-a42d-b594ee08ea20)
![Screenshot 2023-12-25 190459](https://github.com/FIRST-Tech-Challenge/scorekeeper/assets/95718825/1a7259f4-477c-4fa1-adc0-0c5753b3778b)

**Additional context**
I don't know if it's bug or intended behavior but I thought you may want to fix it

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.