Search Unity

Question using APK Signature Scheme v2: integer overflow when installing APK to Quest

Discussion in 'VR' started by DevDunk, Nov 29, 2021.

  1. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    I am working on a PCVR to Quest port and have issues installing the game. The build goes well, but I get this error.
    I tried a blank project with the same setup and that did install properly.

    Full error: A task failed. Check the tasks screen for more info. 1.6a 2020.apk: : /data/local/tmp/_stream.apk could not be installed [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl1614583577.tmp/base.apk using APK Signature Scheme v2: integer overflow]

    Setup:
    Quest 2
    Unity 2020.3.23f1
    Oculus XR 2.0.0 preview (same issue with 1.11)
    XR management 4.2.0
    Android minimal v set to v23 (so both v1 and v2 signing is applied)
    IL2CPP backend
    Q1 and Q2 both checked in Oculus settings
    Same keystore used as my sample project which did work
    Issue both when building with OVRBuilder and regular building

    If you need more info please ask
     
    Last edited: Nov 29, 2021
  2. Rob-Fireproof

    Rob-Fireproof

    Joined:
    Dec 18, 2012
    Posts:
    56
    Did you ever solve this? I'm having a similar problem. It seems related to the size of the apk.
     
  3. Rob-Fireproof

    Rob-Fireproof

    Joined:
    Dec 18, 2012
    Posts:
    56
    ZenUnity likes this.
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    I reimported my project and it was somehow fixed
     
  5. ZenUnity

    ZenUnity

    Joined:
    Apr 21, 2013
    Posts:
    28
    Thanks for this! I spent two days trying to figure out what was causing my builds to fail and it turned out that I had some unused files in the Streaming Assets directory that were putting my builds over 2GB limit. It would be great if there was a file size check on builds so a relevant error message could be thrown.
     
    Immersive-Matthew and trd99 like this.
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    You could program that in yourself (I might do it with a tool), but the sizes are different for all distributing platforms, so it's not Unity's task to check build sizes
     
  7. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    I agree Error messages in just about every app miss these sorts of more descriptive errors. I hope AI will add this layer as it will save us all a lot of time.
     
  8. CharSui

    CharSui

    Joined:
    Nov 19, 2021
    Posts:
    4
    My solution was to drop the APG (Android Plugins For Gradle) version to 3.6.0. In practice, I found that going up to 4.2.0 was fine. When I had the same problem, my APG was 4.0.1. The META-INF.MF display in apk is Generated By ADT, more than 2G close to 3G. When I set it to Develoment Build, the display is generated by Signflinger.

    Apks signed with Signflinger package smoothly.

    So maybe try change the APG version
     
  9. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    For me I had to use the correct android manifest (generated it using oculus integration in a seperate project)