Jump to content
Sign in to follow this  
siroos12

Getting Error #13 for BaseElements Plugin

Recommended Posts

Hi all,

 

I am trying to make a folder and export a container into it on a mac server using BaseElements plugin "BE_CreateFolder" and "BE_ExportFieldContents" but no matter what directory I select, it returns Error #13 (CURLE_FTP_WEIRD_PASV_REPLY (13) >> libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed.)

 

I have tried get(TemporaryPath), get(DesktopPath) and get(DocumenstPath) with no luck.

The main goal is to be able to send SMTP emails with multiple attachments using "BE_SMTP_Send" and "BE_SMTP_AddAttachment" from Server machine.

 

Please let me know if you need more information.

Thanks in advance for any help.

 

Regards,

Edited by siroos12

Share this post


Link to post
Share on other sites

Have you tried doing away with the export step and just emailing straight from the container fields? BE_SMTP_AddAttachment will allow you to add the container fields instead of file paths.

Share this post


Link to post
Share on other sites

Hi sal88,

 

Yes, it returns the same error.

Share this post


Link to post
Share on other sites

Try "BE_Curl_Set_Option ( "BE_CURLOPT_FORCE_STARTTLS" ; True )" before the BE_SMTP_Server step, or remove username and password. Also double check you can send via your smtp server with other means, i.e. Outlook.

Or, if the attachment was created by filemaker in the first place, try and manually insert an attachment in to the attachment field and try that.

Share this post


Link to post
Share on other sites

Hi sal88,

 

It is just working fine on Windows. But it does not on MAC. The BE_SMTP_AddAttachment actually export the container contents into a temp folder and then use its path for attaching the file to SMTP email. It does export it successfully on windows and I could see the created file.

 

It seems the problem is that FM server can not save/export container content to a temp folder on my MAC server. I have checked the temp folder on Mac and it seems neither me as administrator nor FM server has "Read/Write" access to the folder. Then I tried to add the access with no luck. I get the error of not having permission to do this while I have administrator permission on MAC.

 

So I believe it is some sort of access permissions to temp folders on MAC. any advise on that?

Share this post


Link to post
Share on other sites

Okay, actually FM Server has "Read/Write" access to temp folder but not me as administrator. So I can not check to see if the file is created on Mac or not. Then I tried to make a folder on desktop and documents folder using "BE_CreateFolder" and it does not.  

Share this post


Link to post
Share on other sites

To use BE_SMTP_AddAttachment you need access to the temporary folder as it exports the container content and use it for sending SMTP email.

When you run a script on server (MAC) to set BE_SMTP_AddAttachment, the temporary folder is in /var/folders/ but it has not the right privileges for FM server and you cannot change them, even not as the administrator user. So, the BE_SMTP_AddAttachment is not able to export the field content and email is sent with no attachment.


I tried to export the container and add it to a global container to using BE_ExportFieldContents but it fails due to the same reason of wrong privileges.
 
I really appreciate any advise on it.

Share this post


Link to post
Share on other sites
On 2018-03-13 at 2:30 PM, siroos12 said:

I have tried get(TemporaryPath), get(DesktopPath) and get(DocumenstPath) with no luck.

BaseElements does not take FileMaker formatted paths, it takes system paths. If you don't want to deal with path format issues, use my module instead: http://www.modularfilemaker.org/module/path/

 

Share this post


Link to post
Share on other sites
1 minute ago, dansmith65 said:

BaseElements does not take FileMaker formatted paths, it takes system paths. If you don't want to deal with path format issues, use my module instead: http://www.modularfilemaker.org/module/path/

 

Thanks for your advise, I will give it a try.

Share this post


Link to post
Share on other sites
On 2018/04/05 at 1:18 PM, dansmith65 said:

BaseElements does not take FileMaker formatted paths, it takes system paths. If you don't want to deal with path format issues, use my module instead: http://www.modularfilemaker.org/module/path/

 

By using "/Users/username/Desktop/myNewFolder" as a path to create a folder, I get the results but only when I run it on FM client. When I run the very same script on server using PSOS, I still get the error #13. 

This would confirm that the path format is correct and plug-in is working. The issue appears when the script runs on server side.

 

Any advise on ho to get it working on server?

 

Server details:

FileMaker Server 16

macOS High Sierra

version: 10.13.3

Share this post


Link to post
Share on other sites

My bad. You were right. The problem was the wrong path format. 

 

This below path worked like a charm.

 

Substitute(Get(TemporaryPath)&GetContainerAttribute ( Container; "filename"); "/Macintosh HD" ; "")

 

Thank you all for your help!

Share this post


Link to post
Share on other sites

Glad you got it to work. To clarify the issue from your first post today; Desktop isn't available to server-side scripting, as per the link posted earlier in the thread.

Also, if you were to use my Path module, your code would automatically work on a Windows server as well. Right now, your code would fail if you did that.

  • Like 1

Share this post


Link to post
Share on other sites

My situation is a bit different.  My server script is writing the desired PDF file to the Documents folder, (FileMaker Server/Data/Documents)  on a Mac server, but then, it is unable to insert that PDF into the target container field.   When I run the same script on my FMP client, it works perfectly.

This is a routine that was working fine in FMS 16 on Windows, but when the database moved to FMS 17 on Mac, it stopped working

I tried running a simple test script to see if Base Elements could create a folder.   The FMP client does it just fine, but the server running the same script yields error 13.

Again, I am not concerned with making folders.  I just want to take the file that is in the Documents folder and insert it into a container field.   Seems to me that the Documents folder should not have a permissions problem, especially if FMS can create documents there.

Share this post


Link to post
Share on other sites

Have you tried inserting it fro URL using the file:/// protocol???

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By OviOne
      Hello everyone,
      I've been having this problem for quite a long time now and I need help because I'm stuck. I had to switch from default SMTP send function to BaseElements plugin in the solution of my Company because of some issues and advanced functions we needed.
      Now every e-mail which is sent from the server with BE_SMTP_Send is received without any date on it.
      The server machine is running Windows Server 2016 and FMS 16.
      These are the script steps I'm using and they're working fine except for the mentioned problem:
      Set Variable [$send_m; Value: BE_SMTP_Server ($out_server; $out_port; $address; $pass)] Set Variable [$send_m; Value: BE_SMTP_Send ( $address; List("email1@email.es"; "email2@email.es"); "Subjetc of the e-mail" ; "Text of the e-mail"& ¶ & ¶ & "Greetings") These are the info pages about the two functions:
      BE_SMTP_Server BE_SMTP_Send I hope somebody could enlighten me a little bit. Thank you in advance.
    • By sal88
      Hi all
      I've switched from the 360works scriptmaster plugin to baseelements for sending emails. Since then, subject lines that contain spaces have tabs in as well. The tabs are not necessarily in place of the spaces, as subjects with many spaces have just the one tab.
      In subjects with just one space however, the tab replaces that space. I hope the picture shows what I'm experiencing.
      The header of the email contains the following:
      Subject: spaceatfortiethcharacterspaceatfortieth
          characterspaceatfortiethcharacterspaceatfortiethcharacterspaceatfortiethcharacter
      So it appears as though it may be adding a carriage return?
       
      Any ideas?

       
      I've just double checked that it is OK with 360works and it is indeed! The only difference I can think of in the way the plugin talks to our exchange server is that BE requires there be no credentials but 360 requires credentials.

    • By Lape
      I know - stupid question, but the download available on the homepage for BE are OLD (3.1.0 or something) and I would like to use the newest version 3.5.0 (as far as I know) - but where to find those - or is that restricted to sponsors ?
      Thank you in advance 
      KR Lars G
    • By Andreas T.
      I need some help in determining if I am missing something crucial here or if there is a limitation or bug in the function BE_ApplyXSLT from the BaseElements plugin. I am using version 3.3.4 (which is the latest) on Mac OS X 10.11.6 using FileMaker 15 Adv. and 16 Adv.
      I am unable to get any output from the transformation, nor any error.
      According to the documentation, the command shall return either 0 when successful or an error. Link
      In my testing it only returns blank, and gives no error even when no output file is generated. It should not return blank in cany case according to the docs. (I suspect there may be a documentation error and that it actually returns blank when there is no error.)
      No error is found using Get(LastError). BE_GetLastError returns 0.
      The function format is this:
      BE_ApplyXSLT ( xmlPath ; xslt ; outputPath ) Here are the input parameters I have used:
      BE_ApplyXSLT (      "/var/folders/y6/1yf76qcs5y91h_w4j27hxp980000gp/T/S10.2/ABC_nota_108.xml" ;      BE_ReadTextFromFile ( "/var/folders/y6/1yf76qcs5y91h_w4j27hxp980000gp/T/S10.2/HTMLvisning/Stylesheet_Full.xsl" );     "/var/folders/y6/1yf76qcs5y91h_w4j27hxp980000gp/T/S10.2/output.html" ) I have verified that the files exist and that both the XML and XSLT are valid. All files are in UTF-8. I can transform the XML with this XSLT using other
      methods without errors. I have also tried having the XSLT in a variable.
      As I understand it, BaseElements uses the libxml2 engine. I have tried doing the transform from the command line directly and it works as it should:
      xsltproc -o /var/folders/y6/1yf76qcs5y91h_w4j27hxp980000gp/T/S10.2/output.html /var/folders/y6/1yf76qcs5y91h_w4j27hxp980000gp/T/S10.2/HTMLvisning/Stylesheet_Full.xsl /var/folders/y6/1yf76qcs5y91h_w4j27hxp980000gp/T/S10.2/ABC_nota_108.xml It also works fine using the XMLLib OSAX in AppleScript. Unfortunately, I need Windows support also so I would like to get the BaseElements function to work.
      I hope somone can shed some light on what may be going on.
    • By BrianC
      Hi,
      I am hoping someone can help me with the BaseElements "BE_WriteTextToFile" function.
      I can only get this to work when I strip out the Volume Name from the path.  
      So I can't use Get(DesktopPath) or Get(TemporaryPath) etc without removing the volume from the start of those results.
      That doesn't seem correct and I think I must be missing something.  Or is that the way it is intended?
      Does anyone have a simple example of it working?
      Thanks.
       
  • Who Viewed the Topic

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.