Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Error when import/create debug token

Discussion in 'BlackBerry' started by NightDreamer, Sep 4, 2013.

  1. NightDreamer

    NightDreamer

    Joined:
    Sep 4, 2013
    Posts:
    1
    I'm trying to create a token, but I get this error:
    What do I do? In what could be the reason?
     
  2. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Hi There,

    Sounds like your debug token might be corrupt. Could you do me a favor and run one of these commands and pm me the result?

    for OSX:
    In the following directory: /Applications/Unity/Unity.app/Contents/PlaybackEngines/BB10Player/blackberry-tools/bin
    there is a binary called blackberry-nativepackager you will want to run that like so:
    Code (csharp):
    1. ./blackberry-nativepackager -listManifest <path to your debug token>
    for Windows these binaries are (probably) in (depending on where you installed unity):
    C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\bb10player\blackberry-tools\bin
    You'll want to do the same thing here, except with the bat script.

    Note: These will attempt to make a java call, so you'll want to make sure that's on your PATH environment variable prior to running these.
     
  3. Habacucc

    Habacucc

    Joined:
    Sep 16, 2013
    Posts:
    7
    Hello, I'm also getting this problem. I will try to explain as detailed as possible and then post the result of following the instructions you provided.

    When I try to create a Debug Token, after clicking the "Generate Token" button, I get the following error on console:

    However I get this error, a DebugToken.bar DO is created. But seems like Unity can't resolve this for the "Upload" button always remains inactive so I can't upload any Debug Token. When I try to import the created Debug Token, I get the very same error (The "OverflowException: Value is too large" one).

    After running the commands you provided, this is what I get:

    I really want to start developing in Unity and then port it to a BB device, but this problem wouldn't let me.
    Any help is greatly appreciated.
     
  4. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Hey There,

    This is a bug in Unity that I will be fixing asap. The PIN values for the phones exceeded the max int value for C#.
     
  5. Habacucc

    Habacucc

    Joined:
    Sep 16, 2013
    Posts:
    7
    So should I make a shorter PIN? Or that wouldn't work either?
     
  6. ScottyB

    ScottyB

    Joined:
    Apr 4, 2011
    Posts:
    146
    I believe that Alex is talking about the PIN that is unique to your test device which is a 8 digit hex value that I don't believe you can change.

    An 8 digit hex value has a maximum value of FFFFFFFF which is 4,294,967,295 in decimal. If Unity is storing this as an int, which has a max value of 2,147,483,647, then this will cause this issue for certain device PINs. You can see in your output of your command that your device PIN is "Debug-Token-Device-Id: 4294943634" (from what I can tell) which is larger than this max value on an int.

    It should be a relatively quick fix for Unity to change it to store the PIN value as a unit or long. Hopefully we'll get a 4.2.2 version of Unity soon with this BlackBerry fix and full support for iOS 7 (something else I'm fighting with).

    Btw, I also get this error when trying to add my simulator test virtual machine which comes with BlackBerry's IDE. Not currently at my computer to get the full PIN but I remember that it starts with FFFF and maybe this is common with all simulator instances? If it is then no simulator PINs would work. Just a guess though and adding my 2c of hopefully helpful information.
     
  7. Habacucc

    Habacucc

    Joined:
    Sep 16, 2013
    Posts:
    7
    Thanks for the explanation. it was clear as crystal. And yes, my device pin (in hexadecimal) is FFFFA392, which in decimal is, as you stated, 4294943634.

    I didn't remember the max value for a "int" type (thanks for reminding me about it :)), according to this http://www.cplusplus.com/reference/climits/ , 2147483647 is the maximum value for a type "long int". So yeah, storing the PIN as a "unsigned int" or a "long long int" would fix this issue. Looking forward for the fix of this issue so people can start developing correctly for BlackBerry.
     
  8. Habacucc

    Habacucc

    Joined:
    Sep 16, 2013
    Posts:
    7
    Also I forgot, I'm trying to do this very same thing, to register a simulator, but as you said, the simulated device PIN starts with FFFF (more specifically,it is FFFFA392), and if every simulator PIN has this format, then no simulator would be able to be registered for testing.
     
  9. rmadhavan7

    rmadhavan7

    Joined:
    Apr 22, 2013
    Posts:
    22
    Just wanted to note that Unity currently does not deploy to BlackBerry Simulator (or any device simulator AFAIK).
     
  10. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Thanks ScottyB for expanding upon my very terse explanation of what is happening. :)

    The work-around in the mean time until I get this fix out to you guys is to skip the debug token creation step (if your device has a HW pin that is causing this problem) and just build, not build run your project to an application bar file. At this point you could either use the blackberry command line tools (link) or QDE (link) to deploy the project onto the device.

    The location of the command line tools for you guys will be a little different. On OSX They'll be in:
    /Applications/Unity/Unity.app/Contents/PlaybackEngines/BB10Player/blackberry-tools/bin
    and on Windows:
    C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\bb10player\blackberry-tools\bin

    If you run blackberry-deploy without arguments it has a very helpful usage message that should get you rolling. I know this solution isn't ideal and the problem will be fixed soon. As ScottyB pointed out it is a pretty simple fix. :)
     
  11. ScottyB

    ScottyB

    Joined:
    Apr 4, 2011
    Posts:
    146
    Just curious, have you tried deploying to the BlackBerry Simulator (if you're not having the same PIN issues as Habacucc and I)?

    The BlackBerry Simulator is simply a VM run through VMware Player or the like. I could see this being able to run games through the normal Unity dev testing mode outlined here: http://docs.unity3d.com/Documentation/Manual/bb10-setup.html

    As noted, I have not been able to try this because of the aforementioned bug in Unity and the graphical performance might turn out to be terrible. Just interested in it while I wait for a BlackBerry test device to turn up.

    EDIT:
    Always happy to help. :D
     
    Last edited: Sep 17, 2013
  12. Habacucc

    Habacucc

    Joined:
    Sep 16, 2013
    Posts:
    7
    This would mean a huge drawback for me, as I'm not able to afford a physical device at this moment. So I would like to know from a Dev if this is true, if it is not possible to deploy an app or game to a simulator (for testing purposes). Could you enlighten us in this matter, Alex?
     
  13. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    We just haven't had time to spend (yet) on getting Unity to work on the simulator. It is on my list of things to get working but getting making Unity as feature complete as possible on the device has been taking priority.
     
  14. rmadhavan7

    rmadhavan7

    Joined:
    Apr 22, 2013
    Posts:
    22
    The issue is that the unity game binary needs to be compiled against the same/similar x86 equivalent libs and I am sure the testing of all the functionalities that works on a device is non trivial.
     
  15. Habacucc

    Habacucc

    Joined:
    Sep 16, 2013
    Posts:
    7
    Hello again. I tried the solution you proposed, building withouth a debug token to a .bar file. Then I tried deploying both via command line and using QDE (and also tried a 3rd party program), and in every case I got the following error:

    The "820 required fields missing from manifest (Package-Author-Id)" is the error message I received with every tried method.
    Is this because the application couldn't register a debug token, thus couldn't get an Author ID?
     
  16. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    (facepalm) you are correct, yeah I forgot that Unity will pull the author ID from the debug token. Let me see what I can come up with to work around this issue to hold you guys over until the next release/patch comes out.
     
  17. shudecek2

    shudecek2

    Joined:
    Aug 9, 2013
    Posts:
    2
    same failure:

    result::failure 820 required fields missing from manifest (Package-Author-Id)

    ...when installing to simulator using: blackberry-deploy and unable to add my simulator's pin: FFFF????
    Please...I would like to be notified when there is a workaround if possible
     
  18. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Release 4.2.2 is out and has the fix for the large PIN issue. I still have not tested this against the simulator so I can't promise if it will fix that particular problem for you guys.

    http://unity3d.com/unity/whats-new/unity-4.2.2
     
  19. Habacucc

    Habacucc

    Joined:
    Sep 16, 2013
    Posts:
    7
    The new release did fix the PIN issue, thanks a lot :). But sadly another issue arises. When building and deploying into a BB simulator, the app does get installed and the app icon appears on the device main screen, but when trying to launch the app/game , nothing happens.

    Unity throws this error when building and running:

    The app/game won't run either if installed via command line or by 3rd party software.

    But then again, as stated by Alex, Unity has not yet been tested on BB simulators, so the problem lies most likely on the simulator. I'm guessing it would work on a physical device, but it would be nice to also be able to test our games on a simulator :) .
     
  20. PBernhardt

    PBernhardt

    Joined:
    Oct 9, 2013
    Posts:
    5
    I believe that error means the app is compiled using the wrong architecture. The simulators run x86, where the devices run ARM. So if the app is compiled for the device, it will not run on the simulator.