An error occurred during initialization: Database sidecar failed to start in time

Hello, I update macOS to Tahoe 26.6.1. and now I have an issue:
" An error occurred during initialization: Database sidecar failed to start in time."

Even with old versions of rtila, I have this same error of initialization of the database.

Hello RTILA Support,

Following up on my previous message regarding the “Database sidecar failed to start in time” error after updating to macOS Tahoe 26.6.1 — I’ve identified the root causes and found fixes. I wanted to share the details with you in case it helps other users.


Issue 1: PocketBase panic — duplicate route registration

After running RTILA from the terminal (/Applications/RTILA.app/Contents/MacOS/rtila-x), I discovered that the database sidecar (PocketBase) was crashing on startup with the following panic:


panic: pattern "POST /api/remote" (registered at router.go:130) conflicts with pattern "POST /api/remote"

Root cause: Two hook files in ~/.rtila-x/database/hooks/ were registering the same route POST /api/remote:

  • remote.pb.js (2,846 bytes, created at 20:27, no @ extended attribute)
  • remote_execution.pb.js (7,944 bytes, created at 21:04, with @ extended attribute)

It appears that during a recent RTILA update, the new remote_execution.pb.js was added but the old remote.pb.js was not removed, causing a duplicate route registration and a PocketBase panic on startup.

Fix: Renamed remote.pb.js to remote.pb.js.bak to prevent it from loading, keeping only remote_execution.pb.js active.


Issue 2: Permission denied (os error 13)

After fixing the duplicate route issue, RTILA progressed further but hit a “Permission denied (os error 13)” error when trying to access the database files.

Root cause: macOS Tahoe appears to have reset or restricted file permissions on the ~/.rtila-x/ directory during the OS update.

Fix:

bash
sudo chown -R $(whoami):staff ~/.rtila-x/
sudo chmod -R 755 ~/.rtila-x/
chmod 644 ~/.rtila-x/database/data/*.db
chmod 644 ~/.rtila-x/database/.db_key
chmod 644 ~/.rtila-x/database/hooks/*.pb.js
chmod 644 ~/.rtila-x/database/hooks/*.js
xattr -cr ~/.rtila-x/

Issue 3: “Builder Unavailable — A project run is currently active”

After RTILA launched successfully, In Browser Profiles, When trying to run a profile, the Builder was locked with the message “A project run is currently active” even though nothing was running. This was caused by stale run states left in the database from the previous crashes.

Fix:

bash
sqlite3 ~/.rtila-x/database/data/data.db "UPDATE trigger_chain_runs SET status = 'stopped' WHERE status = 'running' OR status = 'active';"
sqlite3 ~/.rtila-x/database/data/data.db "UPDATE queue SET status = 'stopped' WHERE status = 'running' OR status = 'pending';"

Summary of recommendations for the RTILA team:

  1. Hook deduplication: Ensure that when remote_execution.pb.js is deployed during an update, any older remote.pb.js is automatically removed or renamed to prevent duplicate route registration.
  2. Permission handling: Consider adding a permission check/repair step on startup for macOS, especially after OS upgrades.
  3. Stale run cleanup: Consider checking for and cleaning up stale “running” states in trigger_chain_runs and queue tables on startup, especially after an unclean shutdown.

Everything is now working perfectly. I hope this helps you improve the update process for macOS users!

Best regards,
Alexandre

Thank you very much for your detailed feedback Alexandre. Thanks to your magnificent debugging we were able to pinpoint the real issue … much appreciated!

What you sent confirms the bug affects returning users, that explains why we received very few reports and couldn’t reproduce it despite checking all our backward compatibility and suspecting the antivirus false positives for the database binary.

We are currently finalizing a stable version that will include the other changes you previously recommended such as the output_variable field in the extension. We are also updating the new e-learning platform and testing every single scenario to ensure both the final version of RTILA and the learning platform work 100% smoothly.

The last reported trigger issue might also be related to database migrations and we will make sure to verify that as well to guarantee robust backward compatibility.

Thank you again Alexandre we truly appreciate your support!

We have just released update 8.3.212 which addresses all the issues mentioned here. Thank you so much for helping us improve with your valuable feedback!