fix for missing libssl1.1 package (required by mongodb 4.4)
Some checks failed
Server Tests / Jest – Integration Tests (push) Failing after 19s
Server Tests / Mocha – Unit & Utility Tests (push) Successful in 47s

This commit is contained in:
Devin Major 2026-04-29 13:18:06 -04:00
parent b46c995b3d
commit 7b63f9164d
2 changed files with 39 additions and 2 deletions

View File

@ -42,6 +42,40 @@ jobs:
cache: 'npm' cache: 'npm'
cache-dependency-path: Development/server/package-lock.json cache-dependency-path: Development/server/package-lock.json
- name: Install MongoDB runtime compatibility libraries
run: |
set -e
if command -v ldconfig >/dev/null 2>&1 && ldconfig -p | grep -q 'libcrypto.so.1.1'; then
echo "OpenSSL 1.1 compatibility already present"
exit 0
fi
if ! command -v apt-get >/dev/null 2>&1; then
echo "apt-get is not available on this runner; cannot install libssl1.1 automatically"
exit 1
fi
if command -v sudo >/dev/null 2>&1; then
SUDO=sudo
else
SUDO=
fi
. /etc/os-release
if [ "${ID:-}" = "ubuntu" ]; then
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | $SUDO tee /etc/apt/sources.list.d/focal-security.list >/dev/null
elif [ "${ID:-}" = "debian" ]; then
echo "deb http://deb.debian.org/debian bullseye main" | $SUDO tee /etc/apt/sources.list.d/bullseye.list >/dev/null
else
echo "Unsupported distro for automatic libssl1.1 install: ${ID:-unknown}"
exit 1
fi
$SUDO apt-get update
$SUDO apt-get install -y libssl1.1
- name: Install dependencies - name: Install dependencies
env: env:
NPM_CONFIG_CACHE: /tmp/npm-cache NPM_CONFIG_CACHE: /tmp/npm-cache

View File

@ -34,8 +34,11 @@ async function connectDB() {
binary: { version: MONGOMS_VERSION }, binary: { version: MONGOMS_VERSION },
}); });
} catch (error) { } catch (error) {
error.message = `${error.message}\nFailed to start mongodb-memory-server with MongoDB ${MONGOMS_VERSION}. ` + const runtimeHint = String(error.message).includes('libcrypto.so.1.1') || String(error.message).includes('libssl.so.1.1')
'If this runner lacks AVX support, keep MONGOMS_VERSION pinned to a 4.4.x release.'; ? 'This runner is missing OpenSSL 1.1 compatibility libraries required by MongoDB 4.4.'
: 'If this runner lacks AVX support, keep MONGOMS_VERSION pinned to a 4.4.x release.';
error.message = `${error.message}\nFailed to start mongodb-memory-server with MongoDB ${MONGOMS_VERSION}. ${runtimeHint}`;
throw error; throw error;
} }
const uri = mongod.getUri(); const uri = mongod.getUri();