<p>If you are using the recommended setting for R packages of upgrading warnings to errors, i.e. with this line in <code>.travis.yml</code>:</p>

<pre><code>warnings_are_errors: true
</code></pre>

<p>then the place to look is the previous heading in the Travis log, called <code>Checking package</code>.</p>

<h3>Example of problem with missing font</h3>

<p>In my case, the Travis log under the heading <code>Checking package</code> showed that the
<code>inconsolata</code> font was missing, so the vignettes failed to build:</p>

<pre><code>* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! LaTeX Error: File `inconsolata.sty' not found.
Type X to quit or &lt;RETURN&gt; to proceed,
or enter new name. (Default extension: sty)
! Emergency stop.
&lt;read *&gt; 

l.276 ^^M

!  ==&gt; Fatal error occurred, no output PDF file produced!
* checking PDF version of manual without hyperrefs or index ... ERROR
* DONE
Status: 1 ERROR, 1 WARNING
</code></pre>

<p>This caused an error for LaTeX, a warning for R, and an error for Travis.</p>

<h3>Solution to problem</h3>

<p>In my case, the problem was due to Travis using TeXLive 2019 and the CTAN
mirrors having yet to update to 2019.</p>

<p>The issue appears in the <a href="https://travis-ci.community/t/latex-error-file-inconsolata-sty-not-found-only-on-osx-when-building-r-package/3261" rel="nofollow noreferrer">Travis R community forum</a>:</p>

<blockquote>
  <p>might be related to the recent switch to TexLive-2019 as the LaTeX package manager seems to fail finding inconsolata in the repository.</p>
  
  <p>...</p>
  
  <p>It looks to me like the mirror chosen was has not updated to 2019, so I think this will resolve itself naturally when the mirrors catch up. If not I can look into it.</p>
</blockquote>

<p>In the meantime, I solved it by forcing a previous version of TeXLive with a downgrade to OSX 10.12 in <code>.travis.yml</code>:</p>

<pre><code># macOS 10.12 version
osx_image: xcode9.2
</code></pre>

<p>See <a href="https://docs.travis-ci.com/user/reference/osx#macos-version" rel="nofollow noreferrer">this Travis
page</a> for the
correspondence between XCode and OSX versions and <a href="https://devops.stackexchange.com/questions/8012/testing-r-package-on-travis-fails-because-of-texlive-incompatible-versions/8013#8013">the original thread in DevOps
StackExchange</a>.</p>

CC BY-SA 4.0
2019-05-03T14:19:43.767Z
2019-05-03T14:19:43.767Z
emonigma
<p>I am writing <a href="https://github.com/alan-turing-institute/PosteriorBootstrap" rel="nofollow noreferrer">an R
package</a> and using
Travis for Continuous Integration. Tests and <code>R CMD CHECK</code> pass locally and for
3 versions of R under Linux (oldrel, release, and devel). All three versions
fail under macOS with no information in the Travis logs:</p>

<pre><code>...
R CMD check fail logs
0.01s$ for name in $(find "${RCHECK_DIR}" -type f -name "*fail");do echo "&gt;&gt;&gt; Filename: ${name} &lt;&lt;&lt;";cat ${name};done
log
R CMD check log logs
...
</code></pre>

<p>I checked in the Travis logs that all the tests I wrote in <code>testthat</code> fail. The Travis tests once passed for both Linux and macOS, so I could dissect the code changes to detect the issue, but ideally I could use something more direct and faster than groping in the dark waiting for an answer from Travis.</p>

<p>Any ideas?</p>

<travis-ci>
Travis tests for R package fail with little explanation
emonigma
# Travis tests for R package fail with little explanation

(Asked by: username_0 on 2019-05-03)

I am writing an R
package and using
Travis for Continuous Integration. Tests and R CMD CHECK pass locally and for
3 versions of R under Linux (oldrel, release, and devel). All three versions
fail under macOS with no information in the Travis logs:
...
R CMD check fail logs
0.01s$ for name in $(find "${RCHECK_DIR}" -type f -name "*fail");do echo ">>> Filename: ${name} <<<";cat ${name};done
log
R CMD check log logs
...

I checked in the Travis logs that all the tests I wrote in testthat fail. The Travis tests once passed for both Linux and macOS, so I could dissect the code changes to detect the issue, but ideally I could use something more direct and faster than groping in the dark waiting for an answer from Travis.
Any ideas?

**Tags:** travis-ci


---

## 1 answers

### Answer by username_0 on 2019-05-03. Score: 1

If you are using the recommended setting for R packages of upgrading warnings to errors, i.e. with this line in .travis.yml:
warnings_are_errors: true

then the place to look is the previous heading in the Travis log, called Checking package.
Example of problem with missing font
In my case, the Travis log under the heading Checking package showed that the
inconsolata font was missing, so the vignettes failed to build:
* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! LaTeX Error: File `inconsolata.sty' not found.
Type X to quit or  to proceed,
or enter new name. (Default extension: sty)
! Emergency stop.
 

l.276 ^^M

!  ==> Fatal error occurred, no output PDF file produced!
* checking PDF version of manual without hyperrefs or index ... ERROR
* DONE
Status: 1 ERROR, 1 WARNING

This caused an error for LaTeX, a warning for R, and an error for Travis.
Solution to problem
In my case, the problem was due to Travis using TeXLive 2019 and the CTAN
mirrors having yet to update to 2019.
The issue appears in the Travis R community forum:

might be related to the recent switch to TexLive-2019 as the LaTeX package manager seems to fail finding inconsolata in the repository.
...
It looks to me like the mirror chosen was has not updated to 2019, so I think this will resolve itself naturally when the mirrors catch up. If not I can look into it.

In the meantime, I solved it by forcing a previous version of TeXLive with a downgrade to OSX 10.12 in .travis.yml:
# macOS 10.12 version
osx_image: xcode9.2

See this Travis
page for the
correspondence between XCode and OSX versions and the original thread in DevOps
StackExchange.


---

