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

bug: Unable to search for city in Weather widget #2017

Open
zodac opened this issue Jan 19, 2025 · 9 comments
Open

bug: Unable to search for city in Weather widget #2017

zodac opened this issue Jan 19, 2025 · 9 comments
Assignees
Labels

Comments

@zodac
Copy link

zodac commented Jan 19, 2025

Describe the bug

I've just added the weather widget but when trying to find my home city (Auckland, New Zealand), all I get is an error:

Image

The logs don't show much:

025-01-19T12:02:37.182Z info: tRPC request from nextjs-react (json) by user 'zodac (a371411c-3d00-4833-b468-49eca6fd6923)'
2025-01-19T12:02:37.479Z error: tRPC Error with query on 'location.searchCity': (INTERNAL_SERVER_ERROR) - fetch failed

Steps to reproduce

  • Add a new weather widget
  • Search for 'Auckland' as the town/postcode

Impact

Unable to use the widget

Additional information

Using v1.0.1

Version

Other (describe in "additional information")

Installation method

Docker Compose

Browser

Chrome

@Meierschlumpf
Copy link
Member

Hey @zodac for me the search works:

Image

Can you check if you are using an dns-hole and if so if the domain https://api.open-meteo.com is blocked

@zodac
Copy link
Author

zodac commented Jan 19, 2025

No DNS blocking. I'm not able to connect to that domain in the docker container:

homarr:/app# wget https://api.open-meteo.com
Connecting to api.open-meteo.com (94.130.142.35:443)
wget: server returned error: HTTP/1.1 400 Bad Request

But working fine from my host:

zodac@raspberrypi:~/home_theatre $ wget https://api.open-meteo.com
--2025-01-20 01:22:12--  https://api.open-meteo.com/
Resolving api.open-meteo.com (api.open-meteo.com)... 2a01:4f8:13b:2e04::2, 94.130.142.35
Connecting to api.open-meteo.com (api.open-meteo.com)|2a01:4f8:13b:2e04::2|:443... connected.

@Meierschlumpf
Copy link
Member

To me it seems like you are able to connect to the site on both host and container (It just returns 400 bad request which is also what I get when opening the / route in the browser)

@Meierschlumpf
Copy link
Member

Meierschlumpf commented Jan 19, 2025

I don't quite understnad why it is not working for you then (technically). What architecture is your rasperry pi on?

@zodac
Copy link
Author

zodac commented Jan 19, 2025

Using a RaspberryPi 4 Model B. I use it for a few other containers, haven't had any other issues connecting to things.

zodac@raspberrypi:~/home_theatre $ arch
aarch64

I tried a curl and can see I'm getting the following error from the API, but it doesn't look like I'm passing anything that would cause it?

zodac@raspberrypi:~/home_theatre $ curl -s https://api.open-meteo.com | jq .
{
  "error": true,
  "reason": "No value found (expected type 'Int') at path 'list-type'. No Int was found at 'list-type'."
}

@Meierschlumpf
Copy link
Member

It's only showing this error from the page as we don't pass certain parameters, so it's reachable from your raspberrypi. We'll need to investigate why this is not working

@Meierschlumpf Meierschlumpf added bug Something isn't working and removed needs triage labels Jan 20, 2025
@Meierschlumpf
Copy link
Member

Can you check if the error is more verbose and contains more informations now?

@Meierschlumpf Meierschlumpf moved this to In Progress in Homarr support requests Jan 25, 2025
@Meierschlumpf Meierschlumpf self-assigned this Jan 25, 2025
@Meierschlumpf Meierschlumpf added support and removed bug Something isn't working labels Jan 25, 2025
@zodac
Copy link
Author

zodac commented Jan 26, 2025

Not much better I'm afraid:

2025-01-26T11:28:31.779Z error: tRPC Error with query on 'location.searchCity': (INTERNAL_SERVER_ERROR) - fetch failed
TypeError: fetch failed
    at node:internal/deps/undici/undici:13502:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /app/apps/nextjs/.next/server/chunks/6573.js:5:53552
    at async l.middlewares (/app/apps/nextjs/.next/server/chunks/442.js:43:101517)
    at async u (/app/apps/nextjs/.next/server/chunks/442.js:46:68)
    at async t (/app/apps/nextjs/.next/server/chunks/442.js:43:99978)
    at async u (/app/apps/nextjs/.next/server/chunks/442.js:46:68)
    at async u (/app/apps/nextjs/.next/server/chunks/442.js:46:68)
    at async t (/app/apps/nextjs/.next/server/chunks/442.js:46:403)
    at async /app/apps/nextjs/.next/server/chunks/442.js:43:94855
TypeError: fetch failed

@Meierschlumpf
Copy link
Member

Okay, I'll search for a solution to show why the fetch fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants