Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vending build info initialization parameter is null #2571

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DaVinci9196
Copy link
Contributor

Reproduction steps:
1.Install vending without installing mg
2.Find an APP to trigger IAP and trigger build info initialization
3.install mg
4.IAP problem found

The problem is that the build info of vending depends on mg. If mg is not installed, the parameters in the build are null. The build info is initialized only once, so it will not be initialized again after mg is installed, resulting in the parameters in the build being null all the time.

@mar-v-in
Copy link
Member

mar-v-in commented Oct 8, 2024

Shouldn't we rather make sure to never call ProfileManager.ensureInitialized() before it's needed? It's never needed when the main services app is not installed as we can't check if relevant services are enabled.

Also, the current code doesn't assume the remote profile to be applied if the applied dataset is empty or an exception occurs while fetching it. So it's unclear to me how we can run into the issue you mention.

Your current code also checks a random subset of profile fields to be unset. Why isn't a single one enough and why did you choose those and not others. The check seems a little fuzzy to me.

@DaVinci9196
Copy link
Contributor Author

Shouldn't we rather make sure to never call ProfileManager.ensureInitialized() before it's needed? It's never needed when the main services app is not installed as we can't check if relevant services are enabled.

Also, the current code doesn't assume the remote profile to be applied if the applied dataset is empty or an exception occurs while fetching it. So it's unclear to me how we can run into the issue you mention.

Your current code also checks a random subset of profile fields to be unset. Why isn't a single one enough and why did you choose those and not others. The check seems a little fuzzy to me.

You can try this APP
app:SoundCloud
packagename:com.soundcloud.android
1.Install vending without installing mg
2.open SoundCloud and click “upgrade”. Tips: There is a problem
3.install mg
4.open SoundCloud and click “upgrade”. Tips: There is a problem
5.Removing the app from the background and re-entering it also has the same problem

@ale5000-git
Copy link
Member

I think "vending" should display an error and not initialize anything if microg services isn't installed as it isn't a supported configuration.

@DaVinci9196
Copy link
Contributor Author

I think "vending" should display an error and not initialize anything if microg services isn't installed as it isn't a supported configuration.

If mg is not installed, the third-party APP will prompt. If we prompt again, it will be repeated and affect the user experience.

@ale5000-git
Copy link
Member

ale5000-git commented Oct 9, 2024

We can (in my opinion):

  • Display a not-dismissible notification (it keep track of installed apps and disappear only if microg services is installed)
  • A message in the logcat (every time)
  • Skip initialization if microg services is NOT installed (every time)

@mar-v-in mar-v-in added this to the 0.3.5 milestone Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants