question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Docker to test android's video functionality does not work

See original GitHub issue

Hi.

Sitespeed can open the browser normally, but the video can not be working.

run:

sudo docker run --privileged --shm-size=1g -v /dev/bus/usb:/dev/bus/usb -e START_ADB_SERVER=true --rm -v "$(pwd)":/sitespeed.io -v /etc/localtime:/etc/localtime:ro sitespeedio/sitespeed.io --browsertime.xvfb false --browsertime.chrome.android.package com.android.chrome https://www.sitespeed.io

output:

Google Chrome 62.0.3202.94 
Mozilla Firefox 54.0.1
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
FFK0217621000113	device

[2017-11-27 18:57:16] INFO: Versions OS: linux 4.10.0-38-generic nodejs: v8.9.1 sitespeed.io: 6.0.0 browsertime: 2.0.0 coach: 1.1.0
[2017-11-27 18:57:17] INFO: Starting chrome for analysing https://www.sitespeed.io 3 time(s)
[2017-11-27 18:57:17] INFO: Testing url https://www.sitespeed.io run 1
[2017-11-27 18:57:20] INFO: Start screenrecord on device FFK0217621000113
[2017-11-27 18:57:56] INFO: Finished transfering the video from mobile to your server
[2017-11-27 18:57:56] INFO: Converting video to 30 fps
(node:53) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Command failed: ffmpeg -i /sitespeed.io/sitespeed-result/www.sitespeed.io/2017-11-27-18-57-16/pages/www.sitespeed.io/data/video/0.mp4 -r 30 /sitespeed.io/sitespeed-result/www.sitespeed.io/2017-11-27-18-57-16/pages/www.sitespeed.io/data/video/tmp.mp4
ffmpeg version 3.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.4.0 (Debian 6.4.0-7) 20170920
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5330e80] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5330e80] moov atom not found
/sitespeed.io/sitespeed-result/www.sitespeed.io/2017-11-27-18-57-16/pages/www.sitespeed.io/data/video/0.mp4: Invalid data found when processing input

(node:53) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[2017-11-27 18:57:57] ERROR: FailError: Failure: 'open failed: No such file or directory'
    at /usr/src/app/node_modules/adbkit/lib/adb/sync.js:289:33
    at tryCatcher (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:503:31)
    at Promise._settlePromiseAt (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:577:18)
    at Promise._settlePromises (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:693:14)
    at Async._drainQueue (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:15:14)
From previous event:
    at /usr/src/app/node_modules/browsertime/lib/support/video/scripts/stopVideoAndroid.js:30:22
    at tryCatcher (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:503:31)
    at Promise._settlePromiseAt (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:577:18)
    at Promise._settlePromises (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:693:14)
    at Async._drainQueue (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
    at PullTransfer.Readable.on (_stream_readable.js:772:35)
    at /usr/src/app/node_modules/browsertime/lib/support/video/scripts/stopVideoAndroid.js:42:26
    at /usr/src/app/node_modules/browsertime/lib/support/video/scripts/stopVideoAndroid.js:30:22
    at tryCatcher (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:503:31)
    at Promise._settlePromiseAt (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:577:18)
    at Promise._settlePromises (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:693:14)
    at Async._drainQueue (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/src/app/node_modules/adbkit/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
[2017-11-27 18:57:58] INFO: HTML stored in /sitespeed.io/sitespeed-result/www.sitespeed.io/2017-11-27-18-57-16
[2017-11-27 18:57:58] INFO: Finished analysing https://www.sitespeed.io

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
soulgalorecommented, Nov 29, 2017

Hey @Nuoky ok so the exact same as before, but in the last example, you see that you get the video on the phone right but it seems that it isn’t moved to your computer? I need to go through the code again.

Best Peter

0reactions
soulgalorecommented, Jun 15, 2018

Please retest this with 7.x, I’ve been using Moto G5 and it works fine for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run your Appium tests using Docker-Android by Sargis ...
In this high technology times, it is really hard to catch up with everything. Especially for the mobile world when there are thousands...
Read more >
Running Android Tests in Docker - Coveros
As part of the project I'm currently engaged on, my team is writing automated tests for an application which has a web interface, ......
Read more >
GitHub - budtmo/docker-android
Android in docker solution with noVNC supported and video recording - GitHub ... Run UI tests for Android applications with different frameworks (appium, ......
Read more >
Super fast and parallelized Android UITest(Appium ...
Benefits of using Docker-Android. Finally, we created a test automation environment which can run Appium/Android tests with multiple emulators.
Read more >
Execute Android Appium Tests in Docker Containers Using ...
Learn how to execute Android Appium tests in Docker containers using Selenoid + performing mobile web tests in Chrome.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found