Page MenuHomePhabricator

Travis PNG looks different from vagrant png
Closed, ResolvedPublic

Description

The last mathoid build failed due to a difference in the PNG rendering between travis and vagrant (and my local win8 environment)

travis.png (48×327 px, 2 KB)

(travis rendering)
vagrant.png (48×327 px, 2 KB)

(vagrant rendering)
I used http://www.askapache.com/online-tools/base64-image-converter/ to display the encoded png data from
https://travis-ci.org/physikerwelt/mathoid-server/jobs/56371975

Event Timeline

Physikerwelt raised the priority of this task from to Needs Triage.
Physikerwelt updated the task description. (Show Details)
Physikerwelt added projects: Mathoid, Multimedia.

^^ I think the travis rendering looks better

Do you think I should try to use https://www.npmjs.com/package/png-diff for the png comparision?

That looks like a good option (if we do not supply it an output stream that writes to a file).

I ran the tests locally, and they fail for me (in the sense that the PNGs' texts differ). However, the svg components of the response match. Perhaps it would be acceptable to compare only those and make sure the png component is a non-empty string?

On second thought, I wonder if png-diff would help at all -- the figures in the description are clearly different, so png-diff is bound to give us a mismatch.

Update: when running the tests inside a container, all of the tests pass. Both my host and the container are on Ubunty Trusty, but from the more visible differences, I'm using the Oracle JRE, while the container installs the OpenJDK one.

@mobrovac: Can you fix the travis config?
This should be an open question. So if you have no idea on how to fix that, that would also be an interesting information.

If a solution for T78579 was found, the problem might be resolved automatically.

@Physikerwelt a PR proposing disabling exact PNG checks can be found here.

Physikerwelt raised the priority of this task from Low to Needs Triage.Apr 6 2016, 4:25 PM
Physikerwelt added a project: SRE.

I think we should reclassify the importance o this bug for two reasons.

  1. The problem is also preverlent in production (https://en.wikipedia.org/api/rest_v1/media/math/render/png/ed35a9e1b18047599437224378bcf37e505d5aa3)
  2. The png image generated by vagrant and in production looks even worse now (click on the link above)

See https://github.com/wikimedia/MathJax-node/pull/18 for more details

Physikerwelt claimed this task.