Jump to content
Server Maintenance This Week. ×

SCDownload returns ERROR but SCLastError is empty


This topic is 3313 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a script that loops through a couple hundred records in FileMaker, performing SCDownload for an image in SuperContainer for each. A few images fail to download or are incomplete (only the top half is present, the rest is gray). This happens with a different set of images each time I run the script on the same records.

 

But here's what seems strange: When an image fails to download or is incomplete, SCDownload returns "ERROR". But SCLastError returns nothing. Under what circumstances would SCLastError return an empty result if SCDownload returns "ERROR"?

 

Thanks,

Lauren Naslund

Link to comment
Share on other sites

Are you calling any other plugin functions between the SCDownload and the SCLastError call? Every time any plugin function is called, SCLastError will be set either to the error message if the plugin function call fails, or to "" if the plugin function call succeeded. Always be sure to call SCLastError immediately after the failing plugin function.

 

If you're still having trouble, please check or upload your plugin log file, which should have information about any errors. You can find this log files at one of the listed locations at http://docs.360works.com/index.php/Plugin_log_files#Log_Locations

Link to comment
Share on other sites

There are no plug-in calls between the two functions. The script step sequence is:

 

Set Variable [ $result ; Value:SCDownload(…the parameters...)]

Pause/Resume Script [Duration (seconds): 1]

If [$result = "ERROR"]

   Set Variable [$errorlog; $errorlog & "¶" & Value:styles::style number & " - " & SCLastError ]

End If

 

I do get a list of the style numbers of the records that failed, but SCLastError is always blank.

 

BTW The 1 second pause greatly reduces the number of failed downloads. Is that a clue? We don't get better results with a 2 second pause, though.

 

I'll take a look for the log.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for the logs. I can see now that the error you're running into is "SEVERE: java.lang.InternalError: couldn't create component peer" . We've run into this once or twice before, but haven't really resolved it unfortunately. You can read one of these previous discussions here if you'd like. There isn't a ton of information out there about what this error means specifically, but it's related to the dialog(s) created when you call the SCDownload function. If you call that function with the 'progress=false' flag, do you run into the same problems? (Additionally, I don't think this is the case, but if you're using the showSaveDialog flag, try not using that as well.

Link to comment
Share on other sites

I added the 'progress=false' flag, and, unfortunately, am still having the same problem. (You're correct, I'm not using showSaveDialog.) The only factors so far that seem to reduce the occurrence of the error are

1. adding a 1-second pause after each SCDownload step

2. running the script on a smaller number of records at a time

Please let me know if you have any other ideas on how to avoid this error.

 

Thanks,

Lauren

Link to comment
Share on other sites

Hi Lauren,

 

I took a look at your logs and seems that you are using quite an old version of the plugin(2.89) which is almost 2 years old. We are now on version 2.899 which contains several bug fixes as well as operates on a new framework. Please update your plugin to the newest version and try to recreate the issue. Please be sure that if you are using any old versions of our plugins to remove them and install the newer versions from our website. This is because the new versions do no work while older versions of the plugins are installed. Please let us know if you are still having issues after you update or if updating solved the issue.

Link to comment
Share on other sites

This topic is 3313 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.