Event Find on Server trigger another server script

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Mon Nov 16, 2020 2:26 pm
Hi,

I was looking at my FMS16 and notice a list of notifications with a script error 401,
Image

and the script on server that trigger the error is a script that register my ScriptMaster plugin (-SERVEUR- Installer et Register Scriptmaster Plugin), it is launch in the open file script.

In the script EventFind, it will launch, EventFind on the server... but nowhere there's a subscript that trigger my OpenScript or my Register PlugIn script ?!?!
Image

So I have no clue where this is coming from.

If I add Exit Script at start on the script in the -SERVEUR- Installer et Register Scriptmaster Plugin, I don't get the notification error on the server.

If I run the debugger on the Event Find script and I don't let it execute from the server, it run on my station and I don't get this error ?!?

I was under the impression that a new server script will launch the open script, there's no reason for it, but that's not the case, I have other server script that run, and none of them trigger that other script.

Any clue ?
It's not a big deal, but it fill up my log with a lot of useless info.

Thanks
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Mon Nov 16, 2020 2:48 pm
I don't know if this is related, I close down my FMA station, on start up I now have this error, can't do anything.

Image

I had an employee that had an error message on iOS
Script Error, there was a problem with the script: Create Calendar Interface Record... bla bla bla suffisant privilège...

After that any user that need the calendar in iOS can't connect, and now me on my workstation...

I just stop and restart FMS service... same problem ?!?!
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Mon Nov 16, 2020 3:25 pm
And now, even locally I can't open the file.

Close the file on server, open with FMA... and I get this error... only way to get rid of the message is force quit with task manager... next time I open the file I can a message that the file was not closed properly !!

Image

I've look into the Temp file, I see the directory with that name, one file was created inside named "text" with inside the text "1"

After running the debug on start, I see the error is in the script Save HTML File, Export Field Content...

I notice that all the solution files are missing ?!?! Where did they go ?!?! :?:

Restore not working... I will dig into a backup copy on the server and see....
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Mon Nov 16, 2020 3:54 pm
Hi, jffortier.

I'm sorry that you're running into some issues today.

The 401 error is a normal error that means "No records match the request". This is logged whenever a find is performed using Perform Script on Server when there are no records found. In this case, you've navigated to somewhere on the calendar where there are no records for a given source, and the "Event Find" script is where the find is being performed.

Unfortunately, there's no way to suppress these 401 errors from showing in the server logs. There are a lot of forum posts requesting a way to turn this off, but it's not an option as of the moment.

Since we can expect that sometimes there will be no records found when navigating the calendar, you can safely ignore these 401 errors.


As far as the other errors go, it seems that the "Calendar Interface" record may have been deleted, which is where the calendar web, translation, and style files are stored. Now DayBack is trying to download a fresh copy of the web files from our server. If you don't have access to dayback.io, then you will see the "Connection failed" error. You'll need access to the servers in order to download a fresh copy of the web files, or restore a copy of your FileMaker files from a backup.

The other error seems like FileMaker is not able to create a new folder in the temporary directory on the machine. Which version of FileMaker are you using? Which version of Windows.

Have you tried opening the file on a different machine? It would probably be best if you could send over a copy of the files for us to debug on our end. If that works for you, just reach out directly at [email protected] and we'll dive in.

Regards,

KC
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Mon Nov 16, 2020 5:12 pm
Hi, Thanks for the quick response.

As always, my English may not be perfect. I know the signification of the 401 error, but what I don't get is why is the Event Find script will trigger on the server my own script that I only use on open file to register my customer ScriptMaster Plugin ?? There's no reason for your script to trigger a not even close related script !?!

I really don't understand how can the files be gone !?!

I open a backup and copy back all the files and all is working fine now... No user beside me have access to that layout containing the files and I haven't been working around that part for a very long time.
The 3 repeating fields were empty:
WebViewerFiles_Themes
WebViewerFiles
WebViewerFiles_Translation

Will I'm at it, there's a backup field for both, at what time are those backup by the system ? Automatic ?

Thanks
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Tue Nov 17, 2020 9:14 am
Hi jffortier,

PSOS requests start a new session on the server, so it's possible that your script is being initiated from a script trigger in the file options. You should be able to modify that script to exit if on server so it doesn't try to do anything.


The Calendar layout is based on the "Calendar Interface" table. Usually, somebody accidentally hits the delete record button in the FileMaker toolbar while viewing the calendar. This will delete the Calendar Interface record and all of the core calendar files. To prevent this, we suggest making a custom menu for that layout with the record menu hidden: https://www.seedcode.com/pmwiki/index.p ... ooting#CSS

DayBack saves a copy of the previous core files when you apply in-app updates, but that is saved on the same Calendar Interface record. So, making sure you have a reliable backup of your FileMaker files is the best solution. You can also save any changes you make to the translation or CSS text outside of FileMaker.

Regards,

KC
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Wed Nov 18, 2020 7:29 pm
Thanks, I learn something new everyday, I didn't know a PSOS start a new session on the server. So I understand now why it trigger the plugin registration.

The registration need to be performed on the server once on start as it's for a server plugin, so it already have a IF statement for server. The funny thing, I have multiple PSOS and none of the other return that error !?! The error is from the installation of server plugin script, it search for new plugin or version and it return nothing when no new plugin need to be installed.

I just hope that by adding a $$variable when launch the 1st time will allow me to use it in the IF statement and it's not set to null on each session !! Other wise I don't know what to do to keep the server plugin up to date... except maybe do it manually. But who want to do manual config when you can automate them. The same script will update user and server plugin at the same time.
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Thu Nov 19, 2020 6:12 am
Hi jffortier,

Global variables ($$variable) are session specific, so setting that variable in one PSOS call will not make it available in another PSOS call. If you want a value to be available across sessions, you'll want to use a non-global field in a table to store that value. Then it can be checked from each PSOS script call.

Regards,

KC

Return to DayBack Calendar for FileMaker

Who is online

Users browsing this forum: No registered users and 2 guests

(855) SEEDCODE
[email protected]
Follow us: