10 Replies Latest reply: Jul 6, 2012 3:54 PM by n_m_w
felibb Level 1 Level 1 (5 points)

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.

 

Screen Shot 2011-08-14 at 12.00.55 PM.png

 

Screen Shot 2011-08-14 at 11.48.18 AM.png


MacBook, Mac OS X (10.7)
  • 1. Re: Automator "Get specified servers" bug
    felibb Level 1 Level 1 (5 points)

    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.

  • 2. Re: Automator "Get specified servers" bug
    cblevins0321 Level 1 Level 1 (25 points)

    Thank you for that! The bug that was reported here was driving me crazy. Automator and your Actionscript is the only way that I could find that would automount network shares on boot without having the finder windows open. So Thanks again!

  • 3. Re: Automator "Get specified servers" bug
    chaz2010 Level 1 Level 1 (0 points)

    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"?

  • 4. Re: Automator "Get specified servers" bug
    felibb Level 1 Level 1 (5 points)

    It's a folder action I created to accomplish some task.

  • 5. Re: Automator "Get specified servers" bug
    petermees Level 1 Level 1 (0 points)

    Would you explain this a little more because i am a newbie to automator and mac.

    How do i get the script in automator ?

     

    I also have the problem that the "get specified server" is always empty when i open the task.

  • 6. Re: Automator "Get specified servers" bug
    n_m_w Level 1 Level 1 (10 points)

    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

  • 7. Re: Automator "Get specified servers" bug
    n_m_w Level 1 Level 1 (10 points)

    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

  • 8. Re: Automator "Get specified servers" bug
    pomme-homme Level 2 Level 2 (405 points)

    Thank you! This has been driving me crazy and your solution works perfectly. Is this a bug in the 10.7 version of Automator?

  • 9. Re: Automator "Get specified servers" bug
    Slydude Level 2 Level 2 (215 points)

    Thans for that n m w. I had a workfloow saved as an app which has beeen broken for some time due to this bug. I think your solution will fix it nicely. Prior to Lion my workflow mounted the Time Capsule with my iTunes library vefore iTunes launched thus avoiding the dreaded ! due to missing files.

  • 10. Re: Automator "Get specified servers" bug
    n_m_w Level 1 Level 1 (10 points)

    Note that you can now also use Drive Mounter from the App Store - comes in both free and paid versions - I've been using the free version myself for a while and works fine for mounting drives etc