Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting files throw error : failed second stage validation! #22

Closed
HenriChabert opened this issue Nov 16, 2022 · 6 comments
Closed
Assignees
Labels
Bug Something isn't working

Comments

@HenriChabert
Copy link
Contributor

Hello !
I have just installed HRConvert2 to be hosted on my VM, and I cannot use it to convert the files as I have the following error that is brought to me when trying to convert a file:

ERROR!!! November 16, 2022, 11:13 am Henri Convert-14002: The file /var/www/html/HRProprietary/HRConvert2/DATA/b1c5ad040c1c/adb7e0e161a2/my-file.txt failed second stage validation!

After looking in the docker container, it seems that the file to be verified is not the one with .txt extension as it does not exist yet, but the one with the original extension (Here it was .pdf).

Have I missed anything to make convert work?

Thanks a lot for the tool !

@zelon88
Copy link
Owner

zelon88 commented Nov 17, 2022

Hi there! Sorry to hear you're having trouble.

Can you please tell me the version of the application you are running? This information can be found in the versionInfo.php file located in the installation directory. Also could you please send me the 5 or so lines of log entries above this one? You can redact the time, filename, and seshash directories of the path but please leave the file extensions.

If you're feeling brave and this is a private install (not public facing) and you can limit outside access for testing...

You can search the convertCore.php file located in the installation directory for errorEntry('The file '.$Pathname.' failed second stage validation!', 14002, TRUE); and replace it with errorEntry('The file '.$Pathname.' failed second stage validation!', 14002, FALSE); and then try your conversion again. Doing this will allow HRConvert2 to continue after encountering this error. Your conversion will probably still fail, but we will get some interesting logs out of it that will help with diagnosing this.

@zelon88
Copy link
Owner

zelon88 commented Nov 17, 2022

After carefully reviewing the log entry you already shared, I realized that your log entry doesn't have a session identifier. I think you might be running something other than the latest version of HRConvert2. The version can be found in the versionInfo.php file located in the installation directory.

The current version is v2.9.5 but I'll probably have v2.9.6 done tomorrow. One of the things being addressed is that the docs for this error (14002) and a couple others are inaccurate in stating this error is non-fatal. Still, v2.9.5 seems to work for me at least most of the time.

I recommend you backup your installation directory, especially the config.php file and then update HRConvert2 to the current v2.9.5 before troubleshooting your version further.

@HenriChabert
Copy link
Contributor Author

Hello and thanks for your answers!

I was indeed in version 2.9.2 as I was using the Docker image that itself uses the releases on the project. I just tried changing it to master but I still have the same problem, here are the logs that I get:

Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Verified inbound connection.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Verified globals.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Verified required directories.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Cleaned temporary location.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Cleaned convert location.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Could not verify tokens!
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Verified color scheme.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Verified language.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/f5ad64e98703: Displaying the GUI.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Verified inbound connection.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Verified globals.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Created a directory at /home/converter/a90b82c9243c/52027d28ddcf/.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Created a directory at /var/www/html/HRProprietary/HRConvert2/DATA/a90b82c9243c/52027d28ddcf/.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Verified required directories.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Cleaned temporary location.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Cleaned convert location.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Verified tokens.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Verified color scheme.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Verified language.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Displaying the GUI.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Initiating Uploader.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: User selected to Upload file test.pdf.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Uploaded file test.pdf to /home/converter/a90b82c9243c/52027d28ddcf/test.pdf.
Op-Act, November 17, 2022, 9:59 am, a90b82c9243c/52027d28ddcf: Upload Complete.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified inbound connection.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified globals.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified required directories.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Cleaned temporary location.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Cleaned convert location.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified tokens.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified color scheme.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified language.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Displaying the GUI.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified inbound connection.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified globals.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified required directories.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Cleaned temporary location.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Cleaned convert location.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified tokens.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified color scheme.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified language.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Skipping display GUI procedure.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Initiating Converter.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: User selected to perform OCR on file test.pdf.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Copying file test.pdf to /var/www/html/HRProprietary/HRConvert2/DATA/a90b82c9243c/52027d28ddcf/test.pdf.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Copied file test.pdf.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified file /home/converter/a90b82c9243c/52027d28ddcf/test.txt.
ERROR!!! November 17, 2022, 10:00 am, Henri Convert-22, a90b82c9243c/52027d28ddcf: OCR Operation Failed!
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified inbound connection.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified globals.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified required directories.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Cleaned temporary location.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Cleaned convert location.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified tokens.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified color scheme.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Verified language.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Skipping display GUI procedure.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: Initiating Downloader.
Op-Act, November 17, 2022, 10:00 am, a90b82c9243c/52027d28ddcf: User selected to Download file test.txt.
ERROR!!! November 17, 2022, 10:00 am, Henri Convert-14002, a90b82c9243c/52027d28ddcf: The file /var/www/html/HRProprietary/HRConvert2/DATA/a90b82c9243c/52027d28ddcf/test.txt failed second stage validation!

Here, the file is test.pdf and I tried to convert it into .txt..
I have verified that I am using the version 2.9.5 of HRConvert2.

Thanks for your help, do not hesitate if you need me to investigate any further. Fyi, my system is a Debian GNU/Linux 11.0 and I am launching HRConvert through the Docker image proposed here: https://github.com/dwaaan/HRConvert2-Docker

@HenriChabert
Copy link
Contributor Author

I also tried to set this error as non blocking as you suggested, but as expected, convert fails with these two log lines:

ERROR!!! November 17, 2022, 10:06 am, Henri Convert-3002, a90b82c9243c/52027d28ddcf: File test.txt does not exist!
ERROR!!! November 17, 2022, 10:06 am, Henri Convert-19, a90b82c9243c/52027d28ddcf: Download Failed!

And actually, I feel that makes sense because the file that is copied to the new temp folder is the original file, before it is converted. Thus, although the file test.txt does not exist, it is the file test.pdf that is in this folder, so it seems the extension to test is not the right one or the file is somehow not converted with the right extension.

See on the bottom the content of the file HRProprietary/HRConvert2/DATA/a90b82c9243c/52027d28ddcf.
image

@HenriChabert
Copy link
Contributor Author

HenriChabert commented Nov 20, 2022

Hi @zelon88,

So after a little bit more of investigation, I found out two things that made my file failing:

About the last one, I have a question, where is the variable $VideoArray initialized line 370 used? Can't we use this one for the conversion instead of $videoarray initialized line 1133?

@zelon88 zelon88 added the Bug Something isn't working label Jan 10, 2023
@zelon88 zelon88 self-assigned this Jan 10, 2023
@zelon88
Copy link
Owner

zelon88 commented Jan 10, 2023

Thanks for taking the time to support the project!

I've recently merged these and will get back to you in a future version about your last question.

@zelon88 zelon88 closed this as completed Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants