flutter-unity-view-widget
flutter-unity-view-widget copied to clipboard
Problems with EasyAR (invalid key on Release/Production Mode)
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:
- Integrate Easy AR in your Unity Project (works fine)
- Export to Flutter following the steps on this Plugin
- Test it on debug mode (works fine)
- Generate a Release APK (fat).
- 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
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
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 ??
@von-maurus, were you able to solve this problem? Or, does anyone else know how to fix it?
I facing the same issues with AR Core and Unity Camera freeze in the release build.
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