nextcloud / weather

⛅️ Weather app for Nextcloud
GNU Affero General Public License v3.0
47 stars 27 forks source link

Weather App won't set city #78

Closed UnConundrum closed 4 years ago

UnConundrum commented 4 years ago
### Steps to reproduce 1. Add weather app 2. add valid api key 3. add a city ### Expected behaviour Tell us what should happen Weather for that city should appear ### Actual behaviour Tell us what happens instead "Fatal Error: please check your nextcloud.log and send a bug report ### Server configuration Running in ProxMox, 4 CPUs, 8G memory **Operating system**: Ubuntu 18.04/ProxMox **Web server:** Apache2 **Database:** mysql 8.0 **PHP version:** 7.2.24 **Nextcloud version:** (see Nextcloud admin page) 16.05 **Updated from an older Nextcloud/ownCloud or fresh install:** fresh install **Where did you install Nextcloud from:** **Signing status:**
Signing status Don't understand Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here.
No errors have been found. **List of activated apps:**
App list Enabled: - accessibility: 1.2.0 - activity: 2.9.1 - admin_audit: 1.6.0 - announcementcenter: 3.5.1 - apporder: 0.8.0 - bruteforcesettings: 1.4.0 - calendar: 1.7.1 - cloud_federation_api: 0.2.0 - comments: 1.6.0 - contacts: 3.1.6 - cookbook: 0.5.4 - dav: 1.9.2 - deck: 0.6.6 - external: 3.3.1 - federatedfilesharing: 1.6.0 - federation: 1.6.0 - files: 1.11.0 - files_accesscontrol: 1.6.0 - files_automatedtagging: 1.6.0 - files_pdfviewer: 1.5.0 - files_rightclick: 0.15.1 - files_sharing: 1.8.0 - files_texteditor: 2.8.0 - files_trackdownloads: 1.5.0 - files_trashbin: 1.6.0 - files_versions: 1.9.0 - files_videoplayer: 1.5.0 - firstrunwizard: 2.5.0 - gallery: 18.3.0 - logreader: 2.1.0 - lookup_server_connector: 1.4.0 - mail: 0.17.0 - nextcloud_announcements: 1.5.0 - notes: 3.0.3 - notifications: 2.4.1 - oauth2: 1.4.2 - ojsxc: 3.4.4 - password_policy: 1.6.0 - privacy: 1.0.0 - provisioning_api: 1.6.0 - quicknotes: 0.1.10 - recommendations: 0.4.0 - serverinfo: 1.6.0 - sharebymail: 1.6.0 - socialsharing_diaspora: 1.0.5 - socialsharing_email: 1.0.6 - socialsharing_facebook: 1.0.5 - socialsharing_twitter: 1.0.5 - spreed: 6.0.4 - support: 1.0.0 - survey_client: 1.4.0 - systemtags: 1.6.0 - tasks: 0.11.3 - text: 1.0.2 - theming: 1.7.0 - twofactor_backupcodes: 1.5.0 - updatenotification: 1.6.0 - user_external: 0.7.0 - viewer: 1.1.0 - weather: 1.6.2 - workflowengine: 1.6.0 Disabled: - encryption - files_external - user_ldap If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder
**Nextcloud configuration:**
Config report If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "10.1.1.7", "nextcloud.princelaw.com", "nextcloud.princelaw.com:443" ], "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "16.0.5.1", "overwrite.cli.url": "http:\/\/10.1.1.7\/nextcloud", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false, "app_install_overwrite": [ "files_clipboard" ], "theme": "", "loglevel": 0, "logfile": "\/var\/log\/nextcloud.log", "logtimezone": "America\/New_York", "log_rotate_size": 104857600, "mail_smtpmode": "smtp", "mail_smtpsecure": "tls", "mail_sendmailmode": "smtp", "memcache.local": "\\OC\\Memcache\\APCu", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpauthtype": "PLAIN", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "updater.release.channel": "stable" } } or
**Are you using external storage, if yes which one:** local/smb/sftp/... no **Are you using encryption:** yes/no no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... no With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; mysql> use nextcloud Database changed mysql> SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Empty set (0.00 sec) Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ### Client configuration **Browser:** Chrome **Operating system:** OSX Mojave ### Logs #### Web server error log
Web server error log Insert your webserver log here
#### Nextcloud log (data/nextcloud.log)
Nextcloud log Log is long. Nothing regarding weather app included. Insert your Nextcloud log here ```
#### Browser log
Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log POST https://nextcloud.princelaw.com/index.php/apps/weather/city/add 502 (Bad Gateway) | (anonymous) | @ | angular.min.js?v=d1ed70ac-1:113 -- | -- | -- | --   | s | @ | angular.min.js?v=d1ed70ac-1:108   | (anonymous) | @ | angular.min.js?v=d1ed70ac-1:105   | (anonymous) | @ | angular.min.js?v=d1ed70ac-1:140   | $digest | @ | angular.min.js?v=d1ed70ac-1:151   | $apply | @ | angular.min.js?v=d1ed70ac-1:155   | (anonymous) | @ | angular.min.js?v=d1ed70ac-1:198   | dispatch | @ | jquery.js:4435   | _.handle | @ | jquery.js:4121 b) The network log c) General log: {"reqId":"U5oKj2GV3jAvYLvNzIvn","level":0,"time":"2019-11-04T09:08:57-05:00","remoteAddr":"10.1.1.112","user":"wprince","app":"ojsxc","method":"POST","url":"\/index.php\/apps\/ojsxc\/http-bind","message":"Receiving {wprince} : That was an addition to your .ssh\/config for nextcloud<\/body><\/message><\/body>","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/78.0.3904.70 Safari\/537.36","version":"16.0.5.1"} {"reqId":"U5oKj2GV3jAvYLvNzIvn","level":0,"time":"2019-11-04T09:08:57-05:00","remoteAddr":"10.1.1.112","user":"wprince","app":"ojsxc","method":"POST","url":"\/index.php\/apps\/ojsxc\/http-bind","message":"Storing {wprince} : That was an addition to your .ssh\/config for nextcloud<\/body><\/request><\/active><\/message>","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/78.0.3904.70 Safari\/537.36","version":"16.0.5.1"} {"reqId":"EcrvMwnXiRMWoV748BAx","level":0,"time":"2019-11-04T09:09:07-05:00","remoteAddr":"10.1.1.112","user":"wprince","app":"ojsxc","method":"POST","url":"\/index.php\/apps\/ojsxc\/http-bind","message":"Receiving {wprince} : I changed the port<\/body><\/message><\/body>","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/78.0.3904.70 Safari\/537.36","version":"16.0.5.1"} {"reqId":"EcrvMwnXiRMWoV748BAx","level":0,"time":"2019-11-04T09:09:07-05:00","remoteAddr":"10.1.1.112","user":"wprince","app":"ojsxc","method":"POST","url":"\/index.php\/apps\/ojsxc\/http-bind","message":"Storing {wprince} : I changed the port<\/body><\/request><\/active><\/message>","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/78.0.3904.70 Safari\/537.36","version":"16.0.5.1"}
GideonWolfe commented 4 years ago

Can confirm this is affecting me as well

spiezmaestro commented 4 years ago

Am experiencing this also. Am an NC 17.0.0.9 with Weather App version 1.6.2.

watson387 commented 4 years ago

Same:

Operating system: Linux 5.3.0-19-generic #20-Ubuntu SMP Fri Oct 18 09:04:39 UTC 2019 x86_64

Webserver: nginx/1.16.1 (fpm-fcgi)

Database: pgsql PostgreSQL 12.0 on x86_64-pc-linux-musl, compiled by gcc (Alpine 8.3.0) 8.3.0, 64-bit

PHP version: 7.3.11

Modules loaded: Core, date, libxml, pcre, zlib, filter, hash, readline, Reflection, SPL, session, cgi-fcgi, bz2, ctype, curl, dom, fileinfo, ftp, gd, gmp, iconv, intl, json, ldap, mbstring, openssl, pcntl, PDO, pgsql, posix, standard, SimpleXML, smbclient, sodium, sqlite3, xml, xmlwriter, zip, exif, imap, mysqlnd, pdo_pgsql, pdo_sqlite, Phar, xmlreader, pdo_mysql, apcu, igbinary, redis, memcached, imagick, mcrypt, libsmbclient, Zend OPcache

Nextcloud version: 17.0.0 - 17.0.0.9

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Where did you install Nextcloud from: linuxserver.io Docker image

Signing status Array ( )
List of activated apps Enabled: - accessibility: 1.3.0 - activity: 2.10.1 - bruteforcesettings: 1.4.0 - calendar: 1.7.1 - cloud_federation_api: 1.0.0 - comments: 1.7.0 - contacts: 3.1.6 - cookbook: 0.5.4 - dav: 1.13.0 - extract: 1.2.2 - federatedfilesharing: 1.7.0 - federation: 1.7.0 - files: 1.12.0 - files_markdown: 2.1.0 - files_pdfviewer: 1.6.0 - files_rightclick: 0.15.1 - files_sharing: 1.9.0 - files_trashbin: 1.7.0 - files_versions: 1.10.0 - files_videoplayer: 1.6.0 - firstrunwizard: 2.6.0 - gallery: 18.4.0 - logreader: 2.2.0 - lookup_server_connector: 1.5.0 - mail: 0.18.1 - metadata: 0.10.0 - news: 14.0.1 - nextcloud_announcements: 1.6.0 - notifications: 2.5.0 - oauth2: 1.5.0 - password_policy: 1.7.0 - privacy: 1.1.0 - provisioning_api: 1.7.0 - recommendations: 0.5.0 - serverinfo: 1.7.0 - sharebymail: 1.7.0 - social: 0.2.101 - support: 1.0.1 - survey_client: 1.5.0 - suspicious_login: 2.4.1 - systemtags: 1.7.0 - tasks: 0.11.3 - text: 1.1.0 - theming: 1.8.0 - twofactor_backupcodes: 1.6.0 - unsplash: 1.1.4 - updatenotification: 1.7.0 - viewer: 1.1.0 - weather: 1.6.2 - workflowengine: 1.7.0 Disabled: - admin_audit - encryption - files_external - user_ldap
Configuration (config/config.php) { "memcache.local": "\\OC\\Memcache\\APCu", "datadirectory": "***REMOVED SENSITIVE VALUE***", "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "24.101.118.225" ], "dbtype": "pgsql", "version": "17.0.0.9", "overwrite.cli.url": "https:\/\/24.101.118.225", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false }

External storages: files_external is disabled

Encryption: no

User-backends:

OC\User\Database

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.146 Whale/2.6.88.11 Safari/537.36

e-alfred commented 4 years ago

This is fixed by https://github.com/nextcloud/weather/commit/dbdc625ddbbeee023731866c6cd8f59f760117ba. I am not quite sure why @nerzhul added this in but it causes a permanent error 502 if any city/town would be added to the app.

@nerzhul Please publish the fixed releases of OCSMS and the Weather app as soon as possible.

nerzhul commented 4 years ago

the condition was inverted in fact, i don't know why but it's inverted !

e-alfred commented 4 years ago

@nerzhul It is strange because there is another if clause that returns the right response code, so there is no real reason for an explicit 502 response anyway.