Monday, October 22, 2018

#1 2015-01-17 10:09:23 pm

warwickt
Member
Registered: 2010-03-02
Posts: 15

Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

All, There appears to be a very reproducible error "-10000" "Apple Event Handler" regarding the access / use  of Apple Mail email attachments by the OS X applescript terms "mail attachments" in OS X V10.10.1 yosemite. (2014/2015") .

I'd like to entertain any expertise on the matter. Please realise that the syntax (usage) is correct because the applications using the "mail attachments" facility have been in production for 7-8 years and are now inoperable in OS X 10.10.1

Any Apple Script or automator object that references "mail attachments" fails with OS return code "-10000" with error info as "Apple event Handler".

For the sake of brevity and to focus on the precise issue, these EXAMPLE script snippets have ready access to Active Mail.app's the current set of email(s) via OSASCRIPT, Applescript, Automator, Selection or other  in var called "processing_email_messages" as :

Applescript:

tell application "Mail" to set processing_email_messages to

... any email or list

Example #1

Applescript:

tell application "Mail" to get count of mail attachments of first item in processing_email_messages

Example #2

Applescript:

if current_email's mail attachments is not {} then

Example #3

Applescript:

tell application "Mail" to get count of the mail attachments in (first item in processing_email_messages)

This has been reproduced on 6 independent / different 10.10.1 OS X systems and different users spaces (logons ~/)with the same error symptoms and therefore conclude that this issue is within the current OS X 10.10.1.

Symptom of any of these in any construct:
AppleScripts
error "Mail got an error: AppleEvent handler failed." number -10000

Automator: with nodes Get Selected Mail Messages  ->> Get Attachments from Maill Messages
Get Attachments from Mail Messages Failed - Error 1
An error occurred while executing a script: The Operation couldn't be completed. (OSStatus error -10000)

/var/syslog/system.log: these are very consistent.
Mail[49641]: *** Assertion failure in -[MCMimeBody dataForMimePart:], /SourceCache/Mail/Mail-1993/MailCore/MIME/MCMimeBody.m:362
Mail[49641]: An exception was thrown during execution of an NSScriptCommand...
Mail[49641]: This method must be called off the main thread

It appears form web searches that this is not unique to myself as many others have the precise issue that is UNRELATED to syntactic use of Applescript in OSx Mail.app.


I'd appreciate any help or comments on the matter or a workaround would be also very helpful.

Many Thanks
Warwick
Hong Kong

Model: OSX 10.10.1, email processor, automator, applescript
AppleScript: OSX 10.10.1 Yosemite
Browser: Safari 600.2.5
Operating System: Mac OS X (10.8)

Offline

 

#2 2015-01-18 05:49:09 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3268

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

I'm really puzzled.
Here mail attachments seems to behave flawlessly.
For tests, I created a mailbox in which I moved a message with two attached pictures.
I ran a short script and you may see the results in comments :

Applescript:

tell application "Mail"
   count messages of mailbox "abc"
   --> 1
   count mail attachments of message 1 of mailbox "abc"
   --> 2
   mail attachments of message 1 of mailbox "abc"
   --> {mail attachment id "1.2" of message id 29686 of mailbox "abc" of application "Mail", mail attachment id "1.3" of message id 29686 of mailbox "abc" of application "Mail"}
   
   properties of mail attachments of message 1 of mailbox "abc"
   --> {{downloaded:true, MIME type:"image/bmp", name:"Pièce jointe.bmp", file size:4494, class:mail attachment, id:"1.2"}, {downloaded:true, MIME type:"image/bmp", name:"Pièce jointe.bmp", file size:1398, class:mail attachment, id:"1.3"}}
end tell

If your first script was complete, it would have been easier to run your different tests.
As far as I know, tell application "Mail" to set processing_email_messages to
is not a complete instruction.

Yvan KOENIG (VALLAURIS, France) dimanche 18 janvier 2015 12:48:24

Last edited by Yvan Koenig (2015-01-18 05:51:36 am)

Offline

 

#3 2015-01-18 07:47:26 am

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hello Yvan thanks for your reply, I was hoping you might be one to offer advice. Firstly the "instruction/statement " you mention obviously won't parse.., I assuming those with expertise would assume correctly that the "to some_varnam" was suffixed😉 assume the statements have superfluous info omitted

That said, I'm surprised you did not experience  this -10000 error as it has been quite frustrating to find a workaround.

Simply using one of this examples below with single statement with mail.app active AND. A selection will always fail for us

Looking at your example, Id like to add that I DID NOT specifically address a mailbox in these statements .
The actually error had appeared in a series of mail rules the instant we used them with OSX 10.10.1 .

The code unit is tasked an array of mail messages, not a whole  mailbox.   Perhaps you might verify this for me .

With the exception of "mail attachment" all else seems to work with "mail" in AppleScript

I will add keywords to existing statements to force them to specifically address the message in the MAILBOX rather than assuming the one handed to the ode from a rule or even a selection or from an Automator test stub

Unit testing these fragments has led me to this post as it appears these code statements have been error free for years. Thus I believe the usage sound and should not require recoding for 10.10.1

I thing the error logged "must be run from main thread" offers a keys to the root if this issue.

Thanks for looking at this I'm afraid that this looks like an actual is 10.10.1 flaw

Kind regards
Warwick
Hong Kong

Offline

 

#4 2015-01-18 08:33:14 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3268

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

I made complementary tests and got the error -10000 for some message belonging to the account iCloud.

Here is the script used for tests :

Applescript:

tell application "Mail"
   set processing_email_messages to (get selection)
   set messages_with_attachments to {}
   repeat with i from 1 to count processing_email_messages
       set aMessage to item i of processing_email_messages
       # Try block required because here an error is issued when a message belongs to account iCloud
       try
           if (count mail attachments of aMessage) > 0 then
               log aMessage
               set end of messages_with_attachments to aMessage
           end if
       on error errMsg number errNbr
           log "error # " & errNbr & return & errMsg
       end try
   end repeat
   messages_with_attachments
end tell

Honestly, I'm surprised by the fact that you missed the link between the encountered error and the account owning the messages.

Yvan KOENIG (VALLAURIS, France) dimanche 18 janvier 2015 15:31:29

Last edited by Yvan Koenig (2015-01-18 08:35:27 am)

Offline

 

#5 2015-01-18 09:48:56 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3268

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

I continued my search.
The messages which issued an error are those containing large attachments which are not embedded in the raw content.
These objects have this kind of descriptor :

Content-Transfer-Encoding: BASE64
Content-Disposition: ATTACHMENT;
    filename=P1070542.jpg
Content-Type: IMAGE/JPEG;
    name=P1070542.jpg
X-Apple-Content-Length: 991146

I don't know the exact limit but here are some lengths which gave the error :

1,820,944
1,241,316
991,146
703,180
526,782
189,484

I have a message with an attached Pages package which is embedded with a scheme which I don't understand :
its header is :

Content-Disposition: ATTACHMENT;
    filename="Menu Rework Sep 2014.pages.zip"
Content-Type: APPLICATION/ZIP;
    name="Menu Rework Sep 2014.pages.zip";
    x-mac-auto-archive=yes
Content-Transfer-Encoding: BASE64

but when the message is displayed, the document appear as a normal Pages document, not a zipped one.
The package is 7,345,701 bytes long,
7,240,724 ones when zipped.

Yvan KOENIG (VALLAURIS, France) dimanche 18 janvier 2015 16:48:48

Offline

 

#6 2015-01-19 12:42:26 am

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hello Yvan, again thank you for your comments and advice. To be very very clear and concise, For you and others reviewing this issue and attempting to derive a resolution or workaround for this issue, I will be VERY SPECIFIC about the  scenario to avoid any confusion with the:

1) syntax, punctuation and usage of the  statements by consolidating the issue into a single easy to grasp statement that causes the -10000 Apple Event Hander Error
2) this error happens when the statement included the term "mail attachments" is use against ANY  Apple OS X MAil.app account with ANY IMAP account on any MAC 10.10.1 system on any user (several) that is accessing on any EMAIL server referenced in the APPLESCRIPT environment and as you point out even  iCloud accounts. (The original error was not drawn in any child accounts as these are not used with this MAIL RULE or Automator script
3) we maintain our own in-house email server as well under OS X SERVER ,  APPLE OSX  Server HOSTED, happens on these too,  and this is again reproducible from gmail account if you have to use those blokes.
4) the type or mime type or size or the number of the attachment is irrelevant . It happens with only one attachment.
5) the error was appaent initially on OS X 10.10.1 in several email rules under OS X Mail.app.
6) it is easily  reproducible from the script editor or Automator with an active email application
6) the error manifests itself continually as:

error "Mail got an error: AppleEvent handler failed." number -10000


in UI or SCRIPT or as described in OP

and in /var/log/system.log

Mail[……]: *** Assertion failure in -[MCMimeBody dataForMimePart:], /SourceCache/Mail/Mail-nnn/MailCore/MIME/MCMimeBody.m:nnn
Mail[….]: An exception was thrown during execution of an NSScriptCommand...
Mail[….]: This method must be called off the main thread


this statement will ALWAYS fail with -10000 Apple Event Handler

7) to add to your test case, simply send and email with  an attachment to an email account in your Apple mail.app mailbox to account EXAMPLE  "your_account_on_a_server_somewhere@your_email_somewhere.com).

In it's receipt, kick off the Apple Script editor and run list line.. AGAIN.. use YOUR email account for the string "your_account_on_a_server_somewhere"

Applescript:

tell application "Mail" to set current_mail_account_mailboxes_inbox_first_message_attachments_attachment_count to count of attachments in mail attachments of (last message of mailbox "INBOX" of account "your_account_on_a_server_somewhere")

If readers are not sure  of what they have in the way of accounts on the CURRENTLY LOGGED IN USER in their Mail.app simply access the preferences and use the string in the preferences/accounts/account information/ description or simply pull/run/execute this statement in a script editor as:

Applescript:

get every account

Lastly this error is not unique to our macs as others have a similar issue. Sadly is not an local to our own MAC environment.

Cheers and thanks again from Hong Kong
Warwick

Offline

 

#7 2015-01-19 05:03:35 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3268

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

I selected every mailboxes (50) then typed command + A so Mail said that 10,503 messages were selected.
One account is an iCloud one (imap)
One is a Gmail one (imap)
Three are SFR ones (pop)
One is a LaPoste one (pop)
I apologize but I must repeat that on my machine, only 24 messages from my account iCloud issue the error #-10000.
Some are in the INBOX mailbox, other are in the Sent Messages of the named account.
Of course, it may be because only messages in my iCloud account have large attachments.

May you try to replace your instruction :

Applescript:

tell application "Mail" to set current_mail_account_mailboxes_inbox_first_message_attachments_attachment_count to count of attachments in mail attachments of (last message of mailbox "INBOX" of account "your_account_on_a_server_somewhere")

by

Applescript:

tell application "Mail" to set current_mail_account_mailboxes_inbox_first_message_attachments_attachment_count to count mail attachments of (last message of mailbox "INBOX" of account "your_account_on_a_server_somewhere")

As far as I know, a mail attachment doesn't contain an attachment, it is an attachment.

Yvan KOENIG (VALLAURIS, France) lundi 19 janvier 2015 12:03:27

Offline

 

#8 2015-01-19 05:34:45 am

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hi Yvan, many thanks for your reply. Yes I have replaced the script statement copied EXACTLY from your paost nd changed the email account name. I've tried this various form of syntax prior to initial posting. I rather think it's a defect/flaw with Application "mail" and the processing of the terms "mail attachment" in 10.10.1

so.... it failed sadly.

Applescript:

tell application "Mail" to set current_mail_account_mailboxes_inbox_first_message_attachments_attachment_count to count mail attachments of (last message of mailbox "INBOX" of account "Gmail - warwick test account")

There is ONLY one email in this test gmail account. The attachment is a 30KB object of compressed, random blob... can be anything.

With my mail.app active (open) , The above statement it fails unfortunately with

error "Mail got an error: AppleEvent handler failed." number -10000


/var/syslog/system.log

Jan 19 19:23:22 macpro-Mail[280]: *** Assertion failure in -[MCMimeBody dataForMimePart:], /SourceCache/Mail/Mail-nnnn/MailCore/MIME/MCMimeBody.m:mmm
Jan 19 19:23:22 macpro Mail[280]: An exception was thrown during execution of an NSScriptCommand...
Jan 19 19:23:22 macpro Mail[280]: This method must be called off the main thread


Looking forward to any other suggestions.

Thanks again Yvan.
warwick
Hong Kong

Offline

 

#9 2015-01-19 06:50:34 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3268

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

As I wrote, maybe it's because it's the only one containing messages with attachment breaking a "rule" that only my iCloud account is able to issue the error #-10000.

You may send the message which causes the problem on your machine to my gmail account.

My address is : yvankoenig <at> gmail <period> com

After sending this message I will boot in Mavericks.
Some of the messages for which I get the error #-10000 are old enough to be available in the volume using this operating system. I will see if I get the same behavior.

Yvan KOENIG (VALLAURIS, France) lundi 19 janvier 2015 13:50:27

Offline

 

#10 2015-01-19 07:38:24 am

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hi Yvan, again many thanks for your kind offer however I will decline it because the error is unrelated to the actual attachment size, type or number of them.

For example, I can attach a single, modest or outrageous (300x) attachments of various size WITHIN the limited of the EMAIL sendmail attachment size quota, email it and then the processes the RECEIVED INBOX statement we've been dealing with in previous post will fail.

I can confirm in the last 10 minutes that I DO NOT GET THE ERROR on OS X 10.9.x or as far back as OS X 10.5. I CONFIRM that the set of applescripts that use these "mail attachment" terms, functions correctly on one of our OS X 10.9.x  netboot (complete) test and diagnostic systems.

So seems related to OSx 10.10.x

Looking forward to any further comments.

Thanks again

Warwick
Hong Kong

Offline

 

#11 2015-01-19 07:54:51 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3268

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

As I wished to be sure that I will have the "offending" messages in Mavericks, on my Yosemite volume, I moved them from INBOX of iCloud into a "standard" mailbox named "aaa".
When I was in Mavericks, I imported these messages.

After the import process, under Mavericks, I selected all the messages available in my iCloud INBOX and ran the script : I didn't got the error #-10000.
Then I selected the imported messages and ran the script : no more error #-10000.

Back under Yosemite, I selected the messages from the mailbox "aaa" and ran the script.
No more error #-10000.
I tried to move back the messages in the INBOX of iCloud account but no luck, some of them moved correctly, others remained in "aaa".

As I am curious, I forwarded one of the message which gave the error #-10000 to my gmail address.
At this time I didn't received it.

Yvan KOENIG (VALLAURIS, France) lundi 19 janvier 2015 14:54:30

Offline

 

#12 2015-01-19 03:00:32 pm

majoja_hh
Member
Registered: 2015-01-19
Posts: 1

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hi,

This solved my problem with mail attachments error -10000 in AppleScript and Automator on my MacBook

Step 1: Quit Application Mail  and delete files

Envelope Index
Envelope Index-shm
Envelope Index-wal

from Library/Mail/V2/MailData

Step 2: Restart Mail und Rebuild Mail database

cheers

Mario

Last edited by majoja_hh (2015-01-19 03:03:32 pm)

Offline

 

#13 2015-01-19 04:57:40 pm

mark hunte
Member
From:: Hello, London Calling
Registered: 2006-03-20
Posts: 1030
Website

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hi All,

FYI

I filed a bug report  (below) with Apple: Nov. 2014 . Apple closed my Bug report on this as a duplicate
BUG REPORT:
As of 10.9  and 10.10 ( Yosemite) you can no longer access Mail.app's 'mail attachments' from Applescript.

This means you cannot save or count them.
You will 9 times out of 10 get resulting  error "error "Mail got an error: AppleEvent handler failed." number -10000"
This appears to happen for 90% of the emails that are in an inbox, individual or consolidated ones.
This bug is reproducible when using a "get selection" Applescripts
This bug is reproducible when Performing a "Run Applescript" action in the Mail.app mail Rules


Hopefully apple will fix this soon.

Last edited by mark hunte (2015-01-19 05:00:52 pm)


Tap,tap,tap , hello , testing 1..2,  1...2,
http://www.markosx.com/thecocoaquest/

Offline

 

#14 2015-01-19 10:06:52 pm

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

majoja_hh wrote:

Hi,

This solved my problem with mail attachments error -10000 in AppleScript and Automator on my MacBook

Step 1: Quit Application Mail  and delete files

Envelope Index
Envelope Index-shm
Envelope Index-wal

from Library/Mail/V2/MailData

Step 2: Restart Mail und Rebuild Mail database

cheers

Mario


Hi Mario,thanks for your comments.  I believe you have just been lucky or fortunate that this procedure changed "something" on out mac's ~/ account that caused data examination form the "mail attachments" code path not to fail on OS X 10.10.1.

Certainly the removal of those Apple Mail indexes (a good old trick) causes a rebuild (which one may do indirectly to a less effective manner) through the Mailbox Application menu.

Our testing has manifested this error 99% of the time with a NEW mail account with a single message or the other extreme a 2001 email box with an inordinate number of messages and attachments.

Yvan made a point of this earlier.

Sadly this is looks still like a  DEFECT in the implementation of the Applescript term "mail attachments" in OSx 10.10.1.

Form our experience so far, keep your fingers and legs crossed  because this failing symptom will return when you least expect it... good Luck!

Warwick
Hong Kong

Offline

 

#15 2015-01-19 10:17:38 pm

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

mark hunte wrote:

Hi All,

FYI

I filed a bug report  (below) with Apple: Nov. 2014 . Apple closed my Bug report on this as a duplicate
BUG REPORT:
As of 10.9  and 10.10 ( Yosemite) you can no longer access Mail.app's 'mail attachments' from Applescript.

This means you cannot save or count them.
You will 9 times out of 10 get resulting  error "error "Mail got an error: AppleEvent handler failed." number -10000"
This appears to happen for 90% of the emails that are in an inbox, individual or consolidated ones.
This bug is reproducible when using a "get selection" Applescripts
This bug is reproducible when Performing a "Run Applescript" action in the Mail.app mail Rules


Hopefully apple will fix this soon.


Hi Mark, yes I recall running over whilst searching this issue your post or similar somewhere that this issues had been logged with Apple. Thanks for doing this back  in November. We have only seen this since December when we migrated all out production stuff from OS X 10.9.5 to 10.10.1.

AN adjuct to this albeit "noise" was that SOME  OS X 10.7.x Apple Script mail terms caused -11000 and -10000 failures with "assertion" errors and "thread out of line" messages and Apple resolved this expeditiously at the time. Although, I am surprised that seeing a fair few of us have had this issue that it was not seen during Yosemite beta testing...

I agree with your own findings that this is a DEFECT in the processing of the term "mail attachments". I'd like a workaround of course.

Alas we will have to wait and deal with our situation manually as we rely somewhat on APPLE Mail rules.

All, thanks again for your comments and ideas.

I will update this thread and close it once a satisfactory resolution is found.

Warwick
Hong Kong

Offline

 

#16 2015-01-20 12:37:20 am

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Of late poster twtwtw on  apple discussion forums https://discussions.apple.com/thread/6782947 made mention of a likely mail "cache" issue.

We had looked at something similar and looked again and could not find anything definitive in 10.10.1.

The information is at a recent post at https://discussions.apple.com/thread/6782947 and won't be duplicated here.

any clues would be graciously accepted.

warwick
Hong Kong

Offline

 

#17 2015-01-22 07:32:44 pm

mark hunte
Member
From:: Hello, London Calling
Registered: 2006-03-20
Posts: 1030
Website

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Don't know why but I was hoping that since apple have screwed some of the commands in JXA  , like not being able to get the album art using rawdata of data for iTunes. Then maybe they had done the reverse here.


So tried it.

Applescript:

Mail = Application('Mail')

var theAtt =Mail.selection()[0].mailAttachments()[0].name()

theAtt

//--On My Mac mailbox: --> "photo 1.JPG"

//--iCload mailbox: --> Error -10000: AppleEvent handler failed.

And pretty much the same results. Same email but one stored in mailbox 'On My Mac' and one in the inbox (icloud)

On My Mac mailbox: --> "photo 1.JPG"

iCload  mailbox: --> Error -10000: AppleEvent handler failed.



I have had more luck with emails stored in  'On My Mac' than ones referenced to the inboxes. But have had the issue there also.


I really do think the issues is not the emails or attachments but how Apple have implemented changes in Mail.app or Applescript

Last edited by mark hunte (2015-01-22 07:35:30 pm)


Tap,tap,tap , hello , testing 1..2,  1...2,
http://www.markosx.com/thecocoaquest/

Offline

 

#18 2015-01-22 07:47:39 pm

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hi Mark, that's also very interesting.  Thanks for that post. This flaw in the "mail attachment" term processing will have to be addressed by an Apple OS X internal s/w fix and I have resigned to having to wait for it.

BTW for you and other readers the continued thread fro Apple forums user twtwtw has some reasonable views concerning this issue.

The thread is at: https://discussions.apple.com/thread/6782947

Thanks again.

Warwick
Hong Kong

Offline

 

#19 2015-01-22 09:17:38 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5454

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

I hope you guys are logging all these problems at bugreport.apple.com. That's the best way you can try to influence things.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

#20 2015-01-22 09:24:42 pm

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hi Shane, yes fair point! yeah this has been logged apparently by a few people since November 2014, including one of the people in this thread. Two people have pointed out that it has been accepted or made a DUPLICATE or some terminology that means it has been acknowledged as a defect by Apple.

[whinge] I hope it's resolved soon OS X 10.10.2 because the production workflows we use from clients has some reliance on this term "mail attachment" in our mail rules.

cheers mate

Warwick
Hong Kong

Offline

 

#21 2015-01-22 09:28:05 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5454

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

warwickt wrote:

Hi Shane, yes fair point! yeah this has been logged apparently by a few people since November 2014, including one of the people in this thread. Two people have pointed out that it has been accepted or made a DUPLICATE or some terminology that means it has been acknowledged as a defect by Apple.


Right, but duplicates act as a sort of voting mechanism -- the more, the merrier.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

#22 2015-01-23 04:10:18 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3268

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

point 1 : I sent my own report
At this time it's not flagged as a duplicate. Maybe because the given details made a difference.
point 2 : At this time the problem is always striking in the late 10.10.2 beta version.


Yvan KOENIG (VALLAURIS, France) vendredi 23 janvier 2015 11:10:07

Last edited by Yvan Koenig (2015-01-23 04:11:41 am)

Offline

 

#23 2015-01-23 04:11:33 am

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Hi Yvan, great work thanks!

Warwick
Hong kong

Offline

 

#24 2015-07-26 07:46:45 pm

cogden
Member
Registered: 2007-06-05
Posts: 2

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Still no fix from Apple under Yosemite 10.0.4?

Running the simplest script throws a -10000 error for any reference to "mail attachments." Since the base access to attachments is broken, am I correct in assuming that any and all scripts to automatically save our incoming attachments to a "downloads" folder are impossible?

Simple to reproduce; Select a mail item with attachments and run the following simple script with Scriptp Debugger:
tell application "Mail"
    set theMessages to selection
    repeat with thisMessage in theMessages
        set theAttachments to thisMessage's mail attachments   
    end repeat
end tell


I've reported it to Apple #22003894

Last edited by cogden (2015-07-26 07:48:30 pm)

Offline

 

#25 2015-07-26 10:15:33 pm

warwickt
Member
Registered: 2010-03-02
Posts: 15

Re: Get "mail attachments" fails with "-10000" general error - OS X 10.10.1

Yes sadly it is not fixed (still problematic) in OSX 10.10.4

It however is an  inconsistent circumstance. I share the thought it is definitely "cache" related. The hit and miss is very difficult to set up a test and the information is still the "-10000" event regardless of the syntax used to pull the attachments(s) by message

The assertion error logging is also inconsistent.

I'm looking for a workaround because this error has been an obstruction to some production workflow since we migrated to OS X 10.10 last year

Thanks for adding your experience.

Warwick
Hong Kong

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)