Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by GameDevKaran · Sep 11, 2020 at 12:15 AM · crashsdkcrashinggoogleapplication

ARcore "Session.CheckAvailablity().result" getting "Unknown Error" and App Crashes immediately

Hello Devs, i have been trying to solve this problem since couple of weeks and i failed to solve. this problem is with Google AR core SDK and I am using unity 2019.3.1f1 and Latest arcore sdk.

Problem : When i Check Session.CheckAvailablity(); that is fine no exception catches but after when i trying to get result i always recieved "Unkown Error" on Supported Device and Unsupported Device and after that application crashed immediately.

I have reasearched on Internet but i didn't get any Suitable Option for this.

My Script for Checking "Session.CheckAvailablity()" with different types of function:

 using System.Collections;
  using UnityEngine;
  using GoogleARCore;
  using UnityEngine.UI;
  using System;
  
  public class TestingARSupport : MonoBehaviour
  {
      [SerializeField] private GameObject LogPrefab;
      [SerializeField] private Transform DebugContainer;
  
      public void Check()
      {
          StartCoroutine(CheckCompatibility());
      }
      public void Check2()
      {
          StartCoroutine(CheckCompatibility2());
      }
      public void Check3()
      {
          StartCoroutine(CheckCompatibility3());
      }
      private void CopyToClipBoard(string Txt)
      {
          CustomNameSpace.Server.Clipboard = Txt;
      }
      private IEnumerator CheckCompatibility()
      {
          CreateLog("");
          AsyncTask<ApkAvailabilityStatus> checkTask = null;
          try
          {
              checkTask = Session.CheckApkAvailability();
              CreateLog("Checking Request Created");
          }
          catch (Exception e)
          {
              CreateLog("<b>Sorry Failed To Create \"Checking Request Created\":</b>" + '\n' + "<color=red>" + e + "</color>");
              //Debug.LogExeption(e, this);
          }
          CustomYieldInstruction customYield = checkTask.WaitForCompletion();
          /*try
          {
              customYield = checkTask.WaitForCompletion();
              CreateLog("Please Wait Checking Request Has been Sent");
          }
          catch (Exception e)
          {
              CreateLog("<b>Sorry Failed To Create \"Checking Request Created\":</b>" + '\n' + "<color=red>" + e + "</color>");
              //Debug.LogException(e, this);
          }*/
          CreateLog("Checking For Result Please Wait");
          yield return checkTask.WaitForCompletion();
          CreateLog("Result Created Successfuly");
          try
          {
              ApkAvailabilityStatus result = checkTask.Result;
              /*try
              {
                  result = checkTask.Result;
                  CreateLog("Checking Is Completed, result will be soon");
              }
              catch (Exception e)
              {
                  CreateLog("<b>Sorry Failed To Load Result:</b>" + '\n' + "<color=red>" + e + "</color>");
                  //Debug.LogException(e, this);
              }*/
              switch (result)
              {
                  case ApkAvailabilityStatus.SupportedApkTooOld:
                      CreateLog("Supported apk too old");
                      break;
                  case ApkAvailabilityStatus.SupportedInstalled:
                      CreateLog("Supported and installed");
                      break;
                  case ApkAvailabilityStatus.SupportedNotInstalled:
                      CreateLog("Supported, not installed, requesting installation");
                      break;
                  case ApkAvailabilityStatus.UnknownChecking:
                      CreateLog("Unknown Checking");
                      break;
                  case ApkAvailabilityStatus.UnknownError:
                      CreateLog("Unknown Error");
                      break;
                  case ApkAvailabilityStatus.UnknownTimedOut:
                      CreateLog("Unknown Timed out");
                      break;
                  case ApkAvailabilityStatus.UnsupportedDeviceNotCapable:
                      CreateLog("Unsupported Device Not Capable");
                      break;
              }
          }
          catch (Exception e)
          {
              CreateLog("<b>Sorry Failed To Load Result:</b>" + '\n' + "<color=red>" + e + "</color>");
              Debug.LogException(e, this);
          }
      }
      private IEnumerator CheckCompatibility2()
      {
          CreateLog("");
          AsyncTask<ApkAvailabilityStatus> checkTask = null;
          try
          {
              checkTask = Session.CheckApkAvailability();
              CreateLog("Checking Request Created");
          }
          catch (Exception e)
          {
              CreateLog("<b>Sorry Failed To Create \"Checking Request Created\":</b>" + '\n' + "<color=red>" + e + "</color>");
              //Debug.LogExeption(e, this);
          }
          CreateLog("Checking For Result Please Wait");
          while (!checkTask.IsComplete)
          {
              yield return null;
          }
          CreateLog("Result Created Successfuly");
          try
          {
              ApkAvailabilityStatus result = checkTask.Result;
              /*try
              {
                  result = checkTask.Result;
                  CreateLog("Checking Is Completed, result will be soon");
              }
              catch (Exception e)
              {
                  CreateLog("<b>Sorry Failed To Load Result:</b>" + '\n' + "<color=red>" + e + "</color>");
                  //Debug.LogException(e, this);
              }*/
              switch (result)
              {
                  case ApkAvailabilityStatus.SupportedApkTooOld:
                      CreateLog("Supported apk too old");
                      break;
                  case ApkAvailabilityStatus.SupportedInstalled:
                      CreateLog("Supported and installed");
                      break;
                  case ApkAvailabilityStatus.SupportedNotInstalled:
                      CreateLog("Supported, not installed, requesting installation");
                      break;
                  case ApkAvailabilityStatus.UnknownChecking:
                      CreateLog("Unknown Checking");
                      break;
                  case ApkAvailabilityStatus.UnknownError:
                      CreateLog("Unknown Error");
                      break;
                  case ApkAvailabilityStatus.UnknownTimedOut:
                      CreateLog("Unknown Timed out");
                      break;
                  case ApkAvailabilityStatus.UnsupportedDeviceNotCapable:
                      CreateLog("Unsupported Device Not Capable");
                      break;
              }
          }
          catch (Exception e)
          {
              CreateLog("<b>Sorry Failed To Load Result:</b>" + '\n' + "<color=red>" + e + "</color>");
              Debug.LogException(e, this);
          }
      }
      private IEnumerator CheckCompatibility3()
      {
          CreateLog("");
          try
          {
              Session.CheckApkAvailability();
              CreateLog("Checking Request Created");
          }
          catch (Exception e)
          {
              CreateLog("<b>Sorry Failed To Create \"Checking Request Created\":</b>" + '\n' + "<color=red>" + e + "</color>");
              //Debug.LogExeption(e, this);
          }
          CreateLog("Checking For Result Please Wait");
          while (!Session.CheckApkAvailability().IsComplete)
          {
              yield return null;
          }
          CreateLog("Result Created Successfuly");
          try
          {
              ApkAvailabilityStatus result = Session.CheckApkAvailability().Result;
              switch (result)
              {
                  case ApkAvailabilityStatus.SupportedApkTooOld:
                      CreateLog("Supported apk too old");
                      break;
                  case ApkAvailabilityStatus.SupportedInstalled:
                      CreateLog("Supported and installed");
                      break;
                  case ApkAvailabilityStatus.SupportedNotInstalled:
                      CreateLog("Supported, not installed, requesting installation");
                      break;
                  case ApkAvailabilityStatus.UnknownChecking:
                      CreateLog("Unknown Checking");
                      break;
                  case ApkAvailabilityStatus.UnknownError:
                      CreateLog("Unknown Error");
                      break;
                  case ApkAvailabilityStatus.UnknownTimedOut:
                      CreateLog("Unknown Timed out");
                      break;
                  case ApkAvailabilityStatus.UnsupportedDeviceNotCapable:
                      CreateLog("Unsupported Device Not Capable");
                      break;
              }
          }
          catch (Exception e)
          {
              CreateLog("<b>Sorry Failed To Load Result:</b>" + '\n' + "<color=red>" + e + "</color>");
              Debug.LogException(e, this);
          }
      }
  }
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

221 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Editor constantly crashing 0 Answers

Will Google's GDPR Consent SDK Work with Unity? 0 Answers

Fatal signal 11 (SIGSEGV), code 1, fault addr 0x50 0 Answers

Windows 10 Unity access violation 1 Answer

Unity Crashes when clicked on colour dropper of any material. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges