Export files (.osts, .txt, .pdf) via Telegram fails (beta42, Android 13-14)

116 views
Skip to first unread message

Andy Hon

unread,
Jan 3, 2024, 1:57:23 AMJan 3
to OpenSongApp
Hi, Gareth!
Happy New Year, may all your wishes and efforts become true and duly awarded.

Sorry, but I've encountered an issue when changed to a new device (Galaxy S22, Android 14). Other team members with Android 13 and 14 devices have this issue too.
When I try to export files in set or single songs (.ost, .osts, .pdf, .txt) via Telegram, they can't be sent (red exclamation mark), even to myself (Saved messages chat).
Other apps (tried Adobe apps, Word, Quickedit) are exporting their files without issues.
"Text as message content" switch doesn't help.
I believe it's somewhat like permissions or security bond issue. But I'm not sure.
Could you reproduce the export bug and fix it, please?
Screenshot_20240103_152549_Telegram.jpg

Gareth Evans

unread,
Jan 3, 2024, 10:47:57 AMJan 3
to Andy Hon, OpenSongApp
Hi Andy, 

I'm not sure if this is specific to beta 42, but I can confirm this bug (but thanks for letting me know your device and app version - really useful).  I'll have a look to see if I can sort it!

Gareth 


--
When responding to a post on the forum using your email, please make sure to click on the 'Reply all' button so that your response is also sent to the forum for other people to see the full conversation.
---
You received this message because you are subscribed to the Google Groups "OpenSongApp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opensongapp...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/opensongapp/db7d4040-fbb2-4c75-a412-7e84c275d623n%40googlegroups.com.

Gareth Evans

unread,
Jan 5, 2024, 12:27:01 PMJan 5
to OpenSongApp
Hi Andy,

I've got a fix ready for the next release - it was a permissions error as you predicted.

Gareth

Andy Hon

unread,
Jan 18, 2024, 5:38:48 AMJan 18
to OpenSongApp
Hi, Gareth. I've tested beta43.
Unfortunately, seems like exporting set function is completely broken for now :D
When I try to export a set list as .osts alone or with song screenshots, only text message "OpenSongApp Set: <name of the set>" is being sent.

Gareth Evans

unread,
Jan 18, 2024, 3:59:43 PMJan 18
to Andy Hon, OpenSongApp
That's really strange!  It works fine on my device with Telegram exactly as you have done.  I'm assuming the individual files are created in your OpenSong/Export folder and it is just Telegram that isn't receiving them for you?

I have fixed the bug that didn't show the name of the set (should have shown at the top of the page) and also fixed a bug that was adding 'primary' to the start of the filenames in the OpenSong/Export/ folder.  Other than that it seems to be working for me repeating what you did.

Video from my phone (Samsung A22 running Android 13 / OneUI 5.1 (with the minor bug fixes above)

--
When responding to a post on the forum using your email, please make sure to click on the 'Reply all' button so that your response is also sent to the forum for other people to see the full conversation.
---
You received this message because you are subscribed to the Google Groups "OpenSongApp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opensongapp...@googlegroups.com.

Andy Hon

unread,
Jan 18, 2024, 4:57:11 PMJan 18
to OpenSongApp
I've tried to reset the app settings and export a new set.
Seems like Opensongapp doesn't create any files in Opensong/Export folder. It' empty. When I try to export via file explorer (i.e. Xplore), it says "Error: can't get files to be copied".
Samsung S22, Android 14, OneUI 6.0

Andy Hon

unread,
Jan 18, 2024, 5:00:08 PMJan 18
to OpenSongApp
As for permissions,
Opensong is allowed to Camera, Microphone, Nearby devices. Notifications are blocked and greyed out.
In case it's important.

Screenshot_20240119_065809_Permission controller.jpg

Andy Hon

unread,
Jan 18, 2024, 7:05:06 PMJan 18
to OpenSongApp
Here's a android log file.
It's done after reboot, opening Opensongapp and trying to export a set via Telegram and then trying to save files via Xplore.
Thank you so much!

Andy Hon

unread,
Jan 19, 2024, 1:27:38 AMJan 19
to OpenSongApp
UPD:
I've tried to find out whether files in Export folder are created.
Apparently files are being created correctly, and they exist at the moment until Share dialog appears.
But then the 3rd party app (Telegram, Whatsapp, Xplore, whatever) fails to get those files.
Exactly like you've assumed.
I've recorded the evidence.

Andy Hon

unread,
Jan 19, 2024, 4:06:15 AMJan 19
to OpenSongApp
Sorry for posting so much, but may I request a small feature?
Highlighting item (i.e. set in setlist) would be more visible.
Currently it's white among light colored font.
Could you make a frame or a slightly opaque rectangle on a highlighted item, please?
Thank you!

Gareth Evans

unread,
Jan 24, 2024, 1:22:07 PMJan 24
to Andy Hon, OpenSongApp
I think I've figured it out.  The fix I put in for the primary: bit of text that was wrongly being added has actually sorted this issue by chance which is why it works on my device.

Looking at your log, I found lines like this:
ExportFragment: uri to copy:content://com.android.externalstorage.documents/tree/primary%3AOpensong%20data%2FOpenSong/document/primary%3AOpensong%20data%2FOpenSong%2FExport%2Ftest__test.osts
01-19 08:57:20.911 10421 13239 13239 D ExportFragment: name:primary:Opensong data/test__test.osts
01-19 08:57:20.911 10421 13239 13239 W System.err: java.io.FileNotFoundException: /data/user/0/com.garethevans.church.opensongtablet/files/export/primary:Opensong data/test__test.osts: open failed: ENOENT (No such file or directory)

The exported file created is stored at: /storage/emulated/0/Opensong/data/OpenSong/Export/test_test.osts
The file name should be getting picked up as test_test.osts, but it is wrongly being identified as primary:Opensong data/test__test.osts

Note that the filename has that primary: bit at the start, but also has the remainder of the file path with the / removed between Opensong data/).  The version you have simply removed the OpenSong/Export part from the last part of the path name, which didn't remove the primary: part, but more importantly for you, didn't remove the other folders in the file path.  However, my fix instead ignores everything up to the end of OpenSong/Export/ for the name and only uses the last bit of text - i.e. test__test.osts.

This means when it tries to copy this file address using a file provider (to share) it is trying to copy a file that doesn't exist as it is looking for:
/storage/emulated/0/Opensong/data/OpenSong/Export/primary:Opensong data/test__test.osts

This was the same for every file.

For note, when you open the 'Export' option in OpenSong app, it clears the content of the OpenSong/Exports folder ready for a fresh export.

I will push the new version tonight and you can test and let me know.

Thanks for your patience and help in tracking down the issue,

Best wishes,
Gareth

Andy Hon

unread,
Jan 25, 2024, 7:01:42 AMJan 25
to OpenSongApp
Hi, Gareth!
Thank you for managing the bug, sets are being exported without issues.
But there are two other bugs appeared in beta44 related to language (Russian) switch.
1) MAIN category is being translated to ГЛАВНАЯ in Russian interface, so that the sets saved in English "MAIN" category become inaccessible when changed to Russian. There are also two folders being generated named "ГЛАВНАЯ" in Russian version, which is inconvenient. 
2) Upper right button (i.e. "Settings" cog on main screen and "Close" X sign) fails to operate in Russian translation.
Strangely when I enter Cast screen button on the left, the Settings button becomes "unlocked".
But after app restart the button is inaccessible again.
I've recorded the bugs behavior.
Video and log file attached.
Thank you so much!

Gareth Evans

unread,
Jan 25, 2024, 1:01:32 PMJan 25
to Andy Hon, OpenSongApp
Hi Andy, 

I've figured that one out - I put lots of actions into background threads to speed up the boot process.  However, this means they get run when time is available.  The boot up screen gets the translations and stores some of them to check with user interactions (such as MAIN, Settings, Performance, Presenter, Stage).  The key from your video was the messages at the bottom of the boot screen that should read "Files being processed: Storage...." in the chosen translation language.  Your video showed that they were always in English showing that the code to get the user translation hadn't happened by this point of the boot process and the strings were being recovered in the user device language (English).
This was actually the cause of both of your issues - the settings button was expecting "Settings" if in English, but the translated string in other languages, but the string collected always returned 'Settings" as it was collected before translation.
The set menu was doing the same for the word "MAIN".

I'll upload that fix now.  Beta 45 coming soon (uploaded to my website now, but will be on the Play Store soon).

Many thanks, 
Gareth

PS I'm hoping that this is the last beta before I move it to the stable channel next week!


You received this message because you are subscribed to a topic in the Google Groups "OpenSongApp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opensongapp/1K72oDBLO_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opensongapp...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/opensongapp/49f8e905-0363-4232-9e44-41f2b3195cccn%40googlegroups.com.

Andy Hon

unread,
Jan 25, 2024, 3:54:15 PMJan 25
to OpenSongApp
I've tested beta45 - sets category and settings button works smoothly. I'm pretty shocked how much of a hidden cause this is.
I've encountered another bug and will post it here.
Chord transposition is broken. Neither in "set only", nor in song itself. Language independent.
I'm so glad the release is coming soon. Ready to recommend the app to everyone.
After fixing this transposition bug, I think everything would be ready to roll.

Gareth Evans

unread,
Jan 25, 2024, 4:10:55 PMJan 25
to Andy Hon, OpenSongApp
I'll have a look at your big coffee (it takes a while to find any offending code!)

Strangely the transport is working fine on my devices!

Andy Hon

unread,
Jan 25, 2024, 11:18:54 PMJan 25
to OpenSongApp
UPD:
Thank you!
I've noticed that chord transpose doesn't work only on a song being added to set.
When I transpose a song not being added to set (directly in database), everything works fine.
I've recorded a video evidence ;)
Hope it's useful.

Gareth Evans

unread,
Jan 28, 2024, 10:48:49 AMJan 28
to Andy Hon, OpenSongApp
I've found a bit of code in your log that suggests an error, but that same code appears in my logs, yet mine still transposes!  Very strange - it shouldn't!

I've reworked the transpose and set item key transpose feature to try to fix this issue (and some other issues I found with variations).  I'll push the fix tomorrow.

Andy Hon

unread,
Jan 30, 2024, 4:38:10 AMJan 30
to OpenSongApp
Hi, Gareth!
I've tested the transpose function - works pretty well! Thank you so much for reworking this feature!

I've also tested other everyday used functions - everything works so far.
Also I'm thankful for highlighter and marker floating window I've seen in other conversation.
Hope the release is coming ;)

Gareth Evans

unread,
Feb 1, 2024, 11:56:58 AMFeb 1
to OpenSongApp
THanks for the update!

v6 went live last night (although if forgot to transfer it from the beta channel to the stable channel until early this morning!)
I'm expecting more issues, questions and complaints this weekend if there are any further issues ;-)
Many thanks to you and the other beta testers for helping to fix the development bugs!

Reply all
Reply to author
Forward
0 new messages