TDL’s been playing around with Tellerium / Selenium for functional web-based tests for a little while now. Unfortunately everyone who’s been messing around with it has been running them on Ubuntu and the others of us on the team have OS X. When you run the Tellerium tests on a Mac with Snow Leopard they fail to start Firefox with the following output from the Selenium server:
Preparing Firefox profile... dyld: Library not loaded: /usr/lib/libsqlite3.dylib Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/ Security Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0
What is Wrong?
The problem Firefox is complaining about is the version of libsqllite3.dylib found. Snow Leopard ships with a version of
/usr/lib and Firefox also provides it’s own version of
libsqllite3. Unfortunately there is a bug in Selenium 1.0.1 with how it calls Firefox that was patched in next version 1.0.2, however because of other bugs Tellerium is staying with 1.0.1 for now. You can read more about that decision in the mailing list thread:
The actual problem, at least from an outside view point, is dirt simple. When Selenium calls Firefox it sets up a set of environmental variables, one of which is:
As you can probably see there’s a problem with the path with the “
null” that snuck in there. So somewhere in Selenium there’s some place where they forgot to check for a
null value. When Firefox starts up it’s not able to find it’s local copy of
libsqllight because of the invalid path arguments. But Firefox will happily guess a good set of paths if you forget to set the
DYLD_LIBRARY_PATH, so a simple solution is to place a simple bash script in-between Selenium and Firefox that simple removes the corrupted path.