Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync failed: Cannot read properties of undefined (reading 'utcDateChanged') #212

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

eliandoran
Copy link

Fixes #210 . It was caused by an unexpected undefined, combined with a guard statement that was not supposed to be there.

@eliandoran eliandoran requested review from a team, zerebos and ProfDoof July 15, 2024 17:11
@@ -17,11 +17,11 @@
"start-server-no-dir": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.ts",
"qstart-server": "npm run qswitch-server && TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.ts",
"start-electron": "rimraf ./dist && tsc && ts-node ./bin/copy-dist.ts && cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron.js --inspect=5858 .",
"start-electron-no-dir": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 electron --inspect=5858 .",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the reason for removing TRILIUM_SYNC_SERVER_HOST

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexpietsch , I removed it in order to be able to test the sync.
More specifically, start-electron-no-dir (as opposed to start-electron) uses the "real" data directory, yet it uses a hardcoded sync server (http://tsyncserver:4000). Since we are using the real data directory, I don't see why we should have a hardcoded sync server, instead we should use the one configured in the server.

Honestly I don't even think tsyncserver:4000 being hardcoded serves us well right now, since I'm not sure how it's set up. I suppose it's just a server instance hosted locally and added to /etc/hosts.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexpietsch ,

We can revert the change later if needed, however I can't keep this blocked any longer since sync is impossible for me otherwise.

Copy link

@zerebos zerebos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can approve of the actual code change, unsure of the build tool changes, I'll leave that to others.

@eliandoran eliandoran merged commit 33a26b0 into develop Jul 19, 2024
1 check passed
@eliandoran eliandoran deleted the bugfix/sync_failure branch July 19, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync failed: Cannot read properties of undefined (reading 'utcDateChanged')
3 participants