fmbiete / Z-Push-contrib

Z-Push fork with changes that I will try to contrib
GNU Affero General Public License v3.0
134 stars 62 forks source link

Broken attachments - Error trying to auto-guess encoding for non-text parts #187

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi

After going from build 1920 to 1938 im getting troubles with displaying pdf attachments in emails, im getting encoding errors will occur and "StatusException: SyncCollections->CheckForChanges(): Timeout forced after 30s from 600s due to other process - code: 3 - file: /var/www/z-push/lib/core/synccollections.php:487"

I have removed the user completely and synced from scratch but still no go, if i go back to the 1920 build everything show as normal and no complaining in the logs.

Devices is iOS 8.3

Do you want me to upload the email or any logs ?

Regards Rune

fmbiete commented 9 years ago

Hi @The70s

The referenced commit should fix the problem. Let me know if it works or break something else.

Also take a look at the config.php option and be sure you have the adequate value set:

    // Your PHP could have a bug when base64 encoding: https://bugs.php.net/bug.php?id=68532
    // NOTE: Run "php testing/testing-bug68532fixed.php" to know what value put here
    define('BUG68532FIXED', false);
ghost commented 9 years ago

Hi Now the pdf are showing again, will test further, thanks I ran the php testing and got that it shall be set to false, which i have done.

I keep getting these messages in z-push.log: 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8) 17/05/2015 12:27:24 [16589] [WARN] [rune@xxxxxxxxx.xxx] /var/www/z-push/lib/default/diffbackend/diffstate.php:185 Undefined index: mod (8)

Btw i am only using imap as backend not combined.

Rune

fmbiete commented 9 years ago

For the undefined index do a z-push-admin.php remove -u user -d device and let the mobile to resynchronize again.

ghost commented 9 years ago

When doing remove im getting this

FatalMisconfigurationException: Not possible to write to the configured state directory. - code: 0 - file: /var/www/z-push/lib/default/filestatemachine.php:80

ghost commented 9 years ago

I had to completely remove the user from the iPhone and add it again, but afterwards syncing again still getting /var/www/z-push/lib/default/diffbackend/diffstate.php:318 Undefined index: mod (8)

fmbiete commented 9 years ago

I think you have a problem with your server configuration.

Look the permissions of your stats folders (/var/lib/z-push by default). Your php-fpm/apache user must have write permission there.

Also you can try the docker images included in the project, they will launch a sane/basic z-push installation, or at least give you some guide to configure your server.

ghost commented 9 years ago

I have done all the docker install script settings and just for test i gave /var/lib/z-push chmod -r 777 and owner is www-data. Also changed the php.ini settings to the docker like settings and rebooted the server, still the same error everytime i enter a folder in iphone/ipad. I running ubuntu 14.04 updated as of today.

fmbiete commented 9 years ago

@The70s , Can you test using Combined; only with IMAP configured? If the error dissapears we have a bug in IMAP importer/exporter. Remember to remove the data from server

ghost commented 9 years ago

When you say remove data do you mean the /var/lib/z-push catalog or more ?

fmbiete commented 9 years ago

The content of /var/lib/z-push