Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Oculus Quest v2 signing issue in Unity 2020.2

Discussion in 'VR' started by mstevenson, Dec 29, 2020.

  1. mstevenson

    mstevenson

    Joined:
    Sep 24, 2009
    Posts:
    189
    I currently have a published app on the Oculus Quest store that was created using Unity 2019.4 with v2 signing. I just upgraded the project to Unity 2020.2 to take advantage of Vulkan but I've run into a sticky signing issue when uploading this new build.

    I'm not using a custom gradle template, and I generated a new AndroidManifest.xml using Oculus Integration tools which includes the following line as required for v2 signing:

    <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />​

    I verified that v2 signing is correctly applied to the build:

    cd C:\Program Files\Unity\Hub\Editor\2020.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3
    apksigner verify --verbose build.apk​

    Output:

    Verified using v1 scheme (JAR signing): false
    Verified using v2 scheme (APK Signature Scheme v2): true
    Number of signers: 1​

    When I upload the build using OVR Platform Tools it reaches step 4/5, "validating package contents", then fails with the following error:

    ERROR: Please sign your APK and then resubmit.​

    My initial suspicion was that v1 signing is required, but according to the Oculus developer docs the Quest only uses v2 signing. Just to make certain I created a custom gradle template and added a signingConfigs block with v1SigningEnabled true, but apksigner indicates that the resulting build still only uses v2 signing.

    Does anyone know what I might be doing wrong?
     
    Last edited: Dec 29, 2020
  2. mstevenson

    mstevenson

    Joined:
    Sep 24, 2009
    Posts:
    189
    The solution was to downgrade from Android API level 25 to 23 which applies both v1 and v2 signing. We had previously been using level 25 in Unity 2019 without any problems.
     
    glenneroo, TheCircadian and hhoffren like this.
  3. FlorianBernard

    FlorianBernard

    Joined:
    Jun 9, 2015
    Posts:
    165
    @mstevenson I had the exact same issue after upgrading from 2019.4 to 2020.2 and found your post.
    Switching "Min API Level" from 24 to 23 fixed the problem. Thank you very much for sharing your solution!
     
    TheCircadian likes this.
  4. mstevenson

    mstevenson

    Joined:
    Sep 24, 2009
    Posts:
    189
    You're welcome! I see that the Oculus developer docs now explicitly indicate to use API level 23 in Unity. They must have changed this recently since we'd followed the docs quite closely for our initial launch.
     
    TheCircadian and FlorianBernard like this.
  5. JoelWall

    JoelWall

    Joined:
    Nov 11, 2020
    Posts:
    2
    I'm having this exact issue, spent 4 hours wondering why my signatures weren't working. just as i gave up and went to bed, was irritated so i got out my laptop and did a bit more research and found this. It worked and now i can get some sleep. Thank You. I was on 25.
     
    TheCircadian and FlorianBernard like this.
  6. TheCircadian

    TheCircadian

    Joined:
    Jul 30, 2016
    Posts:
    15
    Wow thank you so much! I didn't realize it also needed v1 signing for the Quest 2, although it seems there's no other way for the Oculus App Lab to accept it with just v2
     
  7. ifif

    ifif

    Joined:
    Aug 7, 2014
    Posts:
    2
    I have the same issue , tried everthing but all not work, you solved?



    Certificate Changed
    The APK is signed with a different certificate. Be sure to use the same keystore and key as used for a previous version.