9 Replies Latest reply on Mar 18, 2009 10:09 AM by philmodjunk

    Two instances of FMP 10Adv think the other instance is their client

    philmodjunk

      Summary

      Two instances of FMP 10Adv think the other instance is their client

      Description of the issue

      This is a strange one. It's unlikely to happen to casual users, but if you are a developer working with DB files that will be shared via FMserver, it could happen to you... 1) open a database file with FMP 10 and make sure sharing is turned on.2) choose open remote... I now see the TCP/IP number for my computer in the Hosts list and click it3) I see the file I have just opened in the available files list and open it. I now have two instances of the same file open on the same computer. If I try to quit FMP, I am trapped because both instances perceive themselves as the host of the other and demand the other be closed first which leaves be caught in an endless series of "send message" and "Close Now" dialog boxes. My only option is to use Task Manager to force Filemaker to quit which might corrupt my file. Now I can hear people saying "but I would never ever do that...." The above description is the simplest way to reproduce what I am reporting. I encountered it by accident while working with a local copy of a file that contained scripts to open other files that were accessible over the network as the current copies were being hosted on another computer via Filemaker Server 10. I opened a local file (file 1) and clicked a button whose script opened a different hosted file (file 2). I then clicked a button in file 2 that should have opened a hosted copy of file 1. Instead, it opened a 2nd instance of the local file 1 and trapped me. Technical Details:Client machine was running FMP 10adv on Windows XP Professional, service pack 3Server machine was running FMP 10 Server on Windows Server 2003 standard edition, service pack 2. The button triggered scripts were opening files via Perform external script/ Select Window script steps. (The select window script steps will hide this from the user as they bring the original window to the front and leave the 2nd instance hidden.)

        • 1. Re: Two instances of FMP 10Adv think the other instance is their client
          TSGal
          PhilModJunk:

           

          Thank you for your post.

           

          I just tried this on both a Mac (OS X 10.5.6) and Windows (XP sp3), and this is what I found...

           

          When you open the same file remotely, a second copy of the file is opened and adds a "- 2" to the end of the database file along with the name/IP address of the remote computer in parenthesis.  As a remote user, I can always close that window.  If I try to close the original window, then it gives the message asking the user to close the file.  I am not in an endless loop.  I click "cancel", move to the second instance of the file and close it.

           

          Even with that said, I can definitely understand how this can cause a potential problem.  However, I'm not sure if I could classify this as a design problem.  The button in the second file should check to see if the file is already present before attempting to open it again.  Your thoughts?

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Two instances of FMP 10Adv think the other instance is their client
            philmodjunk
              

            That's not the behavior I observe on my machines. I am unable to quit without force quitting Filemaker Pro on the client machine. If I attempt to close either file, I get the "send message" dialog box. When I dismiss this dialog, I get the sent message dialog box asking me to close. When I click "close now", I get another "send message" dialog and so on.....

             

            Looking for any differences between your test and mine: as described in my first post, I also had identically named files open and hosted by FM server 10. Before you ask the obvious, I could tell that my two windows were not clients of the server as their window names did not include the computer name of the server computer.

             

            You state "The button in the second file should check to see if the file is already present before attempting to open it again." Are you saying that button's script should check to see if the file is open? That doesn't solve the problem. The button's script, as previously described, performs an "external" script in the other file. It's external data reference should be connecting to the hosted file on the server, but instead opens a new instance of the local file. In all cases, the intended file was already open on the server.

             

             

            • 3. Re: Two instances of FMP 10Adv think the other instance is their client
              TSGal

              PhilModJunk:

               

              What kind of computer and OS do you have.  I'll try and duplicate your setup here.

               

              When executing the external script, what is the path name entered?  I assume it is capturing the local path and not the network path.  Can you confirm?  Make sure it says:

               

              fmnet:/<ip address>/<filename> 

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Two instances of FMP 10Adv think the other instance is their client
                philmodjunk
                  

                PhilModJunk:

                 

                What kind of computer and OS do you have.  I'll try and duplicate your setup here.

                 

                See post #1. It's all there for you to read.

                 

                When executing the external script, what is the path name entered?  I assume it is capturing the local path and not the network path.  Can you confirm?  Make sure it says:fmnet:/<ip address>/<filename>

                 

                External Script calls don't directly specify file paths. I assume you are asking for the text present when you open Manage External resources:

                fmnet:/*/scrap purchaser
                file:scrap purchaser

                 

                Please note that the scripts involved only create this problem when I have a local copy open. Otherwise it only opens the hosted copies as expected.

                 

                I'm aware of the recommendation to replace the '*' with the IP address. I haven't done so, because we will eventually move this file to a different machine with a different IP address and didn't want to enter this information unless I had too.

                 

                Regardless of whether the script opens the intended file or not, it shouldn't trap the user and potentially file corrupting situation.

                 

                 

                • 5. Re: Two instances of FMP 10Adv think the other instance is their client
                  TSGal

                  PhilModJunk:

                   

                  This is what I have done....

                   

                  On my Windows XP machine, I created two database files.  The first one is called "TSGal.fp7". One field - Name (Text).  I entered one record with Name: TSGal.

                   

                  The second database file is named "TestServer.fp7".  Again, one field - Name (Text).  I entered one record with Name: TSGal.

                   

                  On the layout of "TestServer.fp7", I created a rectangle and assigned it a button that executes Open File command.  When I specified the option, I selected "Manage Data Sources...", created a new External Data Source entitled TSGal, type FileMaker, and the File Path List:

                  fmnet:/xx.xx.xx.xx/TSGal.fp7

                   

                  That is, the URL of the server.

                   

                  Going into Browse mode, I clicked on the button and received the "File not found" error message with option to try and locate it.

                   

                  For both TSGal.fp7 and TestServer.fp7, I turned on FileMaker Network with access to all users.  As habit, I also turned on Instant Web Publishing and ODBC/JDBC.

                   

                  I closed both files and moved them to a Windows 2003 Server where FileMaker 10 Server is running, and added the files to the C: drive.  In the Admin Console, I found both files and executed "Open" for both of them.  Even after refreshing, the files showed closed, but I went back to the client machine, opened TSGal.fp7 locally, and then opened remotely TestServer.fp7. On my machine, it displayed TestServer followed by the name of the server (TECHLAB) in parenthesis.  When I clicked the button, I now have showing "TSGal - 2 (TECHLAB)".  Under my Window menu, I show:

                  1 TSGal

                  2 TestServer (TECHLAB)

                  3 TSGal - 2 (TECHLAB)

                   

                  ----------

                   

                  I then closed both shared (TECHLAB) files, opened the local TestServer.fp7 file, and added to the TSGal Data Source a second line:

                   

                  file:TSGal.fp7

                   

                  I quit FileMaker Pro 10 and moved the new TestServer.fp7 to the Windows 2003 Server machine (after closing the files in FileMaker Server 10) and opened them.

                   

                  Returning to the local Windows XP machine, I launched FileMaker Pro 10 and opened TSGal.fp7 locally.  I then opened remotely TestServer.fp7.  When I click the button, it opened the shared file again [TSGal - 2 (TECHLAB)].

                   

                  TSGal

                  FileMaker, Inc. 

                  • 6. Re: Two instances of FMP 10Adv think the other instance is their client
                    philmodjunk
                      

                    I don't really know what more to show you. For me this is a relatively minor issue as I can easily avoid encountering by practicing a little common sense. I posted it as a warning to other developers and so the Filemaker Inc could take a look at whether they should put in a fix to prevent the endless merry go round of dialog boxes I encountered.

                     

                    Unfortunately, you haven't been able to replicate this behavior. Whether you feel this is worthy of further investigation is up to you unless other users report encountering the same issue.

                     

                    A few comments in your attempts at replication.

                     

                    My hosted file is a different file from my local file. My local file was called "PhoneMessages" and is used by employees to log incoming customer phone calls. "Scrap Purchaser" is a DB used by employees to generate customer invoices. Navigation buttons allow users to open each file from the other.

                     

                    My scenario goes as follows:

                    1. Open PhoneMessages locally for development.
                    2. Needing to check a detail in the other file, I click the navigation button that opens ScrapPurchaser. A script executes in PhoneMessages that performs an external script in ScrapPurchaser that opens a guest session of ScrapPurchaser, initializes a few global fields and opens a related file. This works as expected.
                    3. To bring back PhoneMessages to continue my work, I thoughtlessly click the navigation button in ScrapPurchaser that should open the hosted copy of PhoneMessages instead of manually selecting my already open file from the Window menu.
                    4. I expect to see a hosted copy of PhoneMessages to appear. Instead, I see the window for my local copy. I now realize that the script in ScrapPurchaser includes the step "Select Window["PhoneMessages"] and this step popped my original window to the front while hiding the second window. At this point I was now trapped but didn't know it.
                    5. When I pull down the window menu, I see two files listed: ScrapPurchaser(ServerName) and PhoneMessages.
                    6. Selecting Show Window, I see PhoneMessages(local computer name) and ScrapPurchaserII(ServerName)--(ScrapPurchaserII is opened during step 2).

                     

                    I also notice that your file reference explicitly references the server while mine uses the *.

                     

                    I don't see why these details would produce different results, but maybe you or the other techs at Filemaker Inc. will see something that I don't.

                     

                    In the meantime, I can simply avoid the issue since this whole scenario was an accident in the first place.

                    • 7. Re: Two instances of FMP 10Adv think the other instance is their client
                      TSGal

                      PhilModJunk:

                       

                      I am only trying to duplicate the problem.  There were times when I reported problems, only to have others come back to me saying they could not duplicate the problem.  I lose credibility, and it wastes time.  Kind of like the boy who cried "Wolf".

                       

                      I probably won't pursue this any further, as I have tried this on both Mac and Windows, and recently with your setup of Windows XP client and FileMaker Server running on Windows 2003 Server.

                       

                      Yes, I do make direct reference to the server.  I like to control my environment, and in the FileMaker Help topic "Creating file paths", under Notes it states "FileMaker does not recommend using an asterisk (*) as a wildcard character in network file paths as it slows FileMaker network traffic.  When possible, replace an asterisk with the appropriate IP address or use variables in file paths.  If you have converted a database from a previous version of Filemaker Pro, review the converted data sources and replace any asterisks with known IP addresses or network file paths."

                       

                      I hope this doesn't hinder you from reporting other problems!  Other users who have reported problems previously that we couldn't reproduce have been reluctant to post again.  I don't want that to happen.  If there are problems, we definitely want to hear about them.  Even if it is a misunderstanding, we can alert the people responsible for the Help system or design team to make this easier to understand.

                       

                      TSGal

                      FileMaker, Inc. 

                       

                      • 8. Re: Two instances of FMP 10Adv think the other instance is their client
                        philmodjunk
                          

                        TSGAL says "Yes, I do make direct reference to the server...."

                         

                        I agree with everything you say and understand your reluctance to pursue this. I said as much in my previous post to this thread. I only pointed this out to document a difference between my current configuration and the one you used to try to duplicate the issue.

                         

                        I agree that there are bigger issues to deal with (like my scheduled back ups that keep crashing server's console. :smileywink: ).

                        • 9. Re: Two instances of FMP 10Adv think the other instance is their client
                          philmodjunk
                            

                          Knowing that changing the asterixes to direct references make this occurrence impossible. I updated all my references to replace them with IP numbers. Sure enough no problems encountered.

                           

                          However, just to make one final test, I then returned the references to asterixes and tested again. The issue still does not occur. This suggests that setting and resetting the external file reference somehow corrected the problem.

                           

                          Nuff said. Back to work.