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

DeadObjectException, emulator crashes and cant complete screengrab #8139

Closed
vongohren opened this Issue Feb 6, 2017 · 9 comments

Comments

Projects
None yet
5 participants
@vongohren

vongohren commented Feb 6, 2017

New Issue Checklist

Issue Description

I keep getting this error when I run screengrab. First I thought it was something with my project, but then I ran your example, as shown below, and it still fails. My emulator freezes and I have to restart it to make it work again.

tools.fastlane.localetester.test/android.support.test.runner.AndroidJUnitRunner
[14:38:37]: ▸ tools.fastlane.localetester.JUnit4StyleTests:INSTRUMENTATION_ABORTED: System has crashed.
[14:38:37]: ▸ android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died

Any idea how to debug/locate this error?

Complete output when running fastlane, including the stack trace and command used

You can use: --capture_output as the last commandline argument to get that collected for you

/Library/Ruby/Gems/2.0.0/gems/screengrab-1.0.0/lib/screengrab/version.rb:26: warning: already initialized constant Screengrab::DESCRIPTION
/Library/Ruby/Gems/2.0.0/gems/fastlane-2.13.0/screengrab/lib/screengrab.rb:31: warning: previous definition of DESCRIPTION was here
[14:36:02]: Successfully loaded '/Users/snorreedwin/Code/fastlane/screengrab/example/fastlane/Screengrabfile' 📄

+----------------------------+-------------------------------------------------+
|               Detected Values from './fastlane/Screengrabfile'               |
+----------------------------+-------------------------------------------------+
| locales                    | ["en-US", "fr-FR", "ja-JP"]                     |
| clear_previous_screenshots | true                                            |
| tests_apk_path             | build/outputs/apk/example-debug-androidTest.apk |
| app_apk_path               | build/outputs/apk/example-debug.apk             |
+----------------------------+-------------------------------------------------+


+-----------------------------+-------------------------------------------------+
|                         Summary for screengrab 2.13.0                         |
+-----------------------------+-------------------------------------------------+
| locales                     | ["en-US", "fr-FR", "ja-JP"]                     |
| clear_previous_screenshots  | true                                            |
| tests_apk_path              | build/outputs/apk/example-debug-androidTest.apk |
| app_apk_path                | build/outputs/apk/example-debug.apk             |
| tests_package_name          | tools.fastlane.localetester.test                |
| android_home                | /Users/snorreedwin/Library/Android/sdk          |
| output_directory            | fastlane/metadata/android                       |
| skip_open_summary           | false                                           |
| app_package_name            | tools.fastlane.localetester                     |
| test_instrumentation_runner | android.support.test.runner.AndroidJUnitRunner  |
| ending_locale               | en-US                                           |
| device_type                 | phone                                           |
| exit_on_test_failure        | true                                            |
| reinstall_app               | false                                           |
+-----------------------------+-------------------------------------------------+

[14:36:02]: Limiting the test classes run by `screengrab` to just those that generate screenshots can make runs faster.
[14:36:02]: Consider using the :use_tests_in_classes or :use_tests_in_packages option, and organize your tests accordingly.
[14:36:02]: Clearing phoneScreenshots within fastlane/metadata/android
[14:36:02]: $ adb devices -l
[14:36:02]: ▸ List of devices attached
[14:36:02]: ▸ emulator-5554          device product:sdk_google_phone_x86_64 model:Android_SDK_built_for_x86_64 device:generic_x86_64
[14:36:02]: $ adb -s emulator-5554 shell echo \$EXTERNAL_STORAGE
[14:36:02]: ▸ /sdcard
[14:36:02]: Cleaning screenshots on device
[14:36:02]: Validating app APK
[14:36:02]: $ /Users/snorreedwin/Library/Android/sdk/build-tools/25.0.2/aapt dump permissions build/outputs/apk/example-debug.apk
[14:36:02]: ▸ package: tools.fastlane.localetester
[14:36:02]: ▸ uses-permission: name='android.permission.DISABLE_KEYGUARD'
[14:36:02]: ▸ uses-permission: name='android.permission.WAKE_LOCK'
[14:36:02]: ▸ uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
[14:36:02]: ▸ uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
[14:36:02]: ▸ uses-permission: name='android.permission.CHANGE_CONFIGURATION'
[14:36:02]: Installing app APK
[14:36:02]: $ adb -s emulator-5554 install -r build/outputs/apk/example-debug.apk
[14:36:02]: ▸ [100%] /data/local/tmp/example-debug.apk
[14:36:02]: ▸ pkg: /data/local/tmp/example-debug.apk
[14:36:03]: ▸ Success
[14:36:03]: Installing tests APK
[14:36:03]: $ adb -s emulator-5554 install -r build/outputs/apk/example-debug-androidTest.apk
[14:36:03]: ▸ [100%] /data/local/tmp/example-debug-androidTest.apk
[14:36:04]: ▸ pkg: /data/local/tmp/example-debug-androidTest.apk
[14:36:05]: ▸ Success
[14:36:05]: Granting the permission necessary to change locales on the device
[14:36:05]: $ adb -s emulator-5554 shell pm grant tools.fastlane.localetester android.permission.CHANGE_CONFIGURATION
[14:36:05]: $ adb -s emulator-5554 shell getprop ro.build.version.sdk
[14:36:05]: ▸ 23
[14:36:05]: Granting the permissions necessary to access device external storage
[14:36:05]: $ adb -s emulator-5554 shell pm grant tools.fastlane.localetester android.permission.WRITE_EXTERNAL_STORAGE
[14:36:06]: $ adb -s emulator-5554 shell pm grant tools.fastlane.localetester android.permission.READ_EXTERNAL_STORAGE
[14:36:06]: Running tests for locale: en-US
[14:36:06]: $ adb -s emulator-5554 shell am instrument --no-window-animation -w \
-e testLocale en_US \
-e endingLocale en_US \
tools.fastlane.localetester.test/android.support.test.runner.AndroidJUnitRunner
[14:38:37]: ▸ tools.fastlane.localetester.JUnit4StyleTests:INSTRUMENTATION_ABORTED: System has crashed.
[14:38:37]: ▸ android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
[14:38:37]: ▸ at android.os.BinderProxy.transactNative(Native Method)
[14:38:37]: ▸ at android.os.BinderProxy.transact(Binder.java:503)
[14:38:37]: ▸ at android.view.IWindowManager$Stub$Proxy.setAnimationScales(IWindowManager.java:1991)
[14:38:37]: ▸ at com.android.commands.am.Am.runInstrument(Am.java:1103)
[14:38:37]: ▸ at com.android.commands.am.Am.onRun(Am.java:371)
[14:38:37]: ▸ at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
[14:38:37]: ▸ at com.android.commands.am.Am.main(Am.java:100)
[14:38:37]: ▸ at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
[14:38:37]: ▸ at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:251)
[14:38:37]: Running tests for locale: fr-FR
[14:38:37]: $ adb -s emulator-5554 shell am instrument --no-window-animation -w \
-e testLocale fr_FR \
-e endingLocale en_US \
tools.fastlane.localetester.test/android.support.test.runner.AndroidJUnitRunner
[14:38:38]: ▸ android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
[14:38:38]: ▸ at android.os.BinderProxy.transactNative(Native Method)
[14:38:38]: ▸ at android.os.BinderProxy.transact(Binder.java:503)
[14:38:38]: ▸ at android.view.IWindowManager$Stub$Proxy.getAnimationScales(IWindowManager.java:1958)
[14:38:38]: ▸ at com.android.commands.am.Am.runInstrument(Am.java:1071)
[14:38:38]: ▸ at com.android.commands.am.Am.onRun(Am.java:371)
[14:38:38]: ▸ at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
[14:38:38]: ▸ at com.android.commands.am.Am.main(Am.java:100)
[14:38:38]: ▸ at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
[14:38:38]: ▸ at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:251)
[14:38:38]: Running tests for locale: ja-JP
[14:38:38]: $ adb -s emulator-5554 shell am instrument --no-window-animation -w \
-e testLocale ja_JP \
-e endingLocale en_US \
tools.fastlane.localetester.test/android.support.test.runner.AndroidJUnitRunner
[14:38:38]: ▸ Error type 2
[14:38:38]: ▸ android.util.AndroidException: Can't connect to activity manager; is the system running?
[14:38:38]: ▸ at com.android.commands.am.Am.onRun(Am.java:353)
[14:38:38]: ▸ at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
[14:38:38]: ▸ at com.android.commands.am.Am.main(Am.java:100)
[14:38:38]: ▸ at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
[14:38:38]: ▸ at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:251)
[14:38:38]: Pulling captured screenshots from the device
[14:38:38]: $ adb -s emulator-5554 pull /sdcard/tools.fastlane.localetester/screengrab /var/folders/wx/sxjm2ym97sd708nw3fqw41sxlq7p6h/T/d20170206-14644-1rlyuuw
[14:38:38]: Screenshots copied to fastlane/metadata/android/en-US/images/phoneScreenshots
[14:38:38]: Opening screenshots summary
[14:38:38]: $ open fastlane/metadata/android/*/images/phoneScreenshots/*.png
[14:38:39]: Captured 1 screenshots! 📷✨

Environment

Please run fastlane env and copy the output below. This will help us help you 👍
If you used --capture_output option please remove this block - as it is already included there.

🚫 fastlane environment 🚫

Stack

Key Value
OS 10.12.2
Ruby 2.0.0
Bundler? false
Git git version 2.10.1 (Apple Git-78)
Installation Source /usr/local/bin/fastlane
Host Mac OS X 10.12.2 (16C67)
Ruby Lib Dir /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
OpenSSL Version OpenSSL 0.9.8zc 19 Mar 2015
Is contained false
Is homebrew false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.2.1

System Locale

Error
No Locale with UTF8 found 🚫

fastlane files:

`./fastlane/Fastfile`
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command

# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`

# If you want to automatically update fastlane if a new version is available:
# update_fastlane

# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "1.46.1"

default_platform :android

platform :android do
  before_all do
    # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
  end

  desc "Runs all the tests"
  lane :test do
    gradle(task: "test")
  end

  desc "Submit a new Beta Build to Crashlytics Beta"
  lane :beta do
    gradle(task: "assembleRelease")
    crashlytics

    # sh "your_script.sh"
    # You can also use other beta testing services here
  end

  desc "Deploy a new version to the Google Play"
  lane :deploy do
    gradle(task: "assembleRelease")
    supply
  end

  desc "Assemble the debug app and tests APKs"
  lane :assemble do
    gradle(task: "assemble assembleAndroidTest", gradle_path: '../gradlew')
  end

  # You can define as many lanes as you want

  after_all do |lane|
    # This block is called, only if the executed lane was successful

    # slack(
    #   message: "Successfully deployed new App Update."
    # )
  end

  error do |lane, exception|
    # slack(
    #   message: exception.message,
    #   success: false
    # )
  end
end

# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://docs.fastlane.tools/actions

# fastlane reports which actions are used
# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer
`./fastlane/Appfile`
package_name "tools.fastlane.localetester"

fastlane gems

Gem Version Update-Status
fastlane 2.14.2 Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-ruby undefined 💥 Check failed
fastlane-plugin-clubmate undefined 💥 Check failed
fastlane-plugin-sharethemeal undefined 💥 Check failed
Loaded gems
Gem Version
slack-notifier 1.5.1
thread_safe 0.3.5
tzinfo 1.2.2
minitest 5.10.1
activesupport 4.2.7.1
claide 1.0.1
colored 1.2
nanaimo 0.2.3
xcodeproj 1.4.2
rouge 1.11.1
xcpretty 0.2.4
terminal-notifier 1.7.1
unicode-display_width 1.1.3
terminal-table 1.7.3
plist 3.2.0
public_suffix 2.0.5
addressable 2.5.0
multipart-post 2.0.0
word_wrap 1.0.0
babosa 1.0.2
highline 1.7.8
commander 4.4.3
excon 0.54.0
faraday 0.11.0
unf_ext 0.0.7.2
unf 0.1.4
domain_name 0.5.20161129
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.0.1
gh_inspector 1.0.3
mini_magick 4.5.1
multi_json 1.12.1
multi_xml 0.6.0
rubyzip 1.2.0
security 0.1.3
xcpretty-travis-formatter 0.0.4
bundler 1.13.7
json 1.8.6
rdoc 4.0.0
i18n 0.8.0
CFPropertyList 2.3.5
uber 0.0.15
representable 2.3.0
retriable 2.1.0
mime-types-data 3.2016.0521
mime-types 3.1
hurley 0.2
little-plugger 1.1.4
logging 2.1.0
jwt 1.5.6
memoist 0.15.0
os 0.9.6
signet 0.7.3
googleauth 0.5.1
google-api-client 0.9.26
httpclient 2.8.3
dotenv 2.2.0
faraday_middleware 0.11.0.1
psych 2.0.0

generated on: 2017-02-06

@rmsm

This comment has been minimized.

rmsm commented Feb 15, 2017

I have the same problem running on API 23 emulators.

Only works if I remove Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());, but then the screnshots don't turn out as expected as the status bar + material UI becomes blank.

Running on older API emulators also works, but then the status bar is black instead of tinted.

@vongohren

This comment has been minimized.

vongohren commented Feb 27, 2017

Anyone in the fastlane team to be able to answere this? @KrauseFx, @mfurtak, @asfalcone

@mfurtak

This comment has been minimized.

Contributor

mfurtak commented Feb 27, 2017

Sorry for the trouble! I am not currently able to explain it. I'll have to leave this open until I have time to investigate.

@vongohren

This comment has been minimized.

vongohren commented Feb 27, 2017

No worries, I just wanted this issue to get noticed

@fastlane-bot

This comment has been minimized.

fastlane-bot commented Apr 28, 2017

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@vongohren

This comment has been minimized.

vongohren commented Apr 28, 2017

Not have had time to investigate @mfurtak?

@mfurtak

This comment has been minimized.

Contributor

mfurtak commented Apr 28, 2017

No, I haven't. I'm sorry. I'd love some help from the community on this one, so I'll mark it as such!

@fastlane-bot

This comment has been minimized.

fastlane-bot commented Aug 14, 2017

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@fastlane-bot

This comment has been minimized.

fastlane-bot commented Aug 23, 2017

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@fastlane fastlane locked and limited conversation to collaborators Oct 22, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.