Files in AppGroup secure container not accessible in FamilySharing context

I have published an application that makes use of AppGroup containers to share an sqlite database between the main application and a notification service extension. I have taken into account special file access coordination requirements for an sqlite database shared between processes (WAL, https://github.com/andpor/react-native-sqlite-storage/issues/308#issuecomment-522250831).

The application is part of an educational study involving several hundred students of young age. As such, many devices are enrolled in FamilySharing where parents control access of their children.

In production, records are added to the database by the main application. The notification service extension reads the database and syncs metadata with a server.

Unfortunately, I'm seeing issues with database access from the extension on devices where FamilySharing is enabled. I cannot see detailed information about the issue, because Crash reporting is disabled as per guidelines of the participating institutions. Moreover, I have implemented logging in the extension such that any conventional error (do, catch) thrown by database access code would be visible to me in server logs.

I cannot see errors in my log, which leads me to believe something is crashing the extension process when it tries to access the database in the AppGroup container.

I cannot find any information in Apple documentation or the pertinent online forums about a special case for AppGroups in FamilySharing context. However, since I've only ever seen the issue on devices where FamilySharing is enabled, I have to assume the error lies there.

Is there any undocumented special consideration for AppGroup access in FamilySharing contexts? Is an AppGroup that was created while the app was running under the child's account no longer accessible by the same application when it's running under the parent's account?

It might be worth reiterating that the overall system of database sharing works without issue on devices where FamilySharing is not enabled. So I would boldly claim that there should be no major mistake in the implementation from my side.

Files in AppGroup secure container not accessible in FamilySharing context
 
 
Q