Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Issue with file field
Tagged: files
- This topic has 19 replies, 2 voices, and was last updated 5 years, 8 months ago by Guillaume Kuster.
-
AuthorPosts
-
November 23, 2018 at 2:38 AM #31953
Guillaume KusterParticipantHi,
I’m having (I guess) sync issues when using multiple file fields in a form. Often times, after my multiple macs sync the document, all fields show the exact same files. For example if I have three file fields and use them as follows:
File field 1: file A
File Field 2: file B
File filed 3: file CI would get after some time:
File field 1: file A, file B, file C
File field 2: file A, file B, file C
File field 3: file A, file B, file CWorse, when I click on most of these files, I can’t see their contents.
Please see attached screen grab to see a real example of that. I blurred out the file names, but you can see from their metadata that they are the same…
Thanks for your help
Attachments:
You must be logged in to view attached files.November 23, 2018 at 1:17 PM #31971
BrendanKeymasterHi Guillaume,
I’m going to have to investigate this further.
Can you please email me your form template just so I have your template to experiment with. Although I’m sure just creating a form with a few attachment fields might cause the same issue.
Thanks,
Brendan
November 23, 2018 at 1:30 PM #31972
BrendanKeymasterSo I’m really not sure what happened in your case, but I just tried to reproduce the problem and I could not. So I don’t know what triggered that to happen for you. Was it all records or just that record?
Here’s my attempt (screenshot) after adding a bunch of files on both my Mac and iPhone. Each field has its own unique set of files still.
I hope it was just a one-off glitch.
Attachments:
You must be logged in to view attached files.November 23, 2018 at 2:42 PM #31978
Guillaume KusterParticipantHi Brendan,
thanks for your quick reply.
I hope it was just a one-off glitch.
Unfortunately, no. This occurred at least half a dozen time with this form, and with different records and sets of files. I’m pretty sure it’s triggered by iCloud sync. I tried to keep the form in insulation on one machine for a few days by deactivating sync and files did not move around.
If this is of any help, I’m using the latest versions of TapForms, with all following machines running the latest versions of macOS or iOS:
an iMac Pro
a MacBook Pro 2018
an iPhone XS
an iPad Pro 2017You’ll find the template attached.
Best of luck,
-Guillaume
Attachments:
You must be logged in to view attached files.November 25, 2018 at 12:57 PM #32052
Guillaume KusterParticipantif that’s of any help, I think I used the field duplication tool to create these file fields.
Attachments:
You must be logged in to view attached files.November 25, 2018 at 6:58 PM #32059
BrendanKeymasterI’ve got your template and I’m not having any luck reproducing the problem. I’ve added records and files on both Mac and iOS syncing to iCloud. I’m obviously not saying it didn’t happen, just that I’m unable to figure out what’s triggering it until I can reproduce the bug repeatedly. Once I can do that then I can figure out the source of the problem and work on a fix for it.
Do you usually edit the same records on each platform? Or do you generally edit the records on one platform and just sync to the other where you read the data? Just wondering if perhaps there was a conflict situation with the same records being modified on each device.
November 26, 2018 at 1:30 AM #32080
Guillaume KusterParticipantThanks.
I edit the files on both iOS and Mac OS, sometimes when I know that all machines don’t have the same version of the database (I’m travelling a lot and being able to keep all machines in sync on airport wifi is a wild dream).
December 14, 2018 at 6:39 AM #32659
Guillaume KusterParticipantHi,
I did some investigation, and what came out of it had me scratch my head.
Long story short: sync works, attachments are present on all machines as blobs in the
.tapforms
bundle, but Tap Forms can’t open some blobs.Using the same document, I tried to create new records and added file attachments (pdfs) on mac #1.
I then went on mac #2 and waited for the same document to sync via iCloud. I could see my files appear on mac #2 in the attachement tables.So far so good. But when I double clicked on each attachement to view them, some opened, others didn’t.
Still on mac #2, I then went to
~/Library/Containers/com.tapzapp.tapforms-mac/Data/Documents/MyDocument.tapforms
and opened the bundle in the Finder.Under the
db-<uuid>.cblite2/attachments
folder, I sorted files by last modified and could see the last synced attachments as blobs. All files looked to be present, and sync did its job. Just to be sure, I found the blob corresponding to the file that wouldn’t open in Tap Forms (I could identify it by its size) and changed the file extension from.blob
to.pdf
. Sure enough, the file opened and I could see my document.So, again: sync works, attachements are there as blobs, but Tap Forms can’t open some blobs.
The annoying thing here is that I can’t rely on Tap Forms for my work. I’d love to, though…
December 14, 2018 at 11:43 AM #32665
BrendanKeymasterThat’s very interesting. When you double-click on a file attachment, Tap Forms reads the .blob file and writes it out to a temp folder using the filename specified when you attached the file.
I wonder if it has anything to do with the filename specified? Do you have any special characters in the filenames for the files that don’t work? Like maybe even a forward slash or colon character within the filename? Not the file on disk with the .blob extension, but the filename that appears within Tap Forms obtained from the original file.
December 15, 2018 at 3:00 AM #32682
Guillaume KusterParticipantNo special characters…
Purchase order Tarkka Media Oy 20180001.pdf
The only thing I can think of is maybe text encoding, as the file was originally created on a PC in Czech Republic… but macOS would have made sense of that, right?
December 15, 2018 at 11:43 AM #32694
BrendanKeymasterIf you use the export button to export the file, are you able to open it up then from the Finder?
December 15, 2018 at 1:11 PM #32701
Guillaume KusterParticipantI get the usual os level « choose your destination folder » window sheet but then nothing happens, the file is not exported.
December 15, 2018 at 9:57 PM #32709
BrendanKeymasterThe only thing I can think of to do at the moment is to make a backup file and email it to support@tapforms.com and I’ll run through the Xcode debugger and find out what’s really causing the problem. If you’re ok with doing that.
March 12, 2019 at 9:03 AM #33979
Guillaume KusterParticipantHi Brendan,
I think I might have found a possible explanation for this issue, together with other sync issues that I experienced.
On one of my Macs (MacBook Pro if that serves any purpose), the iCloud sync setting would disable itself from time to time. After noticing yet another sync issue, I had a look at the sync preferences and noticed that local sync was enabled instead (not sure how you label it in English, maybe proximity sync?).
After I switched back to iCloud sync, everything would work OK again after allowing for some time for the actual sync.After a few days, I experienced new sync issues and checked the sync prefs on the MacBook Pro and sure enough, local sync was selected again. I switched it back to iCloud sync.
This little dance happened a few times and I finally deleted all other devices from the local sync list (3 other devices, iMac Pro, iPad Pro and iPhone) and switched back to iCloud. For the time being, this seems to have been working and I haven’t been experiencing any new sync issues.
A few month back, when I learned how to use Tap Forms, I tried different sync options on this very same document with which I eventually experienced sync issues. After an initial iCloud sync accross 3 devices, I had changed the sync settings on different devices before settling again for iCloud sync. This fiddling might be a possible cause of problems and I would have from time to time a dialog box on my MacBook Pro telling me something like “Couldn’t complete sync with device X” (I can’t recall the exact wording but I looks like it’s a local sync error rather than an iCloud one) but would dismiss it as I thought I had iCloud sync enabled when in fact TF was trying to sync locally. So when I made changes on the MacBook, they were not reflected on the other machines and vice versa.
Hope this makes sense and you can track this one down.
Best,
-Guillaume
March 12, 2019 at 12:56 PM #33982
BrendanKeymasterHi Guillaume,
I made a recent change to Tap Forms to auto-select the Nearby sync option if you had any devices listed there. This is why it appeared to be switching back to Nearby sync. I wanted to draw people’s attention to the fact that they still had devices registered on the Nearby sync screen so they would know to remove them. The selection list of sync services on the left isn’t actually what determines if a sync service is being used or not. It’s the settings on those different screens which dictate that. So if the iCloud sync screen says “Disable iCloud Sync”, that means that iCloud sync is being used. If you have any devices on Nearby selected, that means Tap Forms will try to use Nearby sync. If on the Cloudant or Apache CouchDB sync screens it says “Sign Out”, then those sync services are being used. What I really need to do is to delete the Nearby sync devices the moment you enable iCloud sync. That would have avoided that problem you had.
March 12, 2019 at 1:10 PM #33984
Guillaume KusterParticipantThanks for you quick answer and explanation Brendan.
There still seems to be an issue. After I just read your answer, I went back to check the sync prefs and even though I had erased all nearby sync devices 3 days ago, they were still there today (I checked that on the same document, of course). And, like the last times I checked (as I told you in the previous post), when clicking on the iCloud sync pane on the left, iCloud sync was marked as disabled, as you can see in the screenshot.
Attachments:
You must be logged in to view attached files.March 12, 2019 at 1:23 PM #33987
BrendanKeymasterI’ve never seen the Nearby sync devices re-appear.
But what I have seen is sometimes people have multiple copies of the same document and the one they’re intending on working with isn’t the same as the one that got automatically opened when they launched Tap Forms.
Can you command-click on the titlebar on that document and take note of the path to make sure it’s the one you really wanted to be working with? Because maybe it’s not and that could explain why the Nearby sync devices mystically returned. Each document stores its own list of Nearby sync devices. If there were multiple copies of the same document on your computer, each could potentially have its own set of Nearby sync devices.
March 13, 2019 at 5:25 AM #33992
Guillaume KusterParticipantOK, that was it, a backup version was opened and I was changing the settings on that backup apparently yesterday. The curious thing is that when I launched Tap Forms yesterday, I opened the document from the start screen (the database picker).
I wonder how I found myself in a backup.
[EDIT] I just quit and relaunched TF, the document I had left open on quit was displayed and when checking it’s path, it was in
~/Library/Containers/com.tapzapp.tapforms-mac/Data/Documents/Backups/
. Only if I closed it and opened it again from the start screen would it be the version found in~/Library/Containers/com.tapzapp.tapforms-mac/Data/Documents/
I could reproduce this easily by leaving the document open on quit and relaunching TF. Before I quit the document is in Documents, after I launch TF the apparently same document is displayed but it’s in Backups. I have the auto backup on quick feature active in the general prefs pane.
Is that normal behaviour?
thanks
March 13, 2019 at 4:47 PM #33995
BrendanKeymasterTap Forms uses the Document ID to determine which file to re-open. If you have a document in multiple places within the Documents folder structure, then yes, Tap Forms may open the wrong one. Just delete the one from the Backup folder and that won’t be a problem anymore. The Backups folder should contain just zip backup files, not .tapforms files that aren’t compressed.
March 14, 2019 at 12:43 PM #33998
Guillaume KusterParticipantok thanks, I deleted the
.tapforms
files from theBackups
folder. -
AuthorPosts
You must be logged in to reply to this topic.