Script on server giving odd results

UPDATE: I downloaded one of the databases and ran restore and it said:

2024-04-11 11:42:10.733 -0400 SPS.fmp12 8495 WARNING: problems were detected while recovering the database. The recovered file should NOT be used going forward; copy only the most recent work from it into a backup copy of the original file.

Does this mean I have to go back through backups to find a non-corrupt database for both of my clients and then do some crazy imports? LOTS of changes have been made to both of them (scripts, database fields, data, a new table in one case) over the past couple of weeks.

Is this the most likely place to start for the issues outlined below? Or could there be something else? I'm uploading the recovery log to this. It's pretty sparse on what's actually wrong.

Recover.log.zip (40.3 KB)

Looks like both the database have ONE error in them as well as a warning not to use the recovered database:

|2024-04-11 11:42:10.733 -0400|SPS.fmp12|8495|WARNING: problems were detected while recovering the database. The recovered file should NOT be used going forward; copy only the most recent work from it into a backup copy of the original file.|
|2024-04-11 11:53:05.165 -0400|OA Success Center Tracker.fmp12|8495|WARNING: problems were detected while recovering the database. The recovered file should NOT be used going forward; copy only the most recent work from it into a backup copy of the original file.|
|2024-04-11 11:52:59.371 -0400|OA Success Center Tracker.fmp12|8487| Reset table view|
|2024-04-11 11:42:04.791 -0400|SPS.fmp12|8477| Calculation modified|
|2024-04-11 11:42:04.791 -0400|SPS.fmp12|8476| This item changed|
|2024-04-11 11:52:59.385 -0400|OA Success Center Tracker.fmp12|8476| This item changed|


Original Notes
I've spent many hours trying to debug a whole bunch of scripts that recently started failing on two of my clients sites on the same host. This started happening shortly after (but not immediately after) updating to Filemaker server FM 20.3.2.205. There are lots of oddball issues, but I'm focusing on a very simple one first. When I run this script locally or server, and get vastly different results:

Go to Layout [ “Student_Detail” (Student) ; Animation: None ]
Set Variable [ $SASID ; Value: Get(ScriptParameter) ] 
Set Error Capture [ On ]
Perform Find [ Restore ]  // Student::SASID = $SASID

I call this through a stub script and pass in SASID (unique ID) via script parameter. When I run it locally using this command, it finds 1 result and works fine.

Perform Script [ Specified: From list ; “UpdateSingleStudentFromSASID” ; Parameter: Get(ScriptParameter) ]

When I run it on the server using this script it fails with a 509 error (Field requires a valid value) and doesn't perform the find.

Perform Script on Server [ Specified: From list ;“UpdateSingleStudentFromSASID” ; Parameter: Get(ScriptParameter) ; Wait for completion: On ]

Things I've tried:

  • Restarting server (this was my first step, but I might try it again)
  • Exiting script with debugging info:
Exit Script [ Text Result: Get(LastError) & " " & $SASID & " FoundCount: " & Get(FoundCount) & " Record Number: " & Get(RecordNumber) & " Last Error: " & Get(LastError) & " ScriptParameter: " & Get(ScriptParameter) ]
  • Removing the find criteria
  • Walking through steps
Enter Find Mode [ Pause: Off ] 
Set Field [ Student::SASID ; Get(ScriptParameter) ] 
Perform Find []
  • Setting a different field
  • Bypassing using the variable $SASID instead of setting the field to Get(ScriptParameter)
  • Using Perform Find [ Restore ] and setting the Student::SASID to $SASID instead of using "Set Field" command
  • Using $SASID directly in "Perform find" instead of Set Field
  • Adding a 1 second delay after "go to layout"
  • Checking permissions (the server returns my username and "[Full Access]"

Any advice/thoughts appreciated. I'm going to download the database and run the repair on it, but it's happening to two different databases on the same server.

try it passing the same script parameter as in the 'normal' version as "Student::SASID"

I'm not following? I pass the same parameter when running locally or on server.

this should be using the same script parameter as your call executed on client

Oh right, good call.. I went back and forth on that. They do match now and same error happens. I'll update above.

restart the server - purge all temp files and good luck!

KK thanks.

So the problem seems to be a record which has a required field that's required, but blank. This has been the case for a while, but it just started happening. Locally I get a warning and can ignore it, but the server doesn't ignore it even if it's set to allow users to bypass it.

1 Like