Changed Quote-function creates massive problems (previously: I pulled the plug on version 19.5)

SendMail.zip (264.1 KB)
I was really excited about this version: multithreading server, oData, serverside summaries, more cache for the scripting engine. In the ETS phase I tested everything and it all seemed to work fine, so after the release I immediately started pushing the new version.

Over the past week, my users suddenly started having all sorts of problems creating PDFs. Some of the layouts turned out to be still based on the classic theme, so I adjusted those layouts as quickly as possible. However, the problems were not yet solved.

Today I wanted to start billing myself and everything seemed to be working fine. Until I wanted to send the invoices by email, because then the procedure (in FileMaker) to create the mime files completely crashed.

"No problem" I thought, that must have to do with the changed Quote function, so I quickly made a fix for that. Unfortunately, that procedure still stalled and I was still unable to invoice.

"That is indeed a problem", thought, because the chimney has to smoke and only then can I continue to help my customers. So unfortunately I had to throw in the towel and reinstall FMS 19.4.2 on my server. The very first attempt afterwards to send my invoices was successful.

So "the problem" was FMS 19.5.1... I have no choice and now (today) I have to downgrade my customers that I have already put on 19.5.1 to FMS 19.4.2.

I hope a little that the PDF problems will no longer occur, because that happened with the clients and otherwise I also have to replace all clients (or have them replaced).

This is an unexpected setback and I don't want to go Claris bashing right away. People make mistakes, but I didn't want to let this go unnoticed, because I'm definitely not the only one who has to deal with this.

[edit]
Just for the fun I added my SendMail-file so you can have a go yourself. I think the procedure for adding attachments from containers in the documents-table are the place where the trouble is.
[/edit]

1 Like

Are your servers running macOS or Windows Server ? I wonder if the issues have to do with the OS and/or an update to the OS.

Thanks

a windows 2019 server, fully patched

Microsoft is good at releasing patches that break something :face_with_raised_eyebrow:. Do you have a test server that would not have the latest patches to do some tests ?

Downgrading to FMS 19.4.2 solved the problem for @menno again. Therefore, I do not believe that it is due to Windows updates.

1 Like

There is a possibility that in 19.5 there is code changed that would be impacted by a recent patch. Patches are released only once a month, and in one month Microsoft have enough time to break something !

Is Claris aware of those issues with PDF ?

It is not a windows-patch that causes the problem. It is a FileMaker issue. Reverting to 19.4.2 made sending email possible again…… it never functioned on 19.5.1

The example has no password, but you need to open it as user admin

As for the pdf-issues: I think that may have to do with the classic-theme that was active on some print layouts.

Changing that to enlightened everywhere didn’t solve it though. I created a 0.1 second stop during a preview, then save to PDF and go to browse-mode. This made all object visible in the resulting PDF. Even so 18.0.3 clients on MacOS 11 kept crashing when creating a pdf. These users are now going to upgrade 19…. I’ll wait and see and let you all know

I'm not seeing any issues running locally on Mac OS 12.2.1.

I added a PDF document and created a mail message manually then triggered the script, stepping through the code in the debugger. I don't have an outlook server that I can target but the processes up to that point ran without crashing.

I have found a document by FMI that said using classic theme could bring all kind of issues. Regarding those Layouts that were assign the Classic theme, maybe it would be better to rebuild them from scratch. I understand that can be a pain if they bare loaded with controls and in many places in the Relationship graph.

thanks for testing. Actually it did not crash on my server, but it stalled and never created a complete message.

Not having an outlook-server is not a problem, because it doesn't get to the point of sending it out anyway.

The script stalls during the creation of the mime-file around the point it should create the base64-string(s) for the attachmments from containerfields. On my Windows-server I have to force-quit my MacOS-client.

I tried debugging on my Intel-i9-MacBook and there it also does not get past the loading of attachments from containerfields. The PDF and the XML-file were both created on the same server. Just downgrading the fmserver solved that problem, without recreating the files, the mail was created and send out.

BTW, the server is not Windows 2019, but it is 2022 and 19.4.2 was previously and now is running on it without any glitch at all.

Yep, but that is for "only" 157 print-layouts of which only a few may be redundant. I can't charge my customer for rebuilding 140 layouts, he'll kill me.

Ok, not an option then.

I'd chosen fairly small objects, around 250 KB. If the base64 processing is a bottleneck, can the processing be done beforehand?

My invoice-mails always contain 2 attachments: 1 PDF-file of 929Kb and 1 XML-file of 1240Kb and this has worked perfectly for years. I did have previously created base64-versions of my attachments, but that felt wrong, so I create these only as needed now.

I created this solution a in 2019 after having used several plugins (PCOM, 360Works-email, SMTPit and MailIt) and running into trouble with licensing/versioning again. I read this article: FileMaker 18: Sending FileMaker HTML Email with SMTP and cURL - Skeleton Key and inspired by that solution I created my own.

Not that I hate plugins "au contraire", but some email-plugins use a JVM and that sometimes leads to compatibility issues. Other ones need a subscription and some only work with the "current" version of FMP or earlier, but you can't just install a newer FMVersion. Even if you don't mind paying, they take too long to release a contemporary version.

Tomorrow I will be at my customer's and will I find out if downgrading to FMS19.4.2 made any improovement on creating the mime-files to be emailed and if the changed layouts won't crash FM anymore during PDF-creation.Maybe I'll need to downgrade the clients as well.

Solved the problem for creating the emails! The error is caused by the changed way of handling ¶ in the Quote-function. There are several topics on that in the CC.

For the example-file I uploaded earlier, the problem emerged in the script "Load attachments" on line 7:
There is a rather long Let-function and at the start there base64 representation of the attachments is created by:

	$attachment_b64 = Case ( 
		$inlinetype ; Base64Encode ( HTML_InlineImage::Image ) ; 
		$attachtype ; Base64Encode ( Mail_Attachment::Object ) ; 
		$docmnttype ; Base64Encode ( Mail_Documents::Document )  ) ; 

and I changed that into:

	$attachment_b64 = Case ( 
		$inlinetype ; Base64EncodeRFC ( 3548 ; HTML_InlineImage::Image ) ; 
		$attachtype ; Base64EncodeRFC ( 3548 ; Mail_Attachment::Object ) ; 
		$docmnttype ; Base64EncodeRFC ( 3548 ; Mail_Documents::Document )  ) ; 

The second version creates a base64-string without any ¶¶, which prevents a stall in the parent-script "Sendmail IFU" on line 47, where an Evaluate/Let construct is supposed to cast the script-result into variables.

I've solved my email-issue, but the changed behaviour of FMP/FMS 19.5.1 on the Quote-function worries me a lot and therefore I will stay with the downgrade for now.

Thanks for all of your suggestions, it helped me to dig a little deeper!

4 Likes

That would be a great example to add to the product issues report over at Claris.com. Whoever was in charge of that task needs to see how the changes to the quote function are creating problems.

Will do that tonight, I have a bucketload of **** right now to deal with. Partial thanks to this issue :disappointed:

Good news, Claris is going to release 19.5.2 as soon as possible with the "old" behaviour of the quote-function :smiley:

For anyone interested I've included my old example with the fix I've created this afternoon to be able to use 19.5.1:
SendMail_corrected.zip (264.5 KB)

1 Like

Could you ask them why the release as build 19th April, but released 15th June?

And strange that nobody saw this in beta testing.