Skip to content

Issues setting up f1-dash on computer and mobile device #183

@f1bug

Description

@f1bug

Hi,

I am running the application on my computer and want to access it from my mobile. All the pages work well, but the livetiming feature doesn’t load. Initially, I thought it was due to the absence of data, but Las Vegas confirmed that this is not the issue.

I suspect the problem is related to the .env files. I have tried multiple configurations but still haven’t figured out the correct setup.

I have understand that there are two .env relevant files:

/.env

# the address of the live backend, found in crates/live
LIVE_BACKEND_ADDRESS=localhost:4000

# the origin of the frontend, found in dash/
ORIGIN=http://localhost:3000

/dash/.env
NEXT_PUBLIC_LIVE_SOCKET_URL=http://localhost:4000

When I run the application locally on my computer, the livetiming feature works perfectly. However, it doesn’t work on my mobile because I cannot access the computer's localhost from my mobile device unless I use the public IP address. When I replace localhost with my computer's public IP address, I encounter several errors, with the most common being:
GET https://<IP>:4000/api/sse net::ERR_SSL_PROTOCOL_ERROR

Maybe I have to change the code in live to modify cors but you are runninng it in a server and make avalibale for everyone with the same code....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions