The bundle “FMDBAS” couldn’t be loaded - error code: -4960

Hello,

I’m trying to use SQLite Lib in macOS 10.14.5 on a 2013 Mac Pro.

I’ve downloaded version 1.0 from here: https://www.macosxautomation.com/applescript/apps/SQLite_Lib.html

I decompressed the archive and copied the library file to:
~/Library/Script Libraries/SQLite Lib.scptd

I have a simple script:

use sqlLib : script "SQLite Lib" version "1.0.0"
use scripting additions

property dbPath : "~/Library/Safari/CloudTabs.db"

set database to sqlLib's makeNewDbWith:dbPath
database's openReadOnly()

set theResult to database's doQuery:"select device_uuid, device_name from cloud_tab_devices" rowsAs:"records"

database's |close|()

When I try to run the script, the makeNewDbWith line is highlighted and I get this error:

error "The bundle “FMDBAS” couldn’t be loaded." number -4960 from framework "FMDBAS"

I’ve tried re-installing the library into ~/Library/Script Libraries but get the same error.

Any ideas what I am doing wrong?
Do I need to install the FMDBAS framework separately?

It sounds like you are trying to run your script in Script Editor, which can no longer load third-party frameworks. Write your script in Script Debugger.

Nah. I’m not buying Script Debugger just to use this. There are other ways to access SQLite databases without that additional expense. Thanks anyway.

FWIW, Script Debugger Lite is free.

I’m hitting the same issue with “SQLite Lib2”. I have purchased Script Debugger and my code works fine. But now I want to be able to run it from the command line, cron or launchd.

What is Script Debugger doing at runtime that allows this to work? Is there something I can do at the command prompt or in a script to emulate this ?

It’s not a runtime setting, it’s a setting made when code-signing before notarizing an app – the develop gets to specify whether or not an app should be allowed to load third-party binaries.