pyarmor icon indicating copy to clipboard operation
pyarmor copied to clipboard

[BUG] ERROR request license token failed (3): <h1>Server Error (500)</h1> ERROR something is wrong

Open imkarakayaavl opened this issue 1 year ago • 1 comments

Issue Description:

Intermittent failure during code obfuscation with Pyarmor while using a build pipeline. This issue sporadically occurs and the error message suggests a problem during the license token request phase.

Steps to reproduce:

The issue can be reproduced using the following command: $ pyarmor -d reg build\pyarmor-regfile-xxxx.zip

Expected Behaviour:

The command should successfully register the Pyarmor license and obfuscate the code without any errors.

Current Behaviour

Sometimes the command works as expected, but occasionally it fails with the following error:

$ pyarmor -d reg build\pyarmor-regfile-xxxx.zip  
INFO     Python 3.11.3
INFO     Pyarmor 8.5.6 (trial), XXXXXX, non-profits
INFO     Platform windows.x86_64
DEBUG    native platform windows.amd64
DEBUG    home path: C:\path\to\armor\.pyarmor
INFO     register "build\pyarmor-regfile-XXXX.zip"
DEBUG    extracting license.lic
DEBUG    extracting .pyarmor_capsule.zip
INFO     update license token
DEBUG    unknown error, please check pyarmor.error.log
ERROR    request license token failed (3): <h1>Server Error (500)</h1>
ERROR    somthing is wrong
*=============================================================*
*  Please check                                               *
*    https://pyarmor.readthedocs.io/en/latest/questions.html  *
*  or run `pyarmor man` to find solutions quickly             *
*                                                             *
*  It's recommand to report issue by `pyarmor man` in order   *
*  to provide necessary information, and avoid dupcliated     *
*  issues or unclear question.                                *
*=============================================================*

In contrast, when the process completes successfully, the typical output is:

INFO     Python 3.11.5
INFO     Pyarmor 8.5.8 (pro), XXXXXX, XX_LICENSE_NAME_XX
INFO     Platform windows.x86_64
INFO     register "C:/path/to/regfile/pyarmor-regfile-XXXX.zip"
INFO     update license token
INFO     This license registration information:

License Type    : pyarmor-pro
License No.     : pyarmor-vax-XXXXXX
License To      : XX_LICENSE_USER_XX
License Product : XX_LICENSE_NAME_XX

BCC Mode        : Yes
RFT Mode        : Yes

Notes
* Need verify license online when obfuscating scripts

Waiting for your feedback, Best Regards, Thanks Murat

imkarakayaavl avatar May 10 '24 11:05 imkarakayaavl

Do not run pyarmor reg too many times in 1 minute, the license server only allows 3 requests per minute for same license.

jondy avatar May 11 '24 00:05 jondy