eos_plugin_for_unity icon indicating copy to clipboard operation
eos_plugin_for_unity copied to clipboard

[Android]Invalid client error, game is requesting friends_list even if it's disabled on Epic Account Services

Open vanustwo opened this issue 11 months ago • 9 comments

Describe the bug My game only request 'basic profile' permission on Epic Account Services. However the sdk is adding 'friends list' permission

To Reproduce Steps to reproduce the behavior:

  1. Set Application Permission to only basic profile on Epic Account Services
  2. Install com.playeveryware.eos-3.3.6.tgz and set configurations.
  3. Make sure Auth Scope Flags only uses Basic Profile
  4. Deploy AuthAndFriends scene to device
  5. Try login with Account Portal

Expected behavior A clear and concise description of what you expected to happen.

Smartphone (please complete the following information):

  • Device: Pixel 4 or 7
  • OS: Android 13
  • Unity 2022.3.53
  • com.playeveryware.eos-3.3.6.tgz
void MigrateNonOverrideableConfigValues()

authScopeOptionsFlags |= AuthScopeFlags.BasicProfile;
authScopeOptionsFlags |= AuthScopeFlags.FriendsList;
authScopeOptionsFlags |= AuthScopeFlags.Presence;

vanustwo avatar Feb 09 '25 12:02 vanustwo

Ahoy @vanustwo ! There is migration code from going to the previous versions of the config to the new versions of the config. It should put a schemaVersion: "1.0" into your eos_windows_config.json after migration, which should prevent it from migrating again. Can you use the EOS Configuration window to set your Auth Scope Flags, press Save All Changes, then try again? Try closing the EOS Configuration window after saving, make a build, then open the window again to see if the Auth Scope Flags somehow set themselves back.

It's possible you've ignored the StreamingAssets or this configuration file in your source control. Make sure this change is saved and committed.

WispyMouse avatar Feb 10 '25 18:02 WispyMouse

Still having the same issue. Can confirm all eos_windows_config.json have schemaVersion: "1.0". Also every eos_xxx_config.json inside SteamingAssets/EOS have schemaVersion: "1.0". I'm using macOS as my build environment.

vanustwo avatar Feb 11 '25 13:02 vanustwo

Oh darn! So to be clear, can you please:

  • Open the EOS Config Editor Window
  • Select the Android tab
  • Use the Auth Scope Flags multi select dropdown to deselect "Friends List"
  • Save All Changes
  • Close the configuration
  • Build for Android
  • Open EOS Configuration, observe if "Friends List" was added back to the list of Auth Scope Flags

WispyMouse avatar Feb 12 '25 00:02 WispyMouse

Not sure if it's the same root cause, but I'm having the same symptoms when building for iOS. (Unity 2021.3.35f1, macOS)

For me it seems that the json parse fails; there's a subtle error message logged about failing to create the custom Json converters. (ListOfStringsToPlatformFlags, etc.). "Error creating 'PlayEveryWare.EpicOnlineServices.StringToTypeConverter`1[System.Single]'"

I tried dropping the Managed Code Stripping Level to Minimal (instead of Low), and that worked. Perhaps that will help for you too?

I ended up setting the stripping level back to Low and going with this link.xml instead:

<linker>
	<assembly fullname="com.playeveryware.eos.core">
		<type fullname="PlayEveryWare.EpicOnlineServices.ListOfStringsToPlatformFlags" preserve="all"/>
		<type fullname="PlayEveryWare.EpicOnlineServices.ListOfStringsToAuthScopeFlags" preserve="all"/>
		<type fullname="PlayEveryWare.EpicOnlineServices.ListOfStringsToIntegratedPlatformManagementFlags" preserve="all"/>
		<type fullname="PlayEveryWare.EpicOnlineServices.ListOfStringsToInputStateButtonFlags" preserve="all"/>
		<type fullname="PlayEveryWare.EpicOnlineServices.StringToTypeConverter`1" preserve="all"/>
	</assembly>
</linker>

I have no idea why these custom json converters are being stripped, but I bet one of you awesome people on the project will figure it out 🌻

Zyhlon avatar Feb 18 '25 15:02 Zyhlon

Thank you. I had to add this to my link.xml to get it to work on Android and iOS. <assembly fullname="com.playeveryware.eos.core" preserve="all"> <assembly fullname="com.Epic.OnlineServices" preserve="all"/> However this worked on EOS 3.3.6. On EOS 4.0.0, it does not work on Android

vanustwo avatar Feb 27 '25 09:02 vanustwo

Thank you. I had to add this to my link.xml to get it to work on Android and iOS. <assembly fullname="com.playeveryware.eos.core" preserve="all"> <assembly fullname="com.Epic.OnlineServices" preserve="all"/> However this worked on EOS 3.3.6. On EOS 4.0.0, it does not work on Android

For clarity - does adding this to the link.xml file resolve the issue on Android and iOS for version 4.0 of the plugin?

paulhazen avatar Mar 03 '25 21:03 paulhazen

Hi @paulhazen , Yes, modifying link.xml will work on 3.3.6 on both iOS and Android. However on 4.0.0 iOS = working Android = stuck on allow permission page on browser.

Repro steps

  1. Create new Unity project in 2022.3.53
  2. Install PlayEveryWare tar 4.0.0
  3. Configure plugin
  4. Build and Run with scene AuthAndFriends to Android
  5. Attempt to sign in with Account Portal
  6. Game is now stuck on permission page on browser

vanustwo avatar Mar 04 '25 11:03 vanustwo

@paulhazen Do you have any insights on what might the issue? This is blocking me testing on Android. Any hints is appreciated

vanustwo avatar Mar 05 '25 16:03 vanustwo

We have received this issue and are working on a fix in a future release of the plugin. We have moved our support to EOSHelp. For future issues, please raise a private discussion here.

SebBergy avatar Mar 10 '25 23:03 SebBergy