NPBruce / valkyrie

Valkyrie GM for Fantasy Flight Board Games
Apache License 2.0
506 stars 105 forks source link

[Bug] Android 13 (and later versions): Unable to locate Mansions of Madness / Unable to locate Road to Legend #1602

Open ParkerLewis31884 opened 1 year ago

ParkerLewis31884 commented 1 year ago

Describe the bug

Valkyrie loads fine, but is "Unable to locate Mansions of Madness" even though the official Android MoM app (1.9.0) is normally installed.

EDIT : MoM just updated again to 1.9.1. No change (same issue, same behavior).

Steps to reproduce the behavior:

  1. Load Valkyrie
  2. There is no step 2

Expected behavior

Valkyrie should find the official MoM app.

Valkyrie Version

2.5.8

Smartphone

Additional context

MoM (1.9.0, then 1.9.1) was configured in french in the app. I tried setting it back in english (and relaunching MoM, waiting to reach main screen, then relaunching Valkyrie). Did not make any difference. Not sure if / how that could be relevant but mentioning it anyway.

Otherwise, I see no possible relevant context. Phone is stock Pixel4a with up to date Android 13. MoM installed normally from the Play Store and up to date. No shenanigans. Installed the app exactly as requested, and allowed all authorizations when prompted (and manually to get Valkyrie to reach its main screen).

If I click on "Install via Google play", it opens the MoM page in the Play Store as expected. The Play Store as expected recognizes the app as installed already.

ivansengir commented 1 year ago

Exactly same problem here with a Samsung A52s Android 13

Grimgii commented 1 year ago

Same problem with a Galaxy Tab A7 Lite , Android 13. Maybe the app needs to be updated again since myself and @ivansengir are using Android 13 and the app is unable to locate MoM. Thanks!

Quantumrunner commented 1 year ago

Android 13 is currently not supported because there is no way to access the MoM data folder. Wiki has been updated:

https://github.com/NPBruce/valkyrie/wiki/Troubleshooting#blackscreen-on-startup-android

ParkerLewis31884 commented 1 year ago

Android 13 is currently not supported because there is no way to access the MoM data folder. Wiki has been updated:

https://github.com/NPBruce/valkyrie/wiki/Troubleshooting#blackscreen-on-startup-android

Unless i'm missing something, what you've linked is a section about blackscreen on startup which does not match the issue. Linked section of the wiki says

For all later versions (Android 13 and above) the app will only show a black screen on startup. There is currently no workaround for this.

That is not what is happening here. Applying the same workaround described for Android 11/12 (ie giving Valkyrie the "install app" privilege) allows the Valkyrie app to load fine and reach / display its main menu fine on Android 13. What it doesn't do as expected though is being able to locate the MoM app, displaying "Unable to locate Mansions of Madness".

Quantumrunner commented 1 year ago

Yes you are right the issue behaves differently but it is caused by the same root cause:

grafik

Android is preventing the app from getting access to official MoM/Descent App data. For Android 11 and 12 a workaround could be used but it seems that in Android 13 the issue has reappeared because Google stopped this workaround.

I will update the wiki page to make clearer that this new issue will appear in Android 13. Also a change is ready to at least tell the users that their Android Version is currently not supported. We might be able to role this out later this week.

A real fix (maybe something like this approach but less complicated) will take a lot of time though and could take some month please don't wait for it. Use Windows/Mac/Linux Version instead.

Edit: If an Android developer ever reads this: The following to lines of code would need to be changed (or parent methods). Instead of using /obb path you could check access for another folder instead of /obb (e.g. /downloads):

  1. https://github.com/NPBruce/valkyrie/blob/b949d5426925c53c666966f617ef03a357286936/libraries/FFGAppImport/AssetImport/MoMFinder.cs#L62
  2. https://github.com/NPBruce/valkyrie/blob/b949d5426925c53c666966f617ef03a357286936/libraries/FFGAppImport/AssetImport/RtLFinder.cs#L61
ParkerLewis31884 commented 1 year ago

Ah, ok. Thanks for the clarification.

I will be asking a question I know is pretty naive, but I'm interested in the answer / getting why this couldn't work. If one were to manually copy the MoM app data in another custom location (possibly this way), would it be possible for Valkyrie to then just look there (possibly requesting the user to provide the path to look for) ?

Quantumrunner commented 1 year ago

manually copy the MoM app data in another custom location (possibly this way), would it be possible for Valkyrie to then just look there (possibly requesting the user to provide the path to look for) ?

Yes this would be the easiest solution. Letting the user pick the location himself is not easy but the could ask him to put the data in the download folder of his device (which does need any extra permissions). But even this simple change is not possible with quite some code changes.

Quantumrunner commented 11 months ago

Closed. Issue has been fixed in Release https://github.com/NPBruce/valkyrie/releases/tag/release%2F2.6%2F2.6.0a.

seinsinnes commented 5 months ago

My experience with new versions of Android 14 suggests that the loop holes which allowed the reading of other app's data have been closed.

Unless someone knows more tricks I don't see how we'll be able to support valkyrie importing data from the official apps moving forward.