8 Replies Latest reply on Apr 22, 2009 10:28 AM by stevenburg

    Webview fails to load if screen not showing

    stevenburg

      Summary

      Webview fails to load if screen not showing

      Description of the issue

      I think this is a bug, and am wondering if anyone else has had this problem. I have a php page that loads some data from a Filemaker table, sends an email using php mail, then stores the results back into the table. I have a layout that has a webviewer pointing to that php page. I typically go to the layout, wait until the page loads (which sends the email), then go back. Everything works as expected, except under one situation: if the screen is not active, the page will not load. For example, if the screen saver is on, or if the user is logged into a remote desktop and the remote connection is dropped (even though the user stays logged in on the remote machine.) I have been able to verify this by doing the following. I made a script that goes to the layout, pauses 1 second, then checks the webcontent. If the content is empty, it loops up to 180 times (3 minutes). I then log the results. The script runs perfectly every time if I am viewing the page, but if the screen is not available, the page will will not load and the email is not sent. (It loops 180 times). I know the script works, because it makes the log entries. The moment the screen is alive, the page loads. So, here are the details:Filemaker 9.03 client (also tried Filemaker Advanced)Tried a local file and files served on Filemaker Server Advanced 10Tried Windows XP SP2, Windows 2003 and Windows 2008 Steps to reproduce the problem1. host a simple php page that sends a test email when loaded2. Create a filemaker file, no tables or fields necessary3. setup a blank layout and a layout with a webview pointing to that php page4. setup a script that goes to to the webview layout, pauses 180 seconds (or whatever value you want), returns to a blank layout, then exits the application.5. setup the file options to run the script on open.6. close and save the file on a pc that has remote access capability7. Test the file by opening it. The script should run, the email should be sent, and the application should quit.8. set up a scheduled task to run the file every 5 minutes (or whenever).9. Sit back and watch. It should generate an email every time the script triggers.10. log out of the pc. The script should continue to run, but the emails will no longer be sent.11. Log back in. The emails will continue. If you happen to login while the script is running, the email will be sent immediately.12. Log out again. The emails will stop.13. remote access into that pc.14. Sit back and watch. The emails will continue. If you happen to login while the script is running, the email will be sent immediately.15. While still logged in remotely, close the remote access window. The user will stay logged in and the script will continue to run, but the emails will stop.16. reopen the remote access connection. The emails will continue. If you happen reestablish the connection while the script is running, the email will be sent immediately.17. stop the scheduled script. I would think the page should load whether or not the screen is active. Maybe there is a setting that I am missing? Thanks, Steven Burgstevenburg@comcast.net

        • 1. Re: Webview fails to load if screen not showing
          TSGal

          SteveBurg:

           

          Thank you for your post and taking the time to detail the scenario.

           

          I have forwarded your entire thread to our Development and Software Quality Assurance (Testing) departments for review.  If I receive any information, I will let you know.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Webview fails to load if screen not showing
            TSGal

            SteveBurg:

             

            Our Testing department has asked me for some clarification...

             

            "Can you ask the customer is he using server side scripting or client side scripting?"

             

            TSGal

            FileMaker, Inc.

            • 3. Re: Webview fails to load if screen not showing
              stevenburg
                

              In Reply to,

              Our Testing department has asked me for some clarification...

               

              "Can you ask the customer is he using server side scripting or client side scripting?"

               

              Actually, neither. The problem is simply that the webviewer page does not load if the screen does not show. This was frustrating for me, because the page always loads when I check it manually. I created Filemaker scripts only to help isolate the problem.

               

              In my main file, I have a filemaker script that goes to a layout with a webviewer, waits for a predetermined amount of time (to give the page enough time to load) then return to another layout. The script runs fine (that is, the page loads) whenever I watch it execute.

               

              I also have a slave PC (Windows 2003) with Filemaker 9.0 client installed. On this machine is a small Filemaker file with no tables or fields, and only one script (which executes on open) which calls the webviewer loading script in the main file. When I open this file on the slave machine, it also runs fine. (It opens the main file, runs the Filemaker Script which goes to the webviewer layout and loads the page.) 

               

              I have a scheduled system task (using the OS task scheduler) on the slave PC which opens this file. (I want it to run once a night, but for testing I have it run every 5 minutes.) If I am watching it run, it works fine. BUT, if I log out, the script still runs but webviewer does not load. I know the script runs, because I added logging steps along the way. The file opens on the slave PC, it opens the main file, it goes to the layout with the webviewer, but the webviewer page never loads. I know this, because I also check and record the web content before leaving the layout. No error, just a blank page. If I log into the slave PC again, the page loads. The same thing happens if I remote into the slave PC. I can even stay logged in, just close the remote session and again the webviewer page stops loading. The results are the same if the main file is being served or is a local file. Permissions are not an issue as the file has no security.

               

              I know I added a lot of complicated things to my description of the problem by introducing the PHP page that sends an email. This happens to be the type of page my webviewer is trying to load and is a handy way to know if the page loads or not (if I get the test email, I know the page loaded), but the problem is not with the php page, it is with the web viewer. 

               

              My guess is that this has something to do with the way Filemaker screen refresh interacts with Windows 2003. Somehow, Filemaker knows when the display is inactive and does not refresh the page.

               

              I hope this clarifies things.

               

              Thank you for looking into this issue.

               

              Stevenburg

              stevenburg@comcast.net 

               

              • 4. Re: Webview fails to load if screen not showing
                TSGal

                SteveBurg:

                 

                Thanks for the information.  I have forwarded this latest post back to the Testers.

                 

                TSGal

                FileMaker, Inc. 

                • 5. Re: Webview fails to load if screen not showing
                  stevenburg
                    

                  Hi TSGal,

                   

                  I did some more experimenting.  I have my PC remotely logged into the slave pc which is running Filemaker, showing the webviewer layout. I only need to hide the remote access window for the page to stop loading. It loads as soon as I unhide the window. So, even while Filemaker is running and the user is logged in, just because the window is hidden is enough for the page to stop loading.

                   

                  I need the pages to load unattended.

                   

                  Thank you

                  • 6. Re: Webview fails to load if screen not showing
                    TSGal

                    SteveBurg:

                     

                    Thanks for continuing to test.  I have forwarded your latest post to the appropriate people.

                     

                    TSGal

                    FileMaker, Inc. 

                    • 7. Re: Webview fails to load if screen not showing
                      TSGal

                      SteveBurg:

                       

                      Here is the latest information I received from Testing...

                       

                      "If the Web Viewer is hidden (in dock), then the Web Viewer will not update.  A workaround is to use the "Set Web Viewer" script step, and I have confirmed this works when the Web Viewer is hidden."

                       

                      Please let me know if this works for you.

                       

                      TSGal

                      FileMaker, Inc. 

                      • 8. Re: Webview fails to load if screen not showing
                        stevenburg
                          

                        Hello TSGal,

                         

                        Your work-around does work for me. Apparently, hiding a window in the dock has the same effect as not being logged in on a remote machine.

                         

                        Thank you (and please thank the test team for me) for all your troubleshooting efforts.

                         

                        Steve

                         

                        ---------------

                        Here is the latest information I received from Testing...

                         

                        "If the Web Viewer is hidden (in dock), then the Web Viewer will not update.  A workaround is to use the "Set Web Viewer" script step, and I have confirmed this works when the Web Viewer is hidden."

                         

                        Please let me know if this works for you.

                         

                        TSGal

                        FileMaker, Inc.