nextcloud / weather

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

Cannot add city #66

Closed vores8 closed 5 years ago

vores8 commented 5 years ago
Sorry, app is not working ### Steps to reproduce 1. Install Nextcloud 14 2. Install and configure Weather 1.5.4 3. Add city "moscow, ru" ### Expected behaviour city added to the app ### Actual behaviour Error message displayed just above city input box "Fatal Error: please check your owncloud.log and send a bug report here: https://github.com/nextcloud/weather/issues" ### Integrity https://redshire.ru/nextcloud/index.php/settings/integrity/failed No errors have been found. ### Server configuration **Operating system**: Debian 9 **Web server:** Nginx **Database:** **PHP version:** 7.0 **Nextcloud version:** (see Nextcloud admin page) 14.0.1 **Updated from an older Nextcloud/ownCloud or fresh install:** updated **Where did you install Nextcloud from:** nextcloud site? **Signing status:**
Signing status
**List of activated apps:**
App list Enabled: - accessibility: 1.0.1 - activity: 2.7.0 - cloud_federation_api: 0.0.1 - comments: 1.4.0 - dav: 1.6.0 - federatedfilesharing: 1.4.0 - federation: 1.4.0 - files: 1.9.0 - files_external: 1.5.0 - files_pdfviewer: 1.3.2 - files_sharing: 1.6.2 - files_texteditor: 2.6.0 - files_trashbin: 1.4.1 - files_versions: 1.7.1 - files_videoplayer: 1.3.0 - firstrunwizard: 2.3.0 - gallery: 18.1.0 - logreader: 2.0.0 - lookup_server_connector: 1.2.0 - nextcloud_announcements: 1.3.0 - notes: 2.4.2 - notifications: 2.2.1 - oauth2: 1.2.1 - password_policy: 1.4.0 - provisioning_api: 1.4.0 - radio: 0.6.3 - richdocuments: 2.0.13 - sensorlogger: 0.0.8 - serverinfo: 1.4.0 - sharebymail: 1.4.0 - spreed: 4.0.0 - support: 1.0.0 - survey_client: 1.2.0 - systemtags: 1.4.0 - tasks: 0.9.7 - theming: 1.5.0 - twofactor_backupcodes: 1.3.1 - updatenotification: 1.4.1 - weather: 1.5.4 - workflowengine: 1.4.0 Disabled: - admin_audit - encryption - user_external - user_ldap
**Nextcloud configuration:**
Config report { "system": { "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", "redshire.ru", "192.168.1.250" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/redshire.ru", "htaccess.RewriteBase": "\/nextcloud", "dbtype": "mysql", "version": "14.0.1.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.locking": "\\OC\\Memcache\\APCu", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_domain": "***REMOVED SENSITIVE VALUE***", "maintenance": false, "theme": "", "loglevel": 2, "updater.secret": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpsecure": "ssl", "mail_smtpport": "465", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***" } }
**Are you using external storage, if yes which one:** local **Are you using encryption:** no ### Client configuration **Browser:** Yandex **Operating system:** Windows 10 ### Logs #### Web server error log
Web server error log 2018/10/03 20:41:51 [error] 18395#18395: *771 open() "/var/www/weewx/status.php" failed (2: No such file or directory), client: 192.168.1.254, server: redshire.ru, request: "GET /status.php HTTP/1.1", host: "redshire.ru" 2018/10/03 20:41:51 [error] 18395#18395: *771 open() "/var/www/weewx/owncloud/status.php" failed (2: No such file or directory), client: 192.168.1.254, server: redshire.ru, request: "GET /owncloud/status.php HTTP/1.1", host: "redshire.ru" 2018/10/03 20:42:15 [info] 18395#18395: *766 client 62.33.72.5 closed keepalive connection 2018/10/03 20:42:17 [info] 18395#18395: *769 client 62.33.72.5 closed keepalive connection 2018/10/03 20:42:23 [info] 18395#18395: *771 client 192.168.1.254 closed keepalive connection 2018/10/03 20:42:23 [error] 18395#18395: *779 open() "/var/www/weewx/status.php" failed (2: No such file or directory), client: 192.168.1.254, server: redshire.ru, request: "GET /status.php HTTP/1.1", host: "redshire.ru" 2018/10/03 20:42:23 [error] 18395#18395: *779 open() "/var/www/weewx/owncloud/status.php" failed (2: No such file or directory), client: 192.168.1.254, server: redshire.ru, request: "GET /owncloud/status.php HTTP/1.1", host: "redshire.ru" 2018/10/03 20:42:45 [info] 18395#18395: *783 client 62.33.72.5 closed keepalive connection 2018/10/03 20:42:47 [info] 18395#18395: *774 client 62.33.72.5 closed keepalive connection 2018/10/03 20:42:49 [info] 18395#18395: *777 client 62.33.72.5 closed keepalive connection
#### Nextcloud log (data/nextcloud.log)
Nextcloud log {"reqId":"sS3899vVxHPFaxN2NfBm","level":3,"time":"2018-01-11T21:27:41+00:00","remoteAddr":"192.168.1.112","user":"--","app":"PHP","method":"GET","url":"\/","message":"fopen(\/var\/www\/nextcloud\/config\/config.php): failed to open stream: No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Config.php#240","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/62.0.3202.94 YaBrowser\/17.11.0.2191 Yowser\/2.5 Safari\/537.36","version":""} {"reqId":"sS3899vVxHPFaxN2NfBm","level":3,"time":"2018-01-11T21:27:41+00:00","remoteAddr":"192.168.1.112","user":"--","app":"PHP","method":"GET","url":"\/","message":"chmod(): No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Config.php#243","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/62.0.3202.94 YaBrowser\/17.11.0.2191 Yowser\/2.5 Safari\/537.36","version":""} {"reqId":"sS3899vVxHPFaxN2NfBm","level":3,"time":"2018-01-11T21:27:41+00:00","remoteAddr":"192.168.1.112","user":"--","app":"PHP","method":"GET","url":"\/","message":"Doctrine\\DBAL\\Exception\\TableNotFoundException: An exception occurred while executing 'SELECT * FROM \"oc_appconfig\"':\n\nSQLSTATE[HY000]: General error: 1 no such table: oc_appconfig at \/var\/www\/nextcloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractSQLiteDriver.php#58","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/62.0.3202.94 YaBrowser\/17.11.0.2191 Yowser\/2.5 Safari\/537.36","version":""} {"reqId":"oQdNdTg0bOZtyaqtgxZy","level":2,"time":"2018-01-12T06:48:27+00:00","remoteAddr":"192.168.1.254","user":"--","app":"core","method":"POST","url":"\/index.php\/login?redirect_url=\/index.php\/apps\/files\/%3Fdir%3D\/%26fileid%3D2","message":"Login failed: 'admin' (Remote IP: '192.168.1.254')","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/62.0.3202.94 YaBrowser\/17.11.0.2191 Yowser\/2.5 Safari\/537.36","version":"12.0.4.3"} {"reqId":"jCX2TxNeUw6HLz0Eu6LD","level":2,"time":"2018-01-12T06:48:34+00:00","remoteAddr":"192.168.1.254","user":"--","app":"core","method":"POST","url":"\/index.php\/login?user=admin&redirect_url=\/index.php\/apps\/files\/%3Fdir%3D\/%26fileid%3D2","message":"Login failed: 'admin' (Remote IP: '192.168.1.254')","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/62.0.3202.94 YaBrowser\/17.11.0.2191 Yowser\/2.5 Safari\/537.36","version":"12.0.4.3"} {"reqId":"50oyvReyGXf8aVtokw1f","level":2,"time":"2018-01-12T06:48:42+00:00","remoteAddr":"192.168.1.254","user":"--","app":"core","method":"POST","url":"\/index.php\/login?user=admin&redirect_url=\/index.php\/apps\/files\/%3Fdir%3D\/%26fileid%3D2","message":"Login failed: 'admin' (Remote IP: '192.168.1.254')","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/62.0.3202.94 YaBrowser\/17.11.0.2191 Yowser\/2.5 Safari\/537.36","version":"12.0.4.3"} {"reqId":"C0DVpCvEZhocBshJ1jTw","level":3,"time":"2018-01-12T08:10:13+00:00","remoteAddr":"46.29.162.33","user":"--","app":"PHP","method":"GET","url":"\/\/recordings\/","message":"Exception: The requested uri(\/recordings\/) cannot be processed by the script '\/core\/templates\/404.php') at \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Request.php#729","userAgent":"libwww-perl\/6.31","version":"12.0.4.3"} {"reqId":"bMv2UbO4WMSTSPbGJHa4","level":2,"time":"2018-01-12T09:42:56+00:00","remoteAddr":"178.74.243.246","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"178.74.243.246\" tried to access using \"blog.redshire.ru\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 5.0) AppleWebKit\/532.82.39 (KHTML, like Gecko) Version\/5.3.7 Safari\/530.75","version":"12.0.4.3"} {"reqId":"AsSed2qNWbb81Ft7cciA","level":2,"time":"2018-01-12T09:42:57+00:00","remoteAddr":"178.74.243.246","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"178.74.243.246\" tried to access using \"test.redshire.ru\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 5.0) AppleWebKit\/532.82.39 (KHTML, like Gecko) Version\/5.3.7 Safari\/530.75","version":"12.0.4.3"} {"reqId":"KpqvfO914ntf91pHKAEb","level":2,"time":"2018-01-12T09:42:57+00:00","remoteAddr":"178.74.243.246","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"178.74.243.246\" tried to access using \"wp.redshire.ru\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 5.0) AppleWebKit\/532.82.39 (KHTML, like Gecko) Version\/5.3.7 Safari\/530.75","version":"12.0.4.3"}
### Also - nextcloud log contains errors Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:29:21+0300 -- | -- | -- | -- Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:29:21+0300 Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:29:17+0300 Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:29:17+0300 Error | PHP | Array to string conversion at /var/www/nextcloud/lib/private/App/DependencyAnalyzer.php#356 | 2018-10-03T20:28:40+0300 Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:17:53+0300 Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:17:53+0300 Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:16:53+0300 Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:16:53+0300 Error | PHP | Array to string conversion at /var/www/nextcloud/lib/private/App/DependencyAnalyzer.php#356 | 2018-10-03T20:15:59+0300 Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:15:27+0300 Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:15:27+0300 Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:15:23+0300 Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:15:23+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:13:51+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:13:39+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:11:50+0300 Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:10:51+0300 Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:10:51+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:10:30+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:10:26+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:09:47+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:09:39+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:08:05+0300 Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:07:55+0300 Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:07:55+0300 Error | PHP | Undefined index: at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:07:36+0300 Error | PHP | in_array() expects parameter 2 to be array, null given at /var/www/nextcloud/apps/weather/lib/Controller/CityController.php#128 | 2018-10-03T20:07:36+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:07:24+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:03:55+0300 Error | PHP | Undefined offset: 0 at /var/www/nextcloud/lib/private/AppFramework/Http.php#150 | 2018-10-03T20:03:18+0300
nerzhul commented 5 years ago

hmm strange, i tested it on a fresh installation with some french countries and it just works. It seem appframework has problem on your nstallation

vores8 commented 5 years ago

Any specific advices on how to fix this?

nerzhul commented 5 years ago

currently not. Can you try to add "Orsay, FR" and tell me if it works ?

vores8 commented 5 years ago

Same error image

nerzhul commented 5 years ago

hmmm is openweathermap.org api available from your server ?

vores8 commented 5 years ago

for some reason - not anymore. Thanks for advice - fixed it and working now.

nerzhul commented 5 years ago

Thanks, maybe we need to handle the API connection error more properly

RogerWaldrip commented 4 years ago

Looks this issue hasn't been touched in a while. I am unable to add a city also. I get the same on screen error but slightly different in the log file. Here is what I see in the log file.

Array to string conversion at var/www/html/APACHE/nextcloud/lib/private/App/DependencyAnalyzer.php#378

Nextcloud 18.03 is being served from Ubuntu 18.04, MySQL, PHP7.2 and Apache2.4. I get the same on screen error when trying to add a city from a Windows client through Chrome, Firefox or Edge.

I signed up for the API and entered the API number/code in the Weather settings.