Skip to content
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

Error when screengrab is made in a Material Dialog #2078

Closed
fastlanebot opened this issue Feb 26, 2016 · 10 comments
Closed

Error when screengrab is made in a Material Dialog #2078

fastlanebot opened this issue Feb 26, 2016 · 10 comments

Comments

@fastlanebot
Copy link

Original issue by @digobaptista - Imported from fastlane/screengrab#82

I am having an issue screen grabbing when a Material Dialog (https://github.com/afollestad/material-dialogs) is shown. Here is the detailed log:

[17:04:16]: ▸ com.xxx.xxx.Test:..
[17:04:16]: ▸ Error in shouldXXX(com.xxx.xxx.Test):
[17:04:16]: ▸ java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity
[17:04:16]: ▸ at tools.fastlane.screengrab.Screengrab$1.perform(Screengrab.java:77)
[17:04:16]: ▸ at android.support.test.espresso.ViewInteraction$1.run(ViewInteraction.java:144)
[17:04:16]: ▸ at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
[17:04:16]: ▸ at java.util.concurrent.FutureTask.run(FutureTask.java:237)
[17:04:16]: ▸ at android.os.Handler.handleCallback(Handler.java:739)
[17:04:16]: ▸ at android.os.Handler.dispatchMessage(Handler.java:95)
[17:04:16]: ▸ at android.os.Looper.loop(Looper.java:135)
[17:04:16]: ▸ at android.app.ActivityThread.main(ActivityThread.java:5254)
[17:04:16]: ▸ at java.lang.reflect.Method.invoke(Native Method)
[17:04:16]: ▸ at java.lang.reflect.Method.invoke(Method.java:372)
[17:04:16]: ▸ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[17:04:16]: ▸ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[17:04:26]: ▸ .
[17:04:26]: ▸ Time: 39.824
[17:04:26]: ▸ There was 1 failure:
[17:04:26]: ▸ 1) shouldTakeScreenshotInputDestination(com.xxx.xxx.Test)
[17:04:26]: ▸ java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity
[17:04:26]: ▸ at tools.fastlane.screengrab.Screengrab$1.perform(Screengrab.java:77)
[17:04:26]: ▸ at android.support.test.espresso.ViewInteraction$1.run(ViewInteraction.java:144)
[17:04:26]: ▸ at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
[17:04:26]: ▸ at java.util.concurrent.FutureTask.run(FutureTask.java:237)
[17:04:26]: ▸ at android.os.Handler.handleCallback(Handler.java:739)
[17:04:26]: ▸ at android.os.Handler.dispatchMessage(Handler.java:95)
[17:04:26]: ▸ at android.os.Looper.loop(Looper.java:135)
[17:04:26]: ▸ at android.app.ActivityThread.main(ActivityThread.java:5254)
[17:04:26]: ▸ at java.lang.reflect.Method.invoke(Native Method)
[17:04:26]: ▸ at java.lang.reflect.Method.invoke(Method.java:372)
[17:04:26]: ▸ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[17:04:26]: ▸ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[17:04:26]: ▸ FAILURES!!!
[17:04:26]: ▸ Tests run: 4,  Failures: 1
@fastlanebot
Copy link
Author

@mfurtak commented

Hi @digobaptista - Thanks for the report 👍

We actually just did a screengrab release 📷✨ yesterday which might have a fix for your problem. If you aren't already on v0.2.1 of the gem and the Android library, can you update those and let me know what you see?

@fastlanebot
Copy link
Author

@digobaptista commented

@mfurtak This issue was reproduced with screengrab version 0.2.1 . Any idea why this is happening?

@fastlanebot
Copy link
Author

@mfurtak commented

@digobaptista Hm, can you post a new stack trace from Android? Is it the same as before?

In addition to updating the gem, did you also update the dependency in your build.gradle?

androidTestCompile 'tools.fastlane:screengrab:0.2.1'

@fastlanebot
Copy link
Author

@digobaptista commented

@mfurtak After updating the dependency in my build.gradle the error is gone, but whenever I do a screengrab from a Material Dialog, it generates a png containing the view behind the Material Dialog.

@fastlanebot
Copy link
Author

@mfurtak commented

OK, I suspect that this is a limitation of how we capture screenshots right now. #72 and #75 are other manifestations of this problem. Please keep an eye on those tickets for news about when we improve our capture method. 👍

@fastlanebot
Copy link
Author

@digobaptista commented

@mfurtak Thank you for the quick feedback, I'll keep an eye on those issues also.

@fastlane-bot
Copy link

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
Copy link

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 👍

@yanndupuy
Copy link

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:

dupuyyann@gmail.com
Domain zyapps.com has exceeded the max emails per hour (421/400 (105%)) allowed. Message will be reattempted later

------- This is a copy of the message, including all the headers. ------
Received: from github-smtp2-ext4.iad.github.net ([192.30.252.195]:49692 helo=github-smtp2a-ext-cp1-prd.iad.github.net)
by serveur.ex2-p10.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.87)
(envelope-from noreply@github.com)
id 1bEKrL-002kpo-JH
for yann.dupuy@zyapps.com; Sat, 18 Jun 2016 20:20:48 +0200
Date: Sat, 18 Jun 2016 11:20:02 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1466274002;
bh=mmBx84snvBjpZTKNCK4z4y2fk2lBHJUe0hGRDX1an70=;
h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=pXkWwWf9tT5g+Py7+q8XAdeGAn6viq9bO02Tom810EZSQlyNHuMm0NmXAE0phkzTE
RmQ/E8fdC2xTmJLtCDE/H7cDRdplVBKtjKTyEuDtEmXziIYarTtQzL+afzxYMt8ylD
XS2pDmxKUFNPalGiyztFMNl6vr/7ubBGIpLsg3fk=
From: fastlane bot notifications@github.com
Reply-To: fastlane/fastlane reply@reply.github.com
To: fastlane/fastlane fastlane@noreply.github.com
Cc:
Message-ID: fastlane/fastlane/issue/2078/issue_event/696784509@github.com
In-Reply-To: fastlane/fastlane/issues/2078@github.com
References: fastlane/fastlane/issues/2078@github.com
Subject: Re: [fastlane/fastlane] Error when screengrab is made in a Material
Dialog (#2078)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_576590d2517f1_594e3fbeb5bd52a03936b7";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: fastlane-bot
X-GitHub-Recipient: yanndupuy
List-ID: fastlane/fastlane <fastlane.fastlane.github.com>
List-Archive: https://github.com/fastlane/fastlane
List-Post: mailto:reply@reply.github.com
List-Unsubscribe: mailto:unsub+000df0dcb9557e92879d6647a6bd155ec8e0d97762e7758492cf00000001137d52d292a169ce084a7d3b@reply.github.com,
https://github.com/notifications/unsubscribe/AA3w3Nm1QdwYZ7AReBaKnrmzJyXXFrRUks5qNDbSgaJpZM4IyNDy
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: yann.dupuy@zyapps.com
X-Spam-Status: No, score=-4.1
X-Spam-Score: -40
X-Spam-Bar: ----
X-Ham-Report: Spam detection software, running on the system "serveur.ex2-p10.com",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
root@localhost for details.

Content preview: Closed #2078. --- You are receiving this because you are subscribed
to this thread. Reply to this email directly or view it on GitHub: #2078 (comment)
[...]

Content analysis details: (-4.1 points, 5.0 required)

pts rule name description


-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high
trust
[192.30.252.195 listed in list.dnswl.org]
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 HTML_MESSAGE BODY: HTML included in message
1.0 HTML_IMAGE_ONLY_16 BODY: HTML: images with 1200-1600 bytes of words
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid
X-Spam-Flag: NO

----==_mimepart_576590d2517f1_594e3fbeb5bd52a03936b7
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit

Closed #2078.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#2078 (comment)
----==_mimepart_576590d2517f1_594e3fbeb5bd52a03936b7
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit

Closed #2078.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_576590d2517f1_594e3fbeb5bd52a03936b7--

@yanndupuy
Copy link

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:

dupuyyann@gmail.com
Domain zyapps.com has exceeded the max emails per hour (422/400 (105%)) allowed. Message will be reattempted later

------- This is a copy of the message, including all the headers. ------
Received: from o1.sgmail.github.com ([192.254.114.176]:18867)
by serveur.ex2-p10.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
(Exim 4.87)
(envelope-from bounces+848413-8f06-yann.dupuy=zyapps.com@sgmail.github.com)
id 1bEKrQ-002ksp-5z
for yann.dupuy@zyapps.com; Sat, 18 Jun 2016 20:20:52 +0200
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=github.com;
h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe;
s=s20150108; bh=fCf+UKNVXsJXYMztzscgnlxo28M=; b=N7G7iofx4WqF1enT
1TuOpq4lcaj9V37WCQ/Kp0DMnNZNC9bSgyiYMYZQUHyiLqTi6nmdGHsry3rSK3Wb
c7qAlPG1qMHrlLctc6oJHfJGOTJkXlIgI0qDJiLEwpwRM8L45TwB6Eh6+f2tyBj9
5nvYxLiVqQfBSA3bKI4UAWjUQRg=
Received: by filter0458p1mdw1.sendgrid.net with SMTP id filter0458p1mdw1.8220.576590D140
2016-06-18 18:20:01.925876547 +0000 UTC
Received: from github-smtp2b-ext-cp1-prd.iad.github.net (github-smtp2b-ext-cp1-prd.iad.github.net [192.30.253.17])
by ismtpd0006p1iad1.sendgrid.net (SG) with ESMTP id uVTNZTFaSkGfU62d4z72fQ
for yann.dupuy@zyapps.com; Sat, 18 Jun 2016 18:20:01.919 +0000 (UTC)
Date: Sat, 18 Jun 2016 11:20:01 -0700
From: fastlane bot notifications@github.com
Reply-To: fastlane/fastlane reply@reply.github.com
To: fastlane/fastlane fastlane@noreply.github.com
Cc:
Message-ID: fastlane/fastlane/issues/2078/226957222@github.com
In-Reply-To: fastlane/fastlane/issues/2078@github.com
References: fastlane/fastlane/issues/2078@github.com
Subject: Re: [fastlane/fastlane] Error when screengrab is made in a Material
Dialog (#2078)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_576590d1ba8ff_2f7c3f878aff92bc3055b4";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: fastlane-bot
X-GitHub-Recipient: yanndupuy
List-ID: fastlane/fastlane <fastlane.fastlane.github.com>
List-Archive: https://github.com/fastlane/fastlane
List-Post: mailto:reply@reply.github.com
List-Unsubscribe: mailto:unsub+000df0dcf089b5d4526424ac10ea4d13c36db78e6daf496492cf00000001137d52d192a169ce084a7d3b@reply.github.com,
https://github.com/notifications/unsubscribe/AA3w3Mkitdshpy2QHBuGVNAoTczYBg6Lks5qNDbRgaJpZM4IyNDy
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: yann.dupuy@zyapps.com
X-SG-EID: /bDRkhSo/GH2gzZXMo5AKhbuTgLDPkexBjh/BYa140HdLomQBGtbTkc7ccndrmH5uTywnyxASISOJi
vuE3b+E1U47RhPrdoi+B92Ax0MtVsfaovefD26JlHcnDNlgZplucC5T8IuOtTVAfZhY+HRmgqjtUWS
sK+MUKTMQAaxBYk1MMXdNc9pWZu6HNhgMGJvE2bHnuI/bj6xW/lXmy9guA5Fzj5Zk0ofgRXz6LWa7q
o=
X-Spam-Status: No, score=-1.2
X-Spam-Score: -11
X-Spam-Bar: -
X-Ham-Report: Spam detection software, running on the system "serveur.ex2-p10.com",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
root@localhost for details.

Content preview: 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 👍 [...]

Content analysis details: (-1.2 points, 5.0 required)

pts rule name description


-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
trust
[192.254.114.176 listed in list.dnswl.org]
-0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3)
[192.254.114.176 listed in wl.mailspike.net]
-1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain
0.0 HTML_MESSAGE BODY: HTML included in message
1.0 HTML_IMAGE_ONLY_16 BODY: HTML: images with 1200-1600 bytes of words
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid
-0.0 RCVD_IN_MSPIKE_WL Mailspike good senders
X-Spam-Flag: NO

----==_mimepart_576590d1ba8ff_2f7c3f878aff92bc3055b4
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable

This issue will be auto-closed because there hasn't been any activity for a=
few months. Feel free to [open a new one](https://github.com/fastlane/fast=
lane/issues/new) if you still experience this problem =F0=9F=91=8D


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#2078 (comment)

----==_mimepart_576590d1ba8ff_2f7c3f878aff92bc3055b4
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable

This issue will be auto-closed because there hasn't been any activity fo= r a few months. Feel free to open a new one if you still experience this problem =F0=9F=91=8D

&mda= sh;
You are receiving this because you are subscribed to this thread.<= br />Reply to this email directly, view it on GitHub, or mute the thread.3D""

<meta itemprop=3D"description" content=3D"View this Issue on GitHub">

----==_mimepart_576590d1ba8ff_2f7c3f878aff92bc3055b4--

@fastlane fastlane locked and limited conversation to collaborators Dec 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants