Missing diagnostics on permission problems
Consider the following run, which roughly simulates a system where sitespeed.io was upgraded from pre-v11.0.0 to v11.0.00 or later:
$ mkdir sitespeed; docker run --rm -v $(pwd)/sitespeed:/sitespeed.io sitespeedio/sitespeed.io:10.3.2 --browsertime.iterations 1 -b chrome https://www.sitespeed.io/
Google Chrome 77.0.3865.75
Mozilla Firefox 69.0
[2020-01-17 13:20:25] INFO: Versions OS: linux 4.4.0-21-generic nodejs: v10.16.0 sitespeed.io: 10.3.2 browsertime: 6.1.4 coach: 4.1.0
[2020-01-17 13:20:25] INFO: Running tests using Chrome - 1 iteration(s)
[2020-01-17 13:20:27] INFO: Testing url https://www.sitespeed.io/ iteration 1
[2020-01-17 13:20:38] INFO: https://www.sitespeed.io/ 13 requests, backEndTime: 194ms, firstPaint: 286ms, firstVisualChange: 300ms, DOMContentLoaded: 276ms, Load: 297ms, speedIndex: 306, visualComplete85: 334ms, lastVisualChange: 334ms, rumSpeedIndex: 286
[2020-01-17 13:20:39] INFO: HTML stored in /sitespeed.io/sitespeed-result/www.sitespeed.io/2020-01-17-13-20-25
$ docker run --rm -v $(pwd)/sitespeed:/sitespeed.io sitespeedio/sitespeed.io:11.0.0 --browsertime.iterations 1 -b chrome https://www.sitespeed.io/
Google Chrome 78.0.3904.87
Mozilla Firefox 70.0
... with no further output, and exit code is 1. With more research (strace logging...) it seems that the sitespeed run fails because of permission problems, and needs to be fixed by changing the ownership of sitespeed-result:
$ sudo chown -R $(stat --format=%u sitespeed):$(stat --format=%g sitespeed) sitespeed/sitespeed-result
It would be nice if sitespeed would not die silently in this situation, but clearly say that it could not create files/directories, with the filenames and the reason.
Hi @eserte there was a fix some time ago to avoid using root inside the container and to pickup the current user see https://github.com/sitespeedio/sitespeed.io/pull/2710 and https://github.com/sitespeedio/sitespeed.io/issues/1459 - I guess that's where something goes wrong?
Just so I understand: You run twice as the same user, but the second time you get the failure? Thinking on how I can reproduce.
Yes, I know about the user changes. I am just complaining about the missing error messages.
For reproducing: just execute the two commands in the first code block.
You mean:
mkdir sitespeed; docker run --rm -v $(pwd)/sitespeed:/sitespeed.io sitespeedio/sitespeed.io:10.3.2 --browsertime.iterations 1 -b chrome https://www.sitespeed.io/
docker run --rm -v $(pwd)/sitespeed:/sitespeed.io sitespeedio/sitespeed.io:11.0.0 --browsertime.iterations 1 -b chrome https://www.sitespeed.io/
That works for me on OS X. What OS are you using, see if I can reproduce?
Linux Mint18, which is roughly a Ubuntu 16.04.