flutter-unity-view-widget icon indicating copy to clipboard operation
flutter-unity-view-widget copied to clipboard

Problems with EasyAR (invalid key on Release/Production Mode)

Open von-maurus opened this issue 3 years ago • 4 comments

Hello!, I have a flutter app with a Unity Easy AR application which requires a Key in order to work. When I build in Debug Mode it works fine, no errors, but the problem is that when I make a build or immediately launch a project on the device in Release-mode , I get an error: Invalid Key. But at the same time, the application package ID and the key itself are 100% correct. This was tested on Android Device.

Steps to reproduce the behavior:

  1. Integrate Easy AR in your Unity Project (works fine)
  2. Export to Flutter following the steps on this Plugin
  3. Test it on debug mode (works fine)
  4. Generate a Release APK (fat).
  5. Get a an error like: "Invalid Key Get from EasyAR Develop Center (www.easyar.com) -> SD Authorization"

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

Screenshots This is the error shown image

Unity (please complete the following information):

  • OS: Android
  • Version: 2019.4.28.f1

Device version

  • Device: All Android devices
  • OS: Android
  • Version: SDK 24 or later

Additional context The assumptions are the following:

  • Is not a Key version problem because I have a Pro Key generated with enhanced features.
  • The error prompt by EasyAR is very poor (invalid key message shown in image).
  • I'm assuming that an EasyAR library maybe gets eliminated or erased when a Release version is build.
  • Maybe the package name changes when a release apk is generated.
  • I checked 100% the package names and

If someone has a better way on doing AR apps using Vuforia or EasyAR please share some knowledge because the issues found didn't work for me. Here are some issues related to this bug:

  • https://askandroidquestions.com/2021/08/24/easyar-invalid-key-only-in-release-build/
  • https://answers.easyar.com/10470/error-invalid-key-or-package-name
  • Similar problem using React Native https://github.com/f111fei/react-native-unity-view/issues/123

von-maurus avatar Oct 19 '21 14:10 von-maurus

I have the same problem, in debug it works fine while in release it says invalid key. I verified that the application id is the same as the one I entered in the license on the easyar website. I also tried to modify the bundle id in unity but the situation doesn't change.

Anyone know what it could be due to and how to fix it ??

MTM-A avatar Nov 02 '21 08:11 MTM-A

@von-maurus, were you able to solve this problem? Or, does anyone else know how to fix it?

MTM-A avatar Nov 29 '21 15:11 MTM-A

I facing the same issues with AR Core and Unity Camera freeze in the release build.

iletai avatar Apr 17 '22 18:04 iletai

I facing the same issues with AR Core and Unity Camera freeze in the release build.

I know what's the error eventually.

Try this solution: https://github.com/Ahmadre/unity_widget#solutions-to-problems

Ahmadre avatar Apr 22 '22 14:04 Ahmadre