canonn-science / canonn-tools

Monorepo for the misc Canonn Tools used on tools.canonn.tech
GNU General Public License v3.0
2 stars 0 forks source link

Codex Router Plotter broken - 408 timeout #1

Open skplunkerin opened 2 years ago

skplunkerin commented 2 years ago

Problem:

The tool isn't working, every startSystem, endSystem, and jumpRange combination ends in the same errors (shown below).

Example attempt:

Start System: Sol End System: Jellyfish Sector ZE-A d0 Jump Range: 1000 URL: https://tools.canonn.tech/codexrouter/?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000

Errors:

At first it looks like the problem is with the request to https://us-central1-canonn-api-236217.cloudfunctions.net/get_codex_route/?startSystem=Sol&endSystem=Jellyfish%20Sector%20ZE-A%20d0&jumpRange=1000&limit=10000&offset=0 which lags, then eventually times out with a 408 status code. Before the timeout, the console only shows the error:

Unchecked runtime.lastError: The message port closed before a response was received.

Afterwords, we see a CORS and promise error (full errors shown below).

Screenshot: image

Saved logs:

Navigated to https://tools.canonn.tech/codexrouter/?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000
Unchecked runtime.lastError: The message port closed before a response was received.
Unchecked runtime.lastError: The message port closed before a response was received.
Unchecked runtime.lastError: The message port closed before a response was received.
Unchecked runtime.lastError: The message port closed before a response was received.
Unchecked runtime.lastError: The message port closed before a response was received.
Unchecked runtime.lastError: The message port closed before a response was received.
Unchecked runtime.lastError: The message port closed before a response was received.
Unchecked runtime.lastError: The message port closed before a response was received.
tools.canonn.tech/:1 Access to XMLHttpRequest at 'https://us-central1-canonn-api-236217.cloudfunctions.net/get_codex_route/?startSystem=Sol&endSystem=Jellyfish%20Sector%20ZE-A%20d0&jumpRange=1000&limit=10000&offset=0' from origin 'https://tools.canonn.tech' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
spread.js:25          GET https://us-central1-canonn-api-236217.cloudfunctions.net/get_codex_route/?startSystem=Sol&endSystem=Jellyfish%20Sector%20ZE-A%20d0&jumpRange=1000&limit=10000&offset=0 net::ERR_FAILED 408
(anonymous) @ spread.js:25
e.exports @ spread.js:25
e.exports @ spread.js:25
Promise.then (async)
r.request @ spread.js:25
(anonymous) @ axios.min.js:477
reqSites @ ?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000:86
getSites @ ?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000:74
fetchCodexData @ ?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000:98
(anonymous) @ ?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000:125
(anonymous) @ ?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000:121
spread.js:25 Uncaught (in promise) Error: Network Error
    at e.exports (spread.js:25:1)
    at XMLHttpRequest.d.onerror (spread.js:25:1)
e.exports @ spread.js:25
d.onerror @ spread.js:25
await in d.onerror (async)
(anonymous) @ ?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000:125
(anonymous) @ ?startSystem=Sol&endSystem=Jellyfish+Sector+ZE-A+d0&jumpRange=1000:121
skplunkerin commented 2 years ago

Is there any way I can try running this locally? I'm not sure I can without having access to whatever API it's trying to connect with.

I'd love to help fix this if that's allowed, please point me in the right direction if that's an option.