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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

I can't create a Unity license

Discussion in 'Getting Started' started by maxznce, Nov 7, 2020.

  1. maxznce

    maxznce

    Joined:
    Nov 7, 2020
    Posts:
    1
    Hello everyone, I am contacting you today because I have a problem with the creation of my Unity license. The problem is the following when I backup the license request and I put it in the requested place I am refused and I am told this: We encountered a problem with the upload
    Error message: Non-whitespace before first tag. Line: 0 Column: 1 Char: 㼼

    Please try and create a new License Request File from within the Unity editor and upload it again here. If the problem persists, please contact support.

    I have tried again and again but without success. If anyone has a solution I would be happy to take it.
     
    ongtypc, Astabeth, StrikerX22 and 5 others like this.
  2. beerpal

    beerpal

    Joined:
    Nov 7, 2020
    Posts:
    1
    I'm having the same problem!
     
  3. danielsniffen

    danielsniffen

    Joined:
    Nov 7, 2020
    Posts:
    1
    sign in on the unity hub and then click "activate new license" instead of "manual activation"
     
    Andorekun likes this.
  4. llf1995

    llf1995

    Joined:
    Oct 20, 2020
    Posts:
    2
    I also encountered this situation. I had to generate a license in an offline environment and activate it on another computer. What should I do?
     
    Ararararara and shu-miyano like this.
  5. eidu-flx

    eidu-flx

    Joined:
    Jul 5, 2016
    Posts:
    4
    Facing the same problem. The alf file I'm uploading looks fine to me. Tried various charsets, incl. UTF-8 without BOM, but without success.
     
    Ararararara likes this.
  6. Ararararara

    Ararararara

    Joined:
    Sep 24, 2020
    Posts:
    1
    I have the same problem and the same exact error message.
     
    Skaru likes this.
  7. ConfusedCactus

    ConfusedCactus

    Joined:
    Jul 3, 2018
    Posts:
    19
    Same issue here, tried to run on command line for manual license file in my docker. It outputs a "-logfile" that cannot be opened. I tried to input licenses with multiple unity version into the webpage, the error persists. Even those exact alf files worked before! Not sure what's going on...
     
  8. RomeshPanditha

    RomeshPanditha

    Joined:
    Oct 23, 2020
    Posts:
    1
    I've had the same problem, get the same error with .alf files generated in a with cli in docker like @ConfusedCactus and i've also had the issue with .alf file generated from the unity hub gui itself.
     
  9. mrfreehelpme

    mrfreehelpme

    Joined:
    Nov 10, 2020
    Posts:
    3
    Error message: Non-whitespace before first tag. Line: 0 Column: 1 Char: 㼼
     
  10. ConfusedCactus

    ConfusedCactus

    Joined:
    Jul 3, 2018
    Posts:
    19
    Okay, I think I found a solution, just name the file Unity_v2019.alf or Unity_v2020.alf, i.e. simply Unity_v(Add the year).alf the problem for me. Before I was naming it like Unity_v2020.1.6f.alf, maybe that's why it doesn't work? If that's still the case, perhaps change encoding in a text editor like sublime
     
  11. mrfreehelpme

    mrfreehelpme

    Joined:
    Nov 10, 2020
    Posts:
    3
    Still doesn't work
     
  12. mrfreehelpme

    mrfreehelpme

    Joined:
    Nov 10, 2020
    Posts:
    3
    figured out how to solve it hopefully, you have to encode it with UTF-16 LE with BOM
     
  13. ItsDelta

    ItsDelta

    Joined:
    Jan 26, 2014
    Posts:
    3
    I had the same issue. For me UTF-16 LE or UTF-16 BE worked. Without BOM!
    (weird though, file content states UTF-8 and it was working fine like a week ago, looks like Unity changed something on their backend)
     
    Karashi-shiki and Skaru like this.
  14. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    761
    UTF-16 BE without BOM worked for me too. Here is the command I used in mac:

    Code (sh):
    1. iconv -f UTF-8 -t utf-16BE Unity_v2020.1.12f1.alf > Unity_v2020.1.12f1.utf16be.alf
     
    JayStGelais, DFLM, bigcitylab and 2 others like this.
  15. Astabeth

    Astabeth

    Joined:
    Oct 14, 2015
    Posts:
    9
    Is there a Windows solution for this?
     
  16. itsThatGuy

    itsThatGuy

    Joined:
    Apr 5, 2015
    Posts:
    2
    Also experiencing this. On Windows - used notepad++ to convert file to several different text encodings with no luck - exact same error every time.
     
  17. DFLM

    DFLM

    Joined:
    Feb 8, 2016
    Posts:
    1
    Thank you! This worked for me in Ubuntu
     
  18. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    761
    You can download iconv for windows
     
  19. tuxityy

    tuxityy

    Joined:
    Sep 27, 2019
    Posts:
    1
    Same issue here, on windows with unity hub 2.4.2 and also with ubuntu with docker. iconv command above didn't worked.
     
  20. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    761
  21. achimmihca

    achimmihca

    Joined:
    Feb 13, 2016
    Posts:
    154
    I have the same issue. Trying to activate a license for an automated docker build.
    It was working fine few days ago.

    I now tried various encodings using Visual Studio Code (hit F1 then search for "Change File Encoding").
    Sadly, none worked. I tried UTF-8 with and without BOM as well as UTF-16 BE and LE.
    Also I tried Firefox and Chrome.
    No luck.

    EDIT: I just opened a support ticket because this is likely a bug.
     
    Last edited: Nov 17, 2020
  22. wrnchRob

    wrnchRob

    Joined:
    Mar 24, 2020
    Posts:
    1
    OMG Unity please fix this... goldbug's approach worked for me on Mac.
     
  23. Astabeth

    Astabeth

    Joined:
    Oct 14, 2015
    Posts:
    9
    I have tried uninstalling and reinstalling everything. I have tried converting the filename to include the Unity version. I have tried all of the solutions listed above, except downloading iconv because I don't know what I'm doing. I have done everything support has sent me via email. I want to keep my work attached to my current license, but I'm on a new Windows computer because my Mac that I used to use kept crashing. My brother is ready to give up on Unity because he's having the same problem. If anyone finds a Windows solution, please post!
     
  24. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    761
    VS code cannot save utf-16 BE or LE without BOM. It always adds the BOM at the beginning.

    Try the online tool I linked too. It does have the option of utf-16 BE without BOM.
     
  25. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    761
    Did you try that online tool? it does have the option of saving utf-16 BE without BOM
     
  26. ongtypc

    ongtypc

    Joined:
    Apr 16, 2019
    Posts:
    2
    Having the same issue, tried iconv, vscode and the online tool. Nothing worked.
     
  27. Astabeth

    Astabeth

    Joined:
    Oct 14, 2015
    Posts:
    9
    I tried the link, but it saved as a txt file, not an alf. I am in way over my head here.
     
  28. achimmihca

    achimmihca

    Joined:
    Feb 13, 2016
    Posts:
    154
    > I tried the link, but it saved as a txt file, not an alf. I am in way over my head here.

    txt and alf is both plain text. You can rename the file to alf without worries.
     
  29. achimmihca

    achimmihca

    Joined:
    Feb 13, 2016
    Posts:
    154
    It's still not working for me. Tried also the online tool as well as iconv. Also I tried it with and without the leading <?xml version="1.0" encoding="UTF-8"?> of the XML content as the differing encoding might be a problem.
    Still no luck. I guess I have to wait until Unity fixes this bug.

    BTW: on Windows you can also install iconv, for example via scoop: scoop install iconv
     
  30. Astabeth

    Astabeth

    Joined:
    Oct 14, 2015
    Posts:
    9
    I tried changing the .txt to .alf, but it still would not take it.
     
  31. achimmihca

    achimmihca

    Joined:
    Feb 13, 2016
    Posts:
    154
    Oh my...
    So I gave it another chance and goldbug is right: The manual activation expects the file as "UTF-16 Big-Endian without BOM".
    -
    I played with the format and it is clear that a 2-byte encoding is expected: the weird chinese character in the error message depends on the first two characters of my UTF-8 file. Thus, it depends on the first 2 bytes.

    Knowing this, I tried the UTF-16 encoded files again.
    After a closer look, I noticed that the weird chinese character of my UTF-16BE and UTF-16LE encoded files was the same.
    And indeed: neither iconv nor the linked website to change encoding was giving me a proper "UTF-16BE without BOM" encoded file.
    Maybe Windows or something was messing around here?

    Anyway, I now took another approach:
    - remove the <?xml version="1.0" encoding="UTF-8"?> part of the XML content if it is still present in your file.
    - Save the file as "UTF-16BE with BOM" using VS Code (or another editor)
    - Then remove the first 2 bytes (the byte-order-mark) via a script

    For example, in Powershell you could do:
    ```
    $byteArray = [IO.File]::ReadAllBytes('Unity_v2020.utf16be.bom.alf')
    $byteArrayNoBom = $byteArray[2..($byteArray.Length-1)]
    [IO.File]::WriteAllBytes('Unity_v2020.utf16be.nobom.alf', $byteArrayNoBom)
    ```
    This file was finally accepted for the manual activation.

    Kudos to goldbug for the hint!
    -
    Still, I would say this is a bug on Unity's side.
     
    llf1995 likes this.
  32. Astabeth

    Astabeth

    Joined:
    Oct 14, 2015
    Posts:
    9
    Holy cow. This is helpful for some people. I have no idea what most of your post meant!
     
  33. achimmihca

    achimmihca

    Joined:
    Feb 13, 2016
    Posts:
    154
  34. llf1995

    llf1995

    Joined:
    Oct 20, 2020
    Posts:
    2
    tank you very mucj
     
  35. Kalle-Hiitola

    Kalle-Hiitola

    Joined:
    Oct 30, 2014
    Posts:
    1
    This is the easiest way to solve the issue:

    1. Download Sublime Text https://www.sublimetext.com/3
    2. Open your Unity alf file with that program
    3. From File menu select 'Save With Encoding' -> 'UTF-16 BE'
    4. Presto the file is now ready to be used
     
  36. khoaharp

    khoaharp

    Joined:
    Oct 19, 2020
    Posts:
    3
    Work flawlessly, thanks.
     
  37. Astabeth

    Astabeth

    Joined:
    Oct 14, 2015
    Posts:
    9
    When I click 'Save With Encoding' -> 'UTF-16 BE' nothing happens. It doesn't ask me where to save, or anything.
     
    S_le_E_p likes this.
  38. Astabeth

    Astabeth

    Joined:
    Oct 14, 2015
    Posts:
    9
    Okay, I see from the popup in the bottom bar that it is saving it when I select save with encoding. I tried both the UTF-16 BE and the UTF-16 BE with BOM, but neither worked.
     
  39. Astabeth

    Astabeth

    Joined:
    Oct 14, 2015
    Posts:
    9
    I tried all the ways to save it. At either UTF-8 or UTF-8 with BOM, it generated a ulf file that I was able to use to activate my license on the new computer. Thank you so much - I was ready to leave Unity!
     
  40. Deleted User

    Deleted User

    Guest

    I can't download a request license file it always says "Unable to save license" can anybody help me
     
  41. Sylkytuli

    Sylkytuli

    Joined:
    Feb 2, 2022
    Posts:
    1
    Having the same issue. None of the solutions here worked.
    Unity, please, fix your stuff.
     
unityunity