Automator "Get specified servers" bug

Hello, everyone!


I discovered strange Automator behavior when trying to create a service that would connect to an AFP server on my LAN. I create a new service that receives no input in any application. It consists of two steps:


  1. Get specified servers, where I click Add and choose URL of my server (e.g. afp://192.168.1.3:548/path_to_shared_folder). The server is configured all right, I can browse it in Finder etc;
  2. Connect to servers, which is supposed to mount the shared folder on the desktop.


Then I run the service to test the results – the folder gets mounted fine.


The problem occurs when I save and reopen the service in Automator – the URL specified in the first step is gone. I see just blank field where it used to be.


This is not the only problem with Get specified servers. I used to have same service on previous Snow Leopard installation, so I digged it out of my backup and placed in ~/Library/Services folder. I reopened it in Automator a couple of times to make sure the path argument is not disappearing – it is not. Then I ran it from Services menu in Finder – the folder gets mounted fine. But when I use that service as part of a bigger folder action, it returns an error "URLs with the type "file:" are not supported."


Any ideas? I tried to make it clear, but please do not hesitate to ask for more details.


User uploaded file


User uploaded file

MacBook, Mac OS X (10.7)

Posted on Aug 14, 2011 2:02 AM

Reply
10 replies

Aug 14, 2011 3:55 AM in response to felibb

Update: I replaced the service in the bigger folder action with this simple AppleScript and it works perfectly:


on run {input, parameters}


tell application "Finder"

try

mount volume "afp://192.168.1.3:548/Downloads-1"

end try

end tell


return input

end run


So this is clearly an Automator action problem. Feedback to Apple sent.

Oct 31, 2011 10:48 AM in response to felibb

felibb wrote:


Update: I replaced the service in the bigger folder action with this simple AppleScript and it works perfectly:


on run {input, parameters}


tell application "Finder"

try

mount volume "afp://192.168.1.3:548/Downloads-1"

end try

end tell


return input

end run


So this is clearly an Automator action problem. Feedback to Apple sent.

What do you mean by "...replaced the service in the bigger folder action" ? What is the "bigger folder action"?

Jan 1, 2012 6:16 AM in response to felibb

Re the original bug...


Automator is not saving the following correctly in the packages document.wflow file


<key>kind</key>

<string>server</string>


You can manually edit the file by:


Right click Application > Show Package Contents

Right click Contents>document.worklfow > open with (TextEdit)


Add above entries to all server mount definitions for which it is missing within <key>ActionName</key><string>Get Specified Servers</string> section of the file (all server entries to be mounted have separate <dict></dict> delimiters)


Save a version of the file you have editied and voila - runs fine and entries also appear correctly in Automator...


Regards


Neil

Jan 1, 2012 3:09 PM in response to n_m_w

A little bit more detail, just in case not clear from above (in example case for an afp mount) ...


1. Create/ update your mount application in Automator (add URL's for servers/ drives to mount) - save version

2. Open/ view the package contents of this new application/ version (via right click context menu of application > 'Show Package Contents')

3. Manually edit the document.wflow file (within the contents folder of the opened package) with TextEdit (via context menu of document.wflow file > 'Open with'), adding bold/ italic entries as per below for relevant mount points where the information is missing..


<key>ActionName</key>

<string>Get Specified Servers</string>

<key>ActionParameters</key>

<dict>

<key>items</key>

<array>

<dict>

<key>kind</key>

<string>server</string>

<key>name</key>

<string>afp://xxx.xxx.xxx.xxx:port/<volume to mount></string>

</dict>

</array>

</dict>


4. Save new version of document.wflow


After making these corrections the application should work correctly, and when opening directly in Automator the 'Get Specified Server' list should correctly show all mount points within the list view.


You can then add this application to a users login items to run @ login and mount required volumes without annoying mount popups


Regards


Neil

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator "Get specified servers" bug

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.