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

Request WeatherAPI #64

Closed
daledavies opened this issue Oct 3, 2022 Discussed in #63 · 16 comments
Closed

Request WeatherAPI #64

daledavies opened this issue Oct 3, 2022 Discussed in #63 · 16 comments
Labels
can't recreate This bug cannot be recreated

Comments

@daledavies
Copy link
Owner

Discussed in #63

Originally posted by Tataukee October 3, 2022
Can you add weatherapi ? The openweather has never been working for me ?

@daledavies
Copy link
Owner Author

Further to the discussion, could you post a screenshot of the developer console with an OWM API key in place, also the docker logs for your jump container?

@Tataukee
Copy link

Tataukee commented Oct 3, 2022

I hope this is the right info you needed ( the api key is un place ) .

03Oct2220-31

Docker logs for your jump container :

NOTICE: PHP message: PHP Warning: fopen(/var/www/cache/application/_sites%2Fstatus%2Fhttpsauthservicepublicfrrealmsservicepublicprotocolopenidconnectauthresponsetypecodeclientidspclientscopeaddress20phone20openid20profile20emailstate7iHt2oLzfRIvG6lMYPiwzByTRgXqpedvnEnk3ZllFIA3Dredirecturihttpswwwservicepublicfropenidconnectloginnonce547KAR7mtOaVbtrM0ZdZonimpJPv4C4btfKzfHVpncI/_8e66ccfa196b812261ae510e21038fcd): Failed to open stream: Filename too long in /var/www/html/vendor/nette/caching/src/Caching/Storages/FileStorage.php on line 136
2022/10/03 18:31:03 [error] 28#28: *158 FastCGI sent in stderr: "PHP message: PHP Warning: fopen(/var/www/cache/application/_sites%2Fstatus%2Fhttpsauthservicepublicfrrealmsservicepublicprotocolopenidconnectauthresponsetypecodeclientidspclientscopeaddress20phone20openid20profile20emailstate7iHt2oLzfRIvG6lMYPiwzByTRgXqpedvnEnk3ZllFIA3Dredirecturihttpswwwservicepublicfropenidconnectloginnonce547KAR7mtOaVbtrM0ZdZonimpJPv4C4btfKzfHVpncI/_8e66ccfa196b812261ae510e21038fcd): Failed to open stream: Filename too long in /var/www/html/vendor/nette/caching/src/Caching/Storages/FileStorage.php on line 136" while reading response header from upstream, client: 172.19.0.1, server: _, request: "GET /api/status/9dfb1e191bffd230aedbb70e100571c321618fa89ef436b2c3a7c98efa0223f4/ HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "10.0.1.18:8122", referrer: "http://10.0.1.18:8122/"
172.19.0.1 - - [03/Oct/2022:18:31:03 +0000] "GET /api/status/9dfb1e191bffd230aedbb70e100571c321618fa89ef436b2c3a7c98efa0223f4/ HTTP/1.1" 200 1316 "http://10.0.1.18:8122/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.136 0.136 . -
172.19.0.1 - - [03/Oct/2022:18:32:28 +0000] "GET /api/weather/1140c11dc9db2c37a8c9f46b275b0f25878d2ea667533831c531e5c9ebc68eeb/ HTTP/1.1" 400 22 "http://10.0.1.18:8122/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" "-" 0.007 0.007 . -
172.19.0.1 - - [03/Oct/2022:18:34:02 +0000] "GET / HTTP/1.1" 200 5399 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.014 0.014 . -
172.19.0.1 - - [03/Oct/2022:18:34:02 +0000] "GET /background-css.php HTTP/1.1" 200 143 "http://10.0.1.18:8122/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.001 0.001 . -

There are more logs but the seems to be all the same ..
Hope this can help

@daledavies
Copy link
Owner Author

daledavies commented Oct 3, 2022

And this works without the API key? The errors in your logs seem unrelated to problems with the weather API.

I'm reading this on my phone so can't quite see it properly but it looks like the site status checker function is caching a URL that is at the end of a redirect from one of your sites, it is complaining about the filename of the cache file created. This might be a bug but it isn't in any way related to the weather API.

Could you try with the API key in place and the CACHEBYPASS option set to true?

@daledavies
Copy link
Owner Author

Also try without the cache bypass option but set CHECKSTATUS to false.

Thanks 😀

@Tataukee
Copy link

Tataukee commented Oct 4, 2022

This is the only logs I could see unfortunately and the issue is happening from different browsers and different machines in my LAN including from my other iDevice, however when removing the OWAPI key the page just works .
This is by the way docker running in Synology and my browser is Safari I do not have any special setup or caching issues when running other containers . Tried both variables none of them seems resolving the issue .
I have the OWAPI Key working in other project , tested it this morning and it's working . The app is launched from the same browser with the same machine and showing my weather correctly .

04Oct2207-48

@daledavies
Copy link
Owner Author

Thanks, can you test as I asked above with cachebypass and then checkstatus?

@Tataukee
Copy link

Tataukee commented Oct 4, 2022

Just to confirm with you, those variables do you want me to include them on the docker compose environnement .
something like this in the screenshot ?

04Oct2207-59

@Tataukee
Copy link

Tataukee commented Oct 4, 2022

p/s: I have done one by one by the way , following your instructions

@daledavies
Copy link
Owner Author

Yes as docker environment variables, thanks

@Tataukee
Copy link

Tataukee commented Oct 4, 2022

None of the above seems to work . ( tried different browsers )

04Oct2208-07

04Oct2208-08

@daledavies
Copy link
Owner Author

Can you forward the logs with each of these in place?

@Tataukee
Copy link

Tataukee commented Oct 4, 2022

CACHEBYPASS = true logs :


 ██ ██    ██ ███    ███ ██████
 ██ ██    ██ ████  ████ ██   ██
 ██ ██    ██ ██ ████ ██ ██████

██ ██ ██ ██ ██ ██ ██ ██
█████ ██████ ██ ██ ██

https://github.com/daledavies/jump


  • Repopulating web root with application files.
  • You are using Jump v1.3.0 (1658838937)

  • Checking if backgrounds, favicon, search or sites volumes have been mounted.

    • Backgrounds directory is mapped... symlinking.
    • Favicon directory is mapped... symlinking.
    • Sites directory is mapped... symlinking.
    • Search directory is mapped... symlinking.
  • All done! Starting nginx/php services now.


[04-Oct-2022 06:28:03] NOTICE: fpm is running, pid 23
[04-Oct-2022 06:28:03] NOTICE: ready to handle connections
172.19.0.1 - - [04/Oct/2022:06:28:22 +0000] "GET /api/weather/1140c11dc9db2c37a8c9f46b275b0f25878d2ea667533831c531e5c9ebc68eeb/ HTTP/1.1" 401 47 "http://10.0.1.18:8122/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" "-" 0.041 0.041 . -
172.19.0.1 - - [04/Oct/2022:06:29:34 +0000] "GET /tag/devOP/ HTTP/1.1" 200 5157 "http://10.0.1.18:8122/tag/media%20server/?nocache=1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.059 0.059 . -
172.19.0.1 - - [04/Oct/2022:06:29:34 +0000] "GET /background-css.php HTTP/1.1" 200 143 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.004 0.004 . -
172.19.0.1 - - [04/Oct/2022:06:29:34 +0000] "GET /api/status// HTTP/1.1" 401 47 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.003 0.003 . -
172.19.0.1 - - [04/Oct/2022:06:29:34 +0000] "GET /assets/font/quicksand-v28-latin-regular.woff2 HTTP/1.1" 200 13776 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.000 - . -
172.19.0.1 - - [04/Oct/2022:06:29:34 +0000] "GET /api/weather// HTTP/1.1" 401 47 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.002 0.002 . -
172.19.0.1 - - [04/Oct/2022:06:29:34 +0000] "GET /assets/backgrounds/documerica-6FLfd2_OxBM-unsplash.jpg HTTP/1.1" 200 488175 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.010 - . -

CHECKSTATUS = false logs :


 ██ ██    ██ ███    ███ ██████
 ██ ██    ██ ████  ████ ██   ██
 ██ ██    ██ ██ ████ ██ ██████

██ ██ ██ ██ ██ ██ ██ ██
█████ ██████ ██ ██ ██

https://github.com/daledavies/jump


  • Repopulating web root with application files.
  • You are using Jump v1.3.0 (1658838937)

  • Checking if backgrounds, favicon, search or sites volumes have been mounted.

    • Backgrounds directory is mapped... symlinking.
    • Favicon directory is mapped... symlinking.
    • Sites directory is mapped... symlinking.
    • Search directory is mapped... symlinking.
  • All done! Starting nginx/php services now.


[04-Oct-2022 06:34:23] NOTICE: fpm is running, pid 22
[04-Oct-2022 06:34:23] NOTICE: ready to handle connections
172.19.0.1 - - [04/Oct/2022:06:34:49 +0000] "GET /tag/devOP/ HTTP/1.1" 200 5157 "http://10.0.1.18:8122/tag/media%20server/?nocache=1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.074 0.074 . -
172.19.0.1 - - [04/Oct/2022:06:34:50 +0000] "GET /background-css.php HTTP/1.1" 200 143 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.008 0.008 . -
172.19.0.1 - - [04/Oct/2022:06:34:50 +0000] "GET /api/weather// HTTP/1.1" 401 47 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.003 0.003 . -
172.19.0.1 - - [04/Oct/2022:06:34:50 +0000] "GET /assets/backgrounds/hector-falcon-ZJ9POJfmfL4-unsplash.jpg HTTP/1.1" 200 519961 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.013 - . -
172.19.0.1 - - [04/Oct/2022:06:34:50 +0000] "GET /assets/font/quicksand-v28-latin-regular.woff2 HTTP/1.1" 200 13776 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.000 - . -
172.19.0.1 - - [04/Oct/2022:06:35:10 +0000] "GET /tag/devOP/ HTTP/1.1" 200 5212 "http://10.0.1.18:8122/tag/media%20server/?nocache=1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.028 0.029 . -
172.19.0.1 - - [04/Oct/2022:06:35:10 +0000] "GET /background-css.php HTTP/1.1" 200 130 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.001 0.001 . -
172.19.0.1 - - [04/Oct/2022:06:35:10 +0000] "GET /api/weather/2ce3dc9af36a84e362239e61c52f1cb9f7199e98300e139c8ba7d202d9f979d1/ HTTP/1.1" 400 22 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.003 0.004 . -
172.19.0.1 - - [04/Oct/2022:06:35:10 +0000] "GET /assets/font/quicksand-v28-latin-regular.woff2 HTTP/1.1" 304 0 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.000 - . -
172.19.0.1 - - [04/Oct/2022:06:35:10 +0000] "GET /assets/backgrounds/sea-ga4cb2ef0b_1920.jpg HTTP/1.1" 200 865460 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.000 - . -
172.19.0.1 - - [04/Oct/2022:06:36:36 +0000] "GET /tag/devOP/ HTTP/1.1" 200 5212 "http://10.0.1.18:8122/tag/media%20server/?nocache=1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.024 0.024 . -
172.19.0.1 - - [04/Oct/2022:06:36:36 +0000] "GET /background-css.php HTTP/1.1" 200 146 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.001 0.001 . -
172.19.0.1 - - [04/Oct/2022:06:36:36 +0000] "GET /api/weather/2ce3dc9af36a84e362239e61c52f1cb9f7199e98300e139c8ba7d202d9f979d1/ HTTP/1.1" 400 22 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.003 0.003 . -
172.19.0.1 - - [04/Oct/2022:06:36:36 +0000] "GET /assets/font/quicksand-v28-latin-regular.woff2 HTTP/1.1" 304 0 "http://10.0.1.18:8122/tag/devOP/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "-" 0.000 - . -

@Tataukee
Copy link

Tataukee commented Oct 6, 2022

Hi There , Any feedback on this ?
Thank you

@daledavies
Copy link
Owner Author

The most recent error logs you forwarded don't actually show any errors, I'm afraid there isn't much for me to work with.

If you manage to capture any errors in the console or the docker error logs please forward them with detail of the configuration options in place at the time.

@daledavies daledavies added the can't recreate This bug cannot be recreated label Oct 6, 2022
@Kye-NG
Copy link

Kye-NG commented Jan 13, 2023

I was having the same 400 response issue from the weather API too.

I added a container name to the docker compose block, and also changed the environment variables mappings from the example to suite what my other docker image blocks looked like:

From:

landing-page:
  image: daledavies/jump
  ports:
    - 8123:8080
  volumes:
    - /opt/jump/backgrounds:/backgrounds
    - /opt/jump/favicon:/favicon
    - /opt/jump/search:/search
    - /opt/jump/sites:/sites
  environment:
    - SITENAME: 'Home'
    - OWMAPIKEY: 'myApiKeyWasHere'
    - LATLONG: 'mylat,mylong'
    - AMPMCLOCK: 'true'
    - SHOWSEARCH: 'false'
    - ALTBGPROVIDER: 'https://source.unsplash.com/random'
    - METRICTEMP: 'true'
    - CHECKSTATUS: 'false'

To:

landing-page:
    container_name: landing-page
    image: daledavies/jump
    ports:
      - 8462:8080
    volumes:
      - /opt/jump/backgrounds:/backgrounds
      - /opt/jump/favicon:/favicon
      - /opt/jump/search:/search
      - /opt/jump/sites:/sites
    environment:
      - SITENAME=Home
      - OWMAPIKEY=myApiKeyWasHere
      - LATLONG=mylat,mylong
      - AMPMCLOCK=true
      - SHOWSEARCH=false
      - ALTBGPROVIDER=https://source.unsplash.com/random
      - METRICTEMP=true
      - CHECKSTATUS=false

I also changed the port map because my other container is 8123 already.

Weather API works fine now 🤷

@daledavies
Copy link
Owner Author

As there is no workable information in the error logs and I can't recreate the problem I'm closing this issue. If you do manage to capture any errors relating to this in your logs please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't recreate This bug cannot be recreated
Projects
None yet
Development

No branches or pull requests

3 participants