requarks / wiki-v1

Legacy version (1.x) of Wiki.js
https://wiki.js.org
GNU Affero General Public License v3.0
101 stars 75 forks source link

Git sync not working #246

Open fpagnoux opened 4 years ago

fpagnoux commented 4 years ago

Actual behavior

The wiki instance is working, but changes don't get automatically pushed to the remote repository.

Expected behavior

Changes to be pushed every 5 minutes by the Agent.


I've installed Wiki.js via the installer. My error log file is empty, and my output log contains the following:

2019-10-23T00:03:17.908Z - info: [SERVER] Wiki.js is initializing...
2019-10-23T00:03:18.122Z - info: [SERVER] Checking data directories...
2019-10-23T00:03:18.137Z - info: [SERVER] Data and Repository directories are OK.
2019-10-23T00:03:18.653Z - info: [SERVER] Checking Git repository...
2019-10-23T00:03:21.069Z - info: [SERVER] Starting HTTP/WS server on port 8001...
2019-10-23T00:03:21.117Z - info: [SERVER] HTTP/WS server started successfully! [RUNNING]
2019-10-23T00:03:21.234Z - info: [SERVER] Search index flushed and ready.
2019-10-23T00:03:21.414Z - info: [SERVER] Git repository is OK.
2019-10-23T00:03:21.444Z - info: [AGENT] Background Agent is initializing...
2019-10-23T00:03:22.526Z - info: [AGENT] Checking Git repository...
2019-10-23T00:03:23.600Z - info: [AGENT] Running all jobs...
2019-10-23T00:03:23.602Z - info: [AGENT] Performing pull from remote Git repository...
2019-10-23T00:03:23.625Z - info: [AGENT] Git repository is OK.
2019-10-23T00:03:23.868Z - info: [AGENT] Git Pull completed.
2019-10-23T00:03:23.874Z - info: [AGENT] Git Push skipped. Repository is already in sync.
2019-10-23T00:03:31.582Z - info: [AGENT] All jobs completed successfully! Going to sleep for now.

Note that the previous lines are logged when the wiki starts. Nothing is logged afterwards.

How can I investigate why the git sync is not happening?

fpagnoux commented 4 years ago

Investigating more, it seems that the CRON job is never started. This line is executed, but that one is never reached.

So it looks like the initialScan() promise doesn't resolve. Yet I don't have any error message in the logs.