DoubangoTelecom / ultimateMRZ-SDK

Machine-readable zone/travel document (MRZ / MRTD) detector and recognizer using deep learning
https://www.doubango.org/webapps/mrz/
Other
174 stars 49 forks source link

System.Exception: Init: Execution failed: #37

Closed imranbaloch closed 3 years ago

imranbaloch commented 3 years ago

I am getting this exception on the production server (Windows Server 2012 R2),

 System.Exception: Init: Execution failed: 

I am running on IIS(not IIS Express), so I am unable to see stderr/stdout output anywhere. Where I can find more details about the error? My config is

{"debug_level":"info","debug_write_input_image_enabled":false,"debug_internal_data_path":".","num_threads":-1,"gpgpu_enabled":true,"gpgpu_workload_balancing_enabled":false,"segmenter_accuracy":"high","interpolation":"bilinear","min_num_lines":2,"roi":[0,0,0,0],"min_score":0,"assets_folder":"MyAssetsFolder\\MrzAssets","license_token_data":"MyLiceance"}

Note the application was working before the updated dll. The console application on the same server is working fine only the IIS app(64 bit app).

DoubangoTelecom commented 3 years ago

Try without "license_token_data" and see if it's working

imranbaloch commented 3 years ago

Yea working with * sign. Did updating the library on the same server impact license?

imranbaloch commented 3 years ago

On the same server running your sample yields,

***[COMPV ERROR]: function: "ultimateMrzSdk::UltMrzSdkEnginePrivate::updateLicen
seInfo()"
file: "source\ultimate_mrz_sdk_private_engine.cxx"
line: "444"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) -> Field [3]
***[COMPV ERROR]: function: "ultimateMrzSdk::UltMrzSdkEnginePrivate::init()"
file: "source\ultimate_mrz_sdk_private_engine.cxx"
line: "81"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) ->
***[COMPV ERROR]: function: "ultimateMrzSdk::UltMrzSdkEngine::init()"
file: "source\ultimate_mrz_sdk_public_engine.cxx"
line: "133"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) -> Failed to initial
ize the engine
Init: Execution failed:

Unhandled Exception: System.Exception: Init: Execution failed:
   at recognizer.Program.CheckResult(String functionName, UltMrzSdkResult result
)
   at recognizer.Program.Main(String[] args)
DoubangoTelecom commented 3 years ago

The license format changed months ago and we also updated it again today. To avoid having the same issue next months after update, use version 2.5.0 to generate a new runtime key. Share it with us and we'll replace the old license.

imranbaloch commented 3 years ago

Sorry, I don't get what you mean. Should I share the license key here or via email? Please let me know what should we do now because we are stuck after the update.

imranbaloch commented 3 years ago

I used your portal to generate the license key. I don't get use version 2.5.0 to generate a new runtime key?

DoubangoTelecom commented 3 years ago
DoubangoTelecom commented 3 years ago

I used your portal to generate the license key. I don't get use version 2.5.0 to generate a new runtime key?

If you use the portal the license won't be replaced, replacing requires admin rights.

imranbaloch commented 3 years ago

I downloaded the binaries and ran runtimeKey.bat in the same production server. I am getting the below error,

C:\binaries\windows\x86_64>runtimeKey.bat

C:\binaries\windows\x86_64>runtimeKey.exe     --json
true     --assets ../../../assets
*[COMPV INFO]: [UltMrzSdkEngine] Call: ultimateMrzSdk::UltMrzSdkEngine::init
*[COMPV INFO]: [UltMrzSdkEngine] jsonConfig: {"assets_folder": "../../../assets"
........
Error opening data file ../../../assets/models/mrz.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessda
ta" directory.
Failed loading language 'mrz'
Tesseract couldn't load any languages!
***[COMPV ERROR]: function: "ultimateLstm::UltLstmNetworkThreadData::UltLstmNetw
orkThreadData()"
file: "source\ultimate_lstm_network.cxx"
line: "70"
message: Operation Failed (COMPV_ERROR_CODE_E_THIRD_PARTY_LIB) -> Failed to init
ialize Tesseract
****[COMPV FATAL]: function: "ultimateLstm::UltLstmNetworkThreadData::UltLstmNet
workThreadData()"
file: "source\ultimate_lstm_network.cxx"
line: "70"
message: Assertion failed!
E
DoubangoTelecom commented 3 years ago

You need the models folder in the assets. The error means Tesseract file from the models folder is missing. Do a git clone instead of downloading a single folder

imranbaloch commented 3 years ago

yea right here is key,

{"runtimeKey":"AX+kOWEICwENBg4JCQD6DAhIYX9p5XY8NiEqbiAEWkJ+Y3NkKiNEZm4mNWc4JSMpB
E4xZH55eWhmIFhgaHhuZzwCdSMKGgiCIiIBAgkMRQ4BAQQLBw0KAAkBcVtAGjEBF2NuaUpjd21segxfQ
3ZpMw4dNCohOGoMcmcsOGUuOGAtZD8uajIkZC9/eGV7bl0pN2YkbDIlNz4vMzkkYDBpHiEgOjU7NXtsP
zU1PTUsOzE1Mz8sTU1wUnVqbTdjZTRsPTwhbT41OCgwZDtqIDRtaTYlMWYAcSozYmEyZThjAQgOBg=="
}
DoubangoTelecom commented 3 years ago

I got error: Bad Request {"message":"[organisations.model.js] [activate].processMasterData() : This license is tied to a server/hardware. We have detected you're using a virtual machine with no hardware information"} The new license manager is more restrictive and doesn't accept virtual machines (VMWare), the license is tied to a machine and using VM means you can run the image everywhere

imranbaloch commented 3 years ago

Yes, our environment is on Windows Server VMs (do you think these days people are using physical servers?). So, please suggest what can we do with these new updates?

DoubangoTelecom commented 3 years ago

Check the portal, it's the first entry (Sept 23)

imranbaloch commented 3 years ago

Great. I have tested its working now. Thanks for your support.

imranbaloch commented 3 years ago

Is there is way to stderr/stdout in web applications like IIS?