nextcloud / nextcloud/contacts

Contact: error if phone category is empty or email category is "Internet"

Open
#2,297 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
JavaScript
Stars
642
Forks
220
Avg merge
14h 39m
Merged PRs (30d)
51

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
Steps to reproduce
  1. create a contact, but leave category of phone number empty (Thunderbird CardBook-Plugin or equal)
  2. create a contact and change category of email to "Internet"
  3. open contacts in web frontend
  4. an error is shown: "syntax error, Contact cannot be shown" (message is not literally)
  5. Contact is not longer shown in Contactlist
Expected behaviour

Contact should be shown

Actual behaviour

An error message is shown, contact removes from contactlist until reload.

Server configuration

Operating system:
Linux 4.4.59+ aarch64
Web server:

Database:

PHP version:
7.3.16
Nextcloud version: (see Nextcloud admin page)
20.0.5
..Updated from an older Nextcloud/ownCloud or fresh install:
updated
Where did you install Nextcloud from:
web updater
Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.6.0
  - activity: 2.13.4
  - admin_audit: 1.10.0
  - calendar: 2.1.3
  - carnet: 0.23.7
  - cloud_federation_api: 1.3.0
  - comments: 1.10.0
  - contacts: 3.4.3
  - contactsinteraction: 1.1.0
  - cookbook: 0.7.10
  - dashboard: 7.0.0
  - dav: 1.16.2
  - deck: 1.2.3
  - federatedfilesharing: 1.10.2
  - federation: 1.10.1
  - files: 1.15.0
  - files_mindmap: 0.0.24
  - files_pdfviewer: 2.0.1
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.2
  - files_trashbin: 1.10.1
  - files_versions: 1.13.0
  - files_videoplayer: 1.9.0
  - firstrunwizard: 2.9.0
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - nextbackup: 21.1.0
  - nextcloud_announcements: 1.9.0
  - notes: 4.0.2
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - onlyoffice: 6.2.0
  - password_policy: 1.10.1
  - photos: 1.2.3
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - recommendations: 0.8.0
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - support: 1.3.0
  - survey_client: 1.8.0
  - systemtags: 1.10.0
  - tasks: 0.13.6
  - text: 3.1.0
  - theming: 1.11.0
  - twofactor_backupcodes: 1.9.0
  - updatenotification: 1.10.0
  - user_status: 1.0.1
  - viewer: 1.4.0
  - weather_status: 1.0.0
  - workflowengine: 2.2.0
Disabled:
  - encryption
  - files_external
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "10.19.77.250",
            "nas"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.5.2",
        "overwrite.cli.url": "http:\/\/10.19.77.250\/nextcloud",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "has_rebuilt_cache": true,
        "updater.release.channel": "stable",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "587",
        "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:
Firefox 84.0.2
Operating system:
Ubuntu 18.04

Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
{"reqId":"Rnhr6trWj18jNWNMET54","level":1,"time":"2021-01-18T13:27:05+00:00","remoteAddr":"10.19.77.27","user":"--","app":"updater","method":"GET","url":"/nextcloud/core/ajax/update.php?requesttoken=YO2y5LU9ydy8Tc79h8HpTLx7BJ6QGSYiPTujGTrJtqw%3D%3ACbfwledFq5fzFfq68vTbIdA0TOTbVF8bDm3NW0%2BM3Z0%3D","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0","version":"20.0.4.0"}
{"reqId":"Rnhr6trWj18jNWNMET54","level":1,"time":"2021-01-18T13:27:06+00:00","remoteAddr":"10.19.77.27","user":"--","app":"updater","method":"GET","url":"/nextcloud/core/ajax/update.php?requesttoken=YO2y5LU9ydy8Tc79h8HpTLx7BJ6QGSYiPTujGTrJtqw%3D%3ACbfwledFq5fzFfq68vTbIdA0TOTbVF8bDm3NW0%2BM3Z0%3D","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0","version":"20.0.5.2"}
{"reqId":"Rnhr6trWj18jNWNMET54","level":1,"time":"2021-01-18T13:27:06+00:00","remoteAddr":"10.19.77.27","user":"--","app":"updater","method":"GET","url":"/nextcloud/core/ajax/update.php?requesttoken=YO2y5LU9ydy8Tc79h8HpTLx7BJ6QGSYiPTujGTrJtqw%3D%3ACbfwledFq5fzFfq68vTbIdA0TOTbVF8bDm3NW0%2BM3Z0%3D","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0","version":"20.0.5.2"}
{"reqId":"Rnhr6trWj18jNWNMET54","level":1,"time":"2021-01-18T13:27:06+00:00","remoteAddr":"10.19.77.27","user":"--","app":"updater","method":"GET","url":"/nextcloud/core/ajax/update.php?requesttoken=YO2y5LU9ydy8Tc79h8HpTLx7BJ6QGSYiPTujGTrJtqw%3D%3ACbfwledFq5fzFfq68vTbIdA0TOTbVF8bDm3NW0%2BM3Z0%3D","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0","version":"20.0.5.2"}
{"reqId":"AKeCbPibyFNZMxEkv5DM","level":3,"time":"2021-01-19T12:55:40+00:00","remoteAddr":"10.19.77.1","user":"myuser","app":"PHP","method":"GET","url":"/nextcloud/index.php/settings/admin/serverinfo","message":{"Exception":"Error","Message":"Invalid argument supplied for foreach() at /volume1/web/nextcloud/apps/serverinfo/lib/OperatingSystems/DefaultOs.php#158","Code":0,"Trace":[{"file":"/volume1/web/nextcloud/apps/serverinfo/lib/OperatingSystems/DefaultOs.php","line":158,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Invalid argument supplied for foreach()","/volume1/web/nextcloud/apps/serverinfo/lib/OperatingSystems/DefaultOs.php",158,{"interfaces":false,"result":[]}]},{"file":"/volume1/web/nextcloud/apps/serverinfo/lib/Os.php","line":132,"function":"getNetworkInterfaces","class":"OCA\\ServerInfo\\OperatingSystems\\DefaultOs","type":"->","args":[]},{"file":"/volume1/web/nextcloud/apps/serverinfo/lib/Settings/AdminSettings.php","line":111,"function":"getNetworkInterfaces","class":"OCA\\ServerInfo\\Os","type":"->","args":[]},{"file":"/volume1/web/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":141,"function":"getForm","class":"OCA\\ServerInfo\\Settings\\AdminSettings","type":"->","args":[]},{"file":"/volume1/web/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php","line":83,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":[[[{"__class__":"OCA\\ServerInfo\\Settings\\AdminSettings"}]]]},{"file":"/volume1/web/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":152,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["serverinfo"]},{"file":"/volume1/web/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","serverinfo"]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["serverinfo"]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/volume1/web/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"section":"serverinfo","_route":"settings.AdminSettings.index"}]},{"file":"/volume1/web/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/serverinfo"]},{"file":"/volume1/web/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/volume1/web/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0","version":"20.0.5.2"}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the Contacts web frontend using contacts with an empty phone category and an email category of "Internet". Trace the resulting syntax error from the contact list and add coverage showing that both contacts remain visible; done means the contacts display without an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.