From: Steinar Bang <sb@dod.no>
To: ding@gnus.org
Subject: gnus-cloud: Invalid base64 data (Was: gnus-cloud work)
Date: Wed, 03 Aug 2016 09:44:53 +0200 [thread overview]
Message-ID: <86y44el2iy.fsf_-_@dod.no> (raw)
In-Reply-To: <864m72mi84.fsf@dod.no>
I'm back from vacation and I tried my first real '~ d' on a different
emacs today, and got the message:
Invalid base64 data
Since the EPG stuff didn't work for me, I have the following
customization valur in .emacs (including the .emacs on the computer I'm
trying to do the download on):
'(gnus-cloud-storage-method (quote base64-gzip))
I have checked the actual message in the Maildir folder on the computer
I'm running Dovecot on, and its body looks to be valid base64, including
padding with two trailing "==". The base64 part of the body also
decodes with no error message using the base64-decode-region function.
However, the start of the message looks like this:
Gnus-Cloud-Version 1
H4sIAGKcoVcAC8Q8a3PbtrKfk5n+BwzvnbHkhIok24mjnHtjx0kfc1qnU/u0nbHdHoiEJNYkoBCg
...
Could it be that "Gnus-Cloud-Version 1"+RET is part of the stuff that is
tried to be decoded as base64?
Here's the stack trace from the error:
Debugger entered--Lisp error: (error "Invalid base64 data")
base64-decode-region(1 986312)
(cond ((memq gnus-cloud-storage-method (quote (base64 base64-gzip))) (base64-decode-region (point-min) (point-max))) ((eq gnus-cloud-storage-method (quote base64-gzip)) (call-process-region (point-min) (point-max) "gunzip" t (current-buffer) nil "-c")) ((eq gnus-cloud-storage-method (quote epg)) (let* ((context (epg-make-context (quote OpenPGP))) (data (epg-decrypt-string context (buffer-substring-no-properties (point-min) (point-max))))) (delete-region (point-min) (point-max)) (insert data))) ((null gnus-cloud-storage-method) (gnus-message 5 "Reading cloud data as plaintext")) (t (gnus-error 1 "Invalid cloud storage method %S" gnus-cloud-storage-method)))
gnus-cloud-decode-data()
(cond ((= version 1) (gnus-cloud-decode-data) (goto-char (point-min)) (gnus-cloud-parse-version-1)) (t (error "Unsupported Cloud chunk version %s" version)))
(progn (mm-disable-multibyte) (insert data) (cond ((= version 1) (gnus-cloud-decode-data) (goto-char (point-min)) (gnus-cloud-parse-version-1)) (t (error "Unsupported Cloud chunk version %s" version))))
(unwind-protect (progn (mm-disable-multibyte) (insert data) (cond ((= version 1) (gnus-cloud-decode-data) (goto-char (point-min)) (gnus-cloud-parse-version-1)) (t (error "Unsupported Cloud chunk version %s" version)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (mm-disable-multibyte) (insert data) (cond ((= version 1) (gnus-cloud-decode-data) (goto-char (point-min)) (gnus-cloud-parse-version-1)) (t (error "Unsupported Cloud chunk version %s" version)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (mm-disable-multibyte) (insert data) (cond ((= version 1) (gnus-cloud-decode-data) (goto-char (point-min)) (gnus-cloud-parse-version-1)) (t (error "Unsupported Cloud chunk version %s" version)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(let ((version (string-to-number (match-string 1))) (data (buffer-substring (point) (point-max)))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (mm-disable-multibyte) (insert data) (cond ((= version 1) (gnus-cloud-decode-data) (goto-char ...) (gnus-cloud-parse-version-1)) (t (error "Unsupported Cloud chunk version %s" version)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
(save-excursion (if (looking-at "Gnus-Cloud-Version \\([0-9]+\\)") nil (error "Not a valid Cloud chunk in the current buffer")) (forward-line 1) (let ((version (string-to-number (match-string 1))) (data (buffer-substring (point) (point-max)))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (mm-disable-multibyte) (insert data) (cond (... ... ... ...) (t ...))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))))
gnus-cloud-parse-chunk()
(cons (gnus-cloud-parse-chunk) chunks)
(setq chunks (cons (gnus-cloud-parse-chunk) chunks))
(while (re-search-forward "^Gnus-Cloud-Version " nil t) (beginning-of-line) (setq chunks (cons (gnus-cloud-parse-chunk) chunks)) (forward-line 1))
(save-current-buffer (set-buffer nntp-server-buffer) (goto-char (point-min)) (while (re-search-forward "^Gnus-Cloud-Version " nil t) (beginning-of-line) (setq chunks (cons (gnus-cloud-parse-chunk) chunks)) (forward-line 1)))
(progn (nnimap-request-articles (nreverse articles) gnus-cloud-group-name) (save-current-buffer (set-buffer nntp-server-buffer) (goto-char (point-min)) (while (re-search-forward "^Gnus-Cloud-Version " nil t) (beginning-of-line) (setq chunks (cons (gnus-cloud-parse-chunk) chunks)) (forward-line 1))))
(if articles (progn (nnimap-request-articles (nreverse articles) gnus-cloud-group-name) (save-current-buffer (set-buffer nntp-server-buffer) (goto-char (point-min)) (while (re-search-forward "^Gnus-Cloud-Version " nil t) (beginning-of-line) (setq chunks (cons (gnus-cloud-parse-chunk) chunks)) (forward-line 1)))))
(let ((articles nil) chunks) (let ((--dolist-tail-- (gnus-cloud-available-chunks)) header) (while --dolist-tail-- (setq header (car --dolist-tail--)) (if (> (gnus-cloud-chunk-sequence (aref header 1)) (or sequence-override gnus-cloud-sequence -1)) (progn (if (string-match (format "storage-method: %s" gnus-cloud-storage-method) (aref header 1)) (setq articles (cons ... articles)) (gnus-message 1 "Skipping article %s because it didn't match the Gnus Cloud method %s: %s" (aref header 0) gnus-cloud-storage-method (aref header 1))))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (if articles (progn (nnimap-request-articles (nreverse articles) gnus-cloud-group-name) (save-current-buffer (set-buffer nntp-server-buffer) (goto-char (point-min)) (while (re-search-forward "^Gnus-Cloud-Version " ni
l t) (beginning-of-line) (setq chunks (cons (gnus-cloud-parse-chunk) chunks)) (forward-line 1))))) (if update (mapcar (function gnus-cloud-update-all) chunks) chunks))
gnus-cloud-download-data(t)
gnus-cloud-download-all-data()
call-interactively(gnus-cloud-download-all-data nil nil)
command-execute(gnus-cloud-download-all-data)
next prev parent reply other threads:[~2016-08-03 7:44 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 3:11 check mtime of newsrc.eld before saving it Ted Zlatanov
2014-10-07 3:49 ` Eric Abrahamsen
2014-10-14 19:41 ` Ted Zlatanov
2015-01-27 1:40 ` Lars Ingebrigtsen
2015-02-04 11:39 ` Ted Zlatanov
2015-02-04 21:05 ` Steinar Bang
2015-02-04 22:40 ` Ted Zlatanov
2015-05-20 15:53 ` Any cloudy news...? (Was: check mtime of newsrc.eld before saving it) Steinar Bang
2015-06-07 21:28 ` Trying to get gnus-sync working with plink (Was: Any cloudy news...?) Steinar Bang
2015-06-08 16:15 ` Trying to get gnus-sync working with plink Steinar Bang
2015-06-08 16:25 ` Steinar Bang
2015-06-09 10:24 ` Sivaram Neelakantan
2015-06-09 14:47 ` Steinar Bang
2016-03-07 14:10 ` gnus-sync work (was: Trying to get gnus-sync working with plink) Ted Zlatanov
2016-05-19 22:45 ` gnus-sync work Dave Abrahams
2016-05-20 17:43 ` Steinar Bang
2016-05-24 19:17 ` Ted Zlatanov
2016-05-31 21:33 ` Dave Abrahams
2016-06-01 5:38 ` Steinar Bang
2016-06-05 20:27 ` Dave Abrahams
2016-06-07 18:22 ` Ted Zlatanov
2016-06-07 19:53 ` Steinar Bang
2016-06-15 18:55 ` gnus-cloud work (was: gnus-sync work) Ted Zlatanov
2016-06-17 20:21 ` gnus-cloud work Ted Zlatanov
2016-06-20 12:21 ` Steinar Bang
2016-06-20 19:10 ` Steinar Bang
2016-06-20 19:56 ` Steinar Bang
2016-06-21 15:39 ` Steinar Bang
2016-06-21 17:35 ` Andreas Schwab
2016-06-21 18:05 ` Steinar Bang
2016-06-21 18:52 ` Steinar Bang
2016-06-27 14:09 ` Ted Zlatanov
2016-06-27 15:07 ` Steinar Bang
2016-06-27 15:43 ` Ted Zlatanov
2016-07-03 10:10 ` Steinar Bang
2016-07-03 17:05 ` Steinar Bang
2016-07-05 2:39 ` Ted Zlatanov
2016-07-06 21:19 ` Steinar Bang
2016-07-07 12:52 ` Ted Zlatanov
2016-06-27 14:08 ` Ted Zlatanov
2016-06-30 14:42 ` Eric Abrahamsen
2016-06-30 15:02 ` Ted Zlatanov
2016-07-01 2:00 ` Eric Abrahamsen
2016-07-01 4:27 ` Eric Abrahamsen
2016-07-01 17:44 ` Ted Zlatanov
2016-07-02 1:00 ` Ted Zlatanov
2016-07-06 14:50 ` Ted Zlatanov
2016-07-20 12:58 ` Ted Zlatanov
2016-07-23 20:27 ` Steinar Bang
2016-07-24 13:33 ` Steinar Bang
2016-07-24 13:38 ` Steinar Bang
2016-07-24 14:46 ` Steinar Bang
2016-07-25 13:00 ` Ted Zlatanov
2016-07-25 17:42 ` Andreas Schwab
2016-07-26 2:09 ` Ted Zlatanov
2016-07-26 8:15 ` Steinar Bang
2016-07-26 14:14 ` Ted Zlatanov
2016-07-26 18:42 ` Steinar Bang
2016-07-26 18:55 ` Steinar Bang
2016-07-26 19:46 ` Ted Zlatanov
2016-07-26 21:19 ` Steinar Bang
2016-07-27 14:00 ` Ted Zlatanov
2016-07-27 15:59 ` Steinar Bang
2016-07-28 13:37 ` Ted Zlatanov
2016-07-28 17:18 ` Steinar Bang
2016-07-28 17:41 ` Ted Zlatanov
2016-07-28 20:50 ` Steinar Bang
2016-07-29 20:35 ` Steinar Bang
2016-07-29 23:04 ` What happenend Gmane? (Was: Re: gnus-cloud work) Byung-Hee HWANG (황병희)
2016-07-30 6:36 ` What happenend Gmane? Steinar Bang
2016-07-30 8:40 ` Byung-Hee HWANG (황병희)
2016-08-01 16:28 ` gnus-cloud work Ted Zlatanov
2016-08-01 19:34 ` Steinar Bang
2016-08-02 9:59 ` Ted Zlatanov
2016-08-03 7:20 ` Steinar Bang
2016-08-03 7:44 ` Steinar Bang [this message]
2016-09-19 0:06 ` Dave Abrahams
2016-09-20 12:54 ` Ted Zlatanov
2016-09-30 18:27 ` Dave Abrahams
2016-09-30 18:29 ` Dave Abrahams
2016-07-23 20:32 ` Steinar Bang
2016-07-24 7:33 ` Steinar Bang
2015-02-05 3:13 ` check mtime of newsrc.eld before saving it Lars Ingebrigtsen
2015-02-05 4:08 ` Ted Zlatanov
2015-02-05 4:40 ` Lars Ingebrigtsen
2015-02-05 10:49 ` Steinar Bang
2015-02-05 10:59 ` Ted Zlatanov
2015-02-13 6:25 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y44el2iy.fsf_-_@dod.no \
--to=sb@dod.no \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).