File component - File.Exists does not work for files in the assets with the APK - bug

Both methods return false with the compiled app (APK, AAB):

Companion works. @ewpatton

Label 4 returns true / works with the APK (and Companion):

Definitely a bug... I will see if we can squeeze this into the 2.65 companion, but it might need to be addressed as part of 2.66.

1 Like

I think there is really no rush for this "harmless" bug (as the method seems to be used very rarely).

This is true. 1) It's only been a year since it was introduced and 2) hopefully one knows what assets they've put in their project in advance and don't need to test for their existence...

1 Like

I've filed an issue in the meantime.

1 Like

Yes, but often enough you don't delete the assets directory for Companion before testing a new app and therefore files from other apps are still there. These are then present during testing with Companion, but not in the compiled app. In order to more easily identify the reason for a possible crash/bug, it might be helpful if this method also works with the compiled app.

Yes... and I have occasionally wondered what the solution might be there, since it is a cause of a number of issues (also TinyDB for similar reasons). It is a fairly deep problem that would require some architectural changes to how the companion works that I'm not sure we'd be comfortable making at this point.

1 Like