Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SCDownload returns ERROR but SCLastError is empty

Featured Replies

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

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

  • Author

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.

Hmm that is strange. If you can upload the log when you get a chance, I'd be more than happy to take a look at it!

  • 2 weeks later...
  • Author

Quite a few images failed to export during this run. One example is the file named VMWB-566-Platdia_1.jpg. Here's the log, I hope it contains a clue.

 

360Plugins_FMPro.txt

 

Thanks,

Lauren

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.

  • Author

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

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.