-
Notifications
You must be signed in to change notification settings - Fork 53
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
Conversation
@@ -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 .", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can revert the change later if needed, however I can't keep this blocked any longer since sync is impossible for me otherwise.
There was a problem hiding this 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.
Fixes #210 . It was caused by an unexpected
undefined
, combined with a guard statement that was not supposed to be there.