Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › Manually sync mac?
- This topic has 9 replies, 4 voices, and was last updated 5 years, 8 months ago by
Sam Moffatt.
-
AuthorPosts
-
March 6, 2020 at 1:17 PM #39769
Another AlexParticipantI’m in an editor, pushing scripts to the couchDB we’re hosting. When I make changes, I have tried CMD-Shift-S to sync, but it doesn’t seem to do anything. I’ve waited sometimes over 20 minutes for the thing to sync. Is CMD-Shift-S supposed to sync manually? Am I missing something?
March 6, 2020 at 5:21 PM #39770
Sam MoffattParticipantIf you have autosync enabled in the sync preferences screen, pushing data to CouchDB should be done more or less as soon as you moved from one field to the next (unless you’re in Edit/Save mode when it will happen after the save).
At the bottom right of the screen should be a “Last Uploaded” and “Last Downloaded” message next to the Console log toggle. Do you see that updating as you make changes? When you first open this document in Tap Forms, it should also update the times for both of them to be more or less the time you opened depending on how long it takes to sync.
One other trick if the sync isn’t automatically pushing changes is to do a logout and a login. This resets the sync state within the client code and I think it might recreate the server side sync metadata as well.
A last thing to check is the CouchDB server logs because I’ve sometimes seen 500 errors from CouchDB cause Tap Forms to temporarily pause it’s sync. Make sure that your CouchDB server isn’t returning internal server errors and causing Tap Forms to pause sync (I feel this is a feature not a bug, if the remote server isn’t healthy, backing off is probably a safe assumption).
March 7, 2020 at 4:07 PM #39775
Another AlexParticipantautosync ✔️
last uploaded / downloaded is not updating ✔️
lots of lovely 200s on upload, so I think we’re okay ✔️
But I tried logging out and back in. So far so good! Thanks.March 7, 2020 at 4:31 PM #39776
Another AlexParticipantAlas, logging in again didn’t fix it. Anybody know if CMD-Shift-S is supposed to sync to CouchDB?
March 8, 2020 at 12:39 AM #39779
BrendanKeymasterThe Sync Now function only does something if you have Auto-Sync disabled. Otherwise Tap Forms syncs whenever data is saved to the database.
March 8, 2020 at 2:17 AM #39783
Sam MoffattParticipantLogging in and out should still be sync’ing, especially if you’re seeing traffic from the Tap Forms client in the CouchDB server logs. You could look at the Console.app on the Mac and filter for Tap Forms to see if there are any weird log messages there.
I’m assuming that the last uploaded / downloaded is matching more or less the same time as you opened up the document or hit log in again. If that doesn’t change to the current date and time then that would indicate a problem.
How are you validating that the changes aren’t propagating to the CouchDB instance?
One thing I’ve done in some of my documents is to create two new fields: a website field and a script field. I then put this in the script field:
// couchdb_link record.setFieldValue('fld-c53b97ba79844c56b96de5f556490519', 'http://10.0.1.26:5984/_utils/#database/db-5af742cf299940b1b9ad32e7fae7ec41/' + record.getId()); record.getUrl();You’ll have to replace the CouchDB server IP address and field ID (
fld-c53b97ba79844c56b96de5f556490519is the website field for me) but this gives me the ability to quickly jump into Fauxton to see the record and also gives me a copy of thetapformzlink for reference as well. I’ve used this to quickly jump into seeing what CouchDB thinks about the state of the record.March 9, 2020 at 2:34 PM #39809
Another AlexParticipantThanks Brendan. I appreciate knowing Sync Now isn’t supposed to work.
But it’s not syncing when data is saved to the database, for sure. My current deploy pushes stuff to the database, pulls it down and does a diff to ensure it’s there. Then I tab over to tap forms, CMD-W to close the window, <enter> to reopen it, Shift-CMD L to reopen the log, and then a bunch of field refreshing. to confirm I didn’t blow anything up.
Any idea why it’s not syncing when the database updates? Having scripts in a repo and using a real editor has been life changing, but this snag is a bummer.
March 9, 2020 at 7:02 PM #39811
Another AlexParticipantThanks.
March 10, 2020 at 10:30 AM #39821
Laird BrownParticipantI don’t like auto sync because if I make one mistake, I can loose data before I even realize it. This thread mentions to uncheck auto sync, but I don’t see it in the preference panel under the Tap Forms 5 item on Mac Menu.
March 10, 2020 at 1:21 PM #39825
Sam MoffattParticipant@anotheralex are you modifying records and their changes aren’t showing up or are you modifying form scripts and those changes aren’t showing up in Tap Forms? It might help to document in detail all of the steps you’re taking and where you think it’s not working.
I create and modify records via CouchDB directly and generally haven’t had any issues with those changes not making it back to my Tap Forms instance (auto sync is on for me). I do have the annoyance that Tap Forms will often reset it’s state when those changes come in though.
Something that occurs to me as possible is that there might be some sort of weird conflict being introduced that is being resolved by the Tap Forms app in it’s favour rather than yours.
@laird4444 Auto-sync is only an option for CouchDB and Cloudant sync. My understanding is that iCloud and Nearby always replicate changes as they are made. To disable for CouchDB/Cloudant, go to Tap Forms > Preferences > Sync and select either “Apache CouchDB” or “IBM Cloudant”. You should see ‘Auto-sync’ as an option just above the ‘Sign In’/’Sign Out’ button. -
AuthorPosts
You must be logged in to reply to this topic.