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

Latest release 22.03 fails #234

Closed
cpholguera opened this issue Mar 25, 2022 · 14 comments
Closed

Latest release 22.03 fails #234

cpholguera opened this issue Mar 25, 2022 · 14 comments
Assignees
Labels
Milestone

Comments

@cpholguera
Copy link

Hi @daamien,

the latest release has unfortunately broken our document generation pipeline. We were using "stable" until now and I've tested it now with 22.01 and it works as expected. Since we didn't introduce any changes I assume that something should be wrong in pandocker itself.

Here's the PR I'm using for testing, it includes all the info and links to the failing run and the successful run.

OWASP/owasp-mastg#2092

If you have any suggestions or idea why it's failing please let me know and I'll try it. Before doing a regression in our pipeline I wanted to check it with you first.

Thanks a lot in advance!

@daamien
Copy link
Member

daamien commented Mar 25, 2022

Thanks for the report, I'll look into it

Sorry for the inconvinience

You can temporarly switch back to the 21.02 tag and your pipeline should work as previously

@daamien daamien self-assigned this Mar 25, 2022
@daamien daamien added the bug label Mar 25, 2022
@daamien daamien added this to the 22.06 milestone Mar 25, 2022
@daamien
Copy link
Member

daamien commented Mar 25, 2022

This is related to the latex underscore package which breaks the build process when an image filename contains an underscore

@cpholguera
Copy link
Author

Hi @daamien, now the issue is in the MASVS repo as well (we didn't try this when I posted the issue, so it is not really new).

Every language seems to work but the farsi version fails. This is the error:

 Digest: sha256:dbb3c52f69b1abe2837a5ae99f250923868fca66707fc5e595ea83fafbbc8ae5
Status: Downloaded newer image for dalibo/pandocker:stable-full
Error producing PDF.
! Undefined control sequence.
<argument> \textormath 
                       {\nobreak \discretionary {-}{}{\kern .03em}\ifvmode \...
l.208 انقلاب‌
Error: Process completed with exit code 43.

@daamien
Copy link
Member

daamien commented Oct 20, 2022

Hi @cpholguera

I'm currently working on upgrading the entire toolchain and I just a produced a new image based on ubuntu, Pandoc 2.19 and TexLive 2022... This is a huge leap forward and I have good hopes it will solve the problems we had with the underscore package and other languages

Can you try to use temporarly the latest-ubuntu-full tag and let me know if it works ?

@cpholguera
Copy link
Author

I will, thank you very much @daamien!

@cpholguera
Copy link
Author

@daamien Unfortunately I'm getting the following error:

Status: Downloaded newer image for dalibo/pandocker:latest-ubuntu-full
Error producing PDF.
! LaTeX Error: File `sectsty.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.135 \sectionfont

@daamien
Copy link
Member

daamien commented Oct 22, 2022

@cpholguera

I added missing packages and got it working with

docker pull dalibo/pandocker:latest-ubuntu
TAG=latest-ubuntu ./tools/docker/pandoc_makedocs.sh Document

except for the emojis but that's another story :)

@daamien daamien closed this as completed Oct 22, 2022
@daamien daamien reopened this Oct 22, 2022
@cpholguera
Copy link
Author

Hi @daamien is it also working with the full version? For me it's still failing in the MASVS repo unfortunately

@cpholguera
Copy link
Author

See here

https://github.com/OWASP/owasp-masvs/actions/runs/3292973571/jobs/5448903701


Digest: sha256:9e9af14dc29f5d72ae5b1396a2ba626efcf03677e53e27e32d20a4f81427b210
146
Status: Downloaded newer image for dalibo/pandocker:latest-ubuntu-full
147
Error producing PDF.
148
! LaTeX Error: File `sectsty.sty' not found.
149

150
Type X to quit or <RETURN> to proceed,
151
or enter new name. (Default extension: sty)
152

153
Enter file name: 
154
! Emergency stop.
155
<read *> 
156
         
157
l.95 \sectionfont
158

159
Error: Process completed with exit code 43.

@daamien
Copy link
Member

daamien commented Oct 22, 2022

Sorry I forgot to update latest-ubuntu-full

It's done now

@cpholguera
Copy link
Author

Thank you @daamien, unfortunately there's still an error, but a different one:

Digest: sha256:30e67e02b345e1fe6becacc43532bb38fc8fbf6de954108def6555893ac42443
Status: Downloaded newer image for dalibo/pandocker:latest-ubuntu-full
Error producing PDF.
! LaTeX Error: Environment RTL undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.198 \begin{RTL}

Error: Process completed with exit code 43.

@daamien
Copy link
Member

daamien commented Nov 28, 2022

Hi @cpholguera

I took some time to investigate and it looks like it's a bug in the default latex template delivered with pandoc.

I have opened a ticket on the pandoc project to check it out:
jgm/pandoc#8460

In the meantime, here's a quick workaround:

  • Edit the tools\docker\latex-header.tex file:

https://github.com/OWASP/owasp-masvs/blob/master/tools/docker/latex-header.tex

  • Add the following lines at the end
%% Workaround for pandoc bug #8460
%% https://github.com/jgm/pandoc/issues/8460
\newenvironment{RTL}{\beginR}{\endR}

@cpholguera
Copy link
Author

Thanks a lot for checking @daamien, I'll try that out!

@cpholguera
Copy link
Author

It works, thanks again @daamien!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants