Mail: Cannot save attachment to Files in 0.7.8

Created on 15 Jan 2018  路  7Comments  路  Source: nextcloud/mail

Steps to reproduce

  1. Try to save attachment to Files after 0.7.8 update

  2. 3.

Expected behaviour

Actual behaviour

The save button is back (!!!) but got the error message 'Error while saving attachment to Files'

Server configuration detail

Operating system: Linux 4.4.0-108-generic #131-Ubuntu SMP Sun Jan 7 14:34:49 UTC 2018 x86_64

Webserver: Apache/2.4.18 (Ubuntu) (apache2handler)

Database: mysql 5.7.20

PHP version: 7.0.22-0ubuntu0.16.04.1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imagick, imap, intl, json, exif, mcrypt, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 12.0.4 - 12.0.4.3

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array

List of activated apps

Enabled:
 - activity: 2.5.2
 - bruteforcesettings: 1.0.3
 - calendar: 1.5.7
 - comments: 1.2.0
 - dav: 1.3.0
 - encryption: 1.6.0
 - external: 2.0.3
 - federatedfilesharing: 1.2.0
 - federation: 1.2.0
 - files: 1.7.2
 - files_clipboard: 0.6.5
 - files_external: 1.3.0
 - files_pdfviewer: 1.1.1
 - files_sharing: 1.4.0
 - files_texteditor: 2.4.1
 - files_trashbin: 1.2.0
 - files_versions: 1.5.0
 - files_videoplayer: 1.1.0
 - firstrunwizard: 2.1
 - gallery: 17.0.0
 - issuetemplate: 0.3.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.0.0
 - mail: 0.7.8
 - metadata: 0.6.0
 - nextcloud_announcements: 1.1
 - notifications: 2.0.0
 - oauth2: 1.0.5
 - passman: 2.1.4
 - password_policy: 1.2.2
 - provisioning_api: 1.2.0
 - quota_warning: 1.1.1
 - ransomware_protection: 1.0.5
 - serverinfo: 1.2.0
 - sharebymail: 1.2.0
 - survey_client: 1.0.0
 - systemtags: 1.2.0
 - tasks: 0.9.5
 - theming: 1.3.0
 - twofactor_backupcodes: 1.1.1
 - updatenotification: 1.2.0
 - workflowengine: 1.2.0
Disabled:
 - admin_audit
 - contacts
 - dashboard
 - deck
 - onlyoffice
 - user_external
 - user_ldap

Configuration (config/config.php)

{
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "*"
    ],
    "datadirectory": "\/var\/lib\/nextcloud\/data",
    "overwrite.cli.url": "http:\/\/localhost",
    "dbtype": "mysql",
    "version": "12.0.4.3",
    "dbname": "nextcloud",
    "dbhost": "localhost",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "ocsLI9gDP9Cc",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "redis": {
        "dbindex": "0",
        "host": "localhost",
        "port": "6379",
        "timeout": "1.5"
    },
    "maintenance": false,
    "theme": "",
    "loglevel": 0,
    "updater.release.channel": "stable",
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_from_address": "info",
    "mail_domain": "iscan.pro",
    "mail_smtpauth": 1,
    "mail_smtphost": "mail.your-server.de",
    "mail_smtpport": "465",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpsecure": "ssl"
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

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';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:57.0) Gecko/20100101 Firefox/57.0

Operating system:

Logs

Browser log

Insert your webserver log here 

Nextcloud log

`` Insert your Nextcloud log here OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROMPREFIXmail_accounts` WHERE user_id = ? and id = ?"; parameters Array ( [0] => offrc [1] => ) ; limit ""; offset ""

/var/www/nextcloud/lib/public/AppFramework/Db/Mapper.php - line 359: OCP\AppFramework\Db\Mapper->findOneQuery('SELECT * FROM `...', Array, NULL, NULL)
/var/www/nextcloud/apps/mail/lib/Db/MailAccountMapper.php - line 49: OCP\AppFramework\Db\Mapper->findEntity('SELECT * FROM `...', Array)
/var/www/nextcloud/apps/mail/lib/Service/AccountService.php - line 108: OCA\Mail\Db\MailAccountMapper->find('offrc', NULL)
/var/www/nextcloud/apps/mail/lib/Service/UnifiedMailbox.php - line 144: OCA\Mail\Service\AccountService->find('offrc', NULL)
/var/www/nextcloud/apps/mail/lib/Service/UnifiedMailbox.php - line 116: OCA\Mail\Service\UnifiedMailbox->resolve('683')
/var/www/nextcloud/apps/mail/lib/Controller/MessagesController.php - line 302: OCA\Mail\Service\UnifiedMailbox->getAttachment('683', 2)
[internal function] OCA\Mail\Controller\MessagesController->saveAttachment(-1, 'YWxsLWluYm94ZXM...', '683', 2, '/Carti/Malpraxi...')
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Mail\Controller\MessagesController), 'saveAttachment')
/var/www/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Mail\Controller\MessagesController), 'saveAttachment')
/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('OCA\\Mail\\Contro...', 'saveAttachment', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
/var/www/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
/var/www/nextcloud/lib/base.php - line 1004: OC\Route\Router->match('/apps/mail/api/...')
/var/www/nextcloud/index.php - line 48: OC handleRequest()
{main}

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

3. to review bug high regression

Most helpful comment

馃憤 馃憤 it works!!

Thanks a lot Cristoph for your efforts! Thanks to the rest of the guys also!!

All 7 comments

馃槩

@laurentiu2 could you please post the requested URL from the browser network tab? I'm curious about the account ID sent (whether it's -1 or not)

Thanks. Will investigate.

Thank you!!

Please help testing 0.7.9: https://github.com/nextcloud/mail/pull/726

馃憤 馃憤 it works!!

Thanks a lot Cristoph for your efforts! Thanks to the rest of the guys also!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benks-io picture benks-io  路  4Comments

jancborchardt picture jancborchardt  路  4Comments

UtechtDustin picture UtechtDustin  路  3Comments

jancborchardt picture jancborchardt  路  4Comments

fsedarkalex picture fsedarkalex  路  5Comments