Timing files work in SAB's .APK, but not in Scriptoria's

Hello,

Some years ago I created a Song Book app with SAB called Alabashun.

I am using SAB 12.4 and Scriptoria for publishing to the Play Store.

Its Scriptoria repository location is:
s3://sil-prd-scriptoria-projects/scriptureappbuilder/qxh-1744-Corario-Alabashun-QPN-Songbook.

This app has about 100 timing files, which were created over the span of many months. It looks like around January 6th 2023 I added the last ones to the app and updated it. I’m sure I tested the timing of at least a few songs in the Scriptoria-generated .APK before approving the update. But by September 4th 2023 I noticed that many of the timing files weren’t working in the app. I made a note of it in my internal documentation, but shelved the issue and forgot about it until recently.

I would like to get all of these timing files working, because not only did they require many hours of labor to generate, but also it is a popular feature of the app.

Today I have done a good amount of testing and investigation. These are my findings:

  • 71 timing files work, 25 do not.
  • All of the timing files work as expected when the .APK is installed straight from SAB. Only the Scriptoria-generated app has this issue.
  • This issue affected my phone when it was running Android 12 and also now as it runs 14.
  • In both sets of files, there are instances of discontinuous letters (sometimes the recording differs from the lyrics), and when I give the labels a range, as indicated in the Help PDF number 6, section 6.6.
  • As far as I can tell, all files follow the specified syntax.
  • I can’t find any patterns.

Here are all of the timing files , organized into “Working” and “Not Working” folders.

Any ideas on what is going on, and how it can be fixed?

Thanks so much,

Alex

@Alex_Larkin, if there are differences in how something builds locally on your machine (Windows?) and how it builds in Scriptoria, then it will likely be a difference in the case (upper and lower case letters) of the files specified in the appDef file and what they actually are in the file system. Scriptoria uses the Linux build of SAB and Linux has a case-sensitive file system.

This doesn’t happen a lot, but it did recently for another project. I determined to fix the problem this time. I have a proposed changed and it fixed the issue with this project I was looking at. I can see if fixes your issue as well. I have access to your project from Scriptoria. Could you share the audio files as well?

I will try to take a look at it soon.

Thanks,
Chris

Thanks so much Chris!

You can download all the songs (or just a selection) from here:

Yes, I’m running Windows 10 (up to date).

Please let me know what you find out!

Thanks again.

What is the Scriptoria project number?

I found it, JAWCA:

https://app.scriptoria.io/projects/1766

Hi Alex,

I got the program and found right off that there are fine names that look suspicious. And when I tried to associate the audio with the files, all the files with (2a) in the filename could not be found. I renamed the files to eliminate the (2a) and it seems to work for me. Can you point to specific timing files that are not working? I would prefer not to have to try all 100. :blush:

@Bill_Dyck , from the original message

Hi Bill! Thanks so much for your help. In my original post I link to a .zip folder called “Timing Files”. There is a subfolder in there called “Not Working”. All those timing files aren’t working. Does that help?

I’m going to see about the possible 2a correlation now.

In both groups there are song file names ending with (2a), with diacritics, and without diacritics.

Bill and Chris, I just gave you two access to this spreadsheet which may help. It shows track number, song name, and timing file status:

Thank you Chris! We got it figured out today. This is what I think happened.

There are three ways of adding timing files.

  1. The “Add Timing Files” button.
  2. Double-clicking on a song in the Audio Files Tab, and in the “Edit Audio” dialogue box, clicking “Browse…”
  3. Pasting the timing file’s full path into the text box that appears to the left of the “Browse…” button.

I previously had trouble with the Add Timing Files button, so I opted to open the "Edit Audio dialogue box for each song. Instead of clicking browse and picking the file from there, I decided it would be easier to paste in the file path from Windows Explorer.

That worked when building the app on my own computer, but all audio files that were uploaded using that method were not uploaded to Scriptoria, and when installing the Scriptoria version, those songs showed up in the app as not having timing files.

The way to check if this is what happened is to look at that left text box. If it shows the entire file path, then you know it wasn’t added correctly. It should only show the file name with its .txt extension.

The solution is to click “Add Timing Files” and reselect the timing files for the affected songs. It was not necessary to remove the existing timing files first. Then reupload to Scriptoria, and from there, rebuild, download the .APK, and test again.

I don’t recommend the third method to anyone who is using or who may use Scriptoria.

Note: I didn’t actually reproduce this issue following the steps, because I’d have to mess up my app and then fix it (or make a new test app). But I think that’s what happened.