I need to send the bug report into GoogleDocs CrashReports-Template.
But I am not getting a single error.
#ReportsCrashes(formKey = "dfbhkdfjbnkjsdnkjsdfn")
public class MainActivity extends Application
{
#Override
public void onCreate()
{
super.onCreate();
ACRA.init(this);
}
}
any suggestion?
where am I wrong?
I think you should not use GoogleForms, because developers of ACRA strongly not recommend this. You can read more here https://github.com/ACRA/acra/wiki/Notice-on-Google-Form-Spreadsheet-usage and also note on this:
Unfortunately, we have been asked by Google to stop making our users
automatically post data to Google Forms just before the 'refresh' of
this great tool published a few months ago. The current
GoogleFormSender is working only on 'Legacy Forms'which can't be
created anymore in Google Drive.
So, I think will better to change your reports transporting into other destination:
https://github.com/ACRA/acra/wiki/AdvancedUsage#reports-destination
Sending crash reports to Google Docs isn't supported anymore. Google wasn't happy about this usage. You can find the alternatives in the documentation.
Related
I've been studying projects made in Android Studio for a few months, these days I've been trying to implement the "Push Notifications for Wordpress" plugin on a website, with the addition of the library provided by delitestudio.com for the android application. I'm following these instructions: https://www.delitestudio.com/wordpress/push-notifications-for-wordpress/push-notifications-library-for-android/
But as I do not have much experience, I do not know where to add this instruction:
Initialize Push Notifications
Add the following calls using the PushNotifications.Builder to initialize the library with your site’s url:
public class MyApplication extends Application {
#Override
public void onCreate() {
super.onCreate();
new PushNotifications.Builder(this, "http://[YOUR WORDPRESS SERVER]")
.build();
}
}
And several others for the text onwards, i did some research but I have not been able to understand it, I know it's too much to ask someone to teach me step by step, but I ask that someone with more experience enlighten me by giving at least the path where I should insert the instructions (if it should be inserted in mainactivity, Build.gradle, etc, for example) given in the link that I posted, since in the site quoted do not explain in detail. If you can help me by giving this path, I will be grateful, giving the other paths after this one, it would be even better. But thank you in advance for the help, forgive my English.
I recently released an application for some users to use my newly made Android Application. However, they are having trouble when they perform the Facebook Login feature that I have made.
It seems to work fine on my phone, but on other phones it seems to crash. I would like to know what is causing the application to crash so I can further debug this. Is there anywhere or anything that I can use to debug this problem further?
I have looked at both the Facebook Developer Console and Google Play Developer Console and neither seem to show or point me to where my error is. If anyone could help that would be great. Thanks!
Use any Crashlytics/Analytics tools to not only get error logs but also usage statictics which can be pretty useful insight during pre-release tests. Some of them like Crashlytics by Fabric are even free and are very easy to integrate. But, there are many others too.
There are plenty of cloud hosted solutions.These might be paid, and require signing up.
If you want to roll you own simple reporting mechanism, then there is an Android library: ARCA . You can set it up to send crash reports to an email address.
First, you'll need to include the library in app's build.gradle file:
compile 'ch.acra:acra:4.9.0'
Then declare extent the Application class (or modify if you already have) as :
import org.acra.*;
import org.acra.annotation.*;
#ReportsCrashes(mailTo = "reports#yourdomain.com",
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text)
public class MyApplication extends Application {
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
// The following line triggers the initialization of ACRA
ACRA.init(this);
}
}
The two thing necessary are:
Add #ReportsCrashes annotation to app's application class, with recipient mail address.
Override attachBaseContext() and include ACRA.init() in it.
Official docs:
Setting up ARCA.
Advanced configuration.
In Android, is there a way to tell why app crashed on my device? Let's say I have root access to the device, but the app that crashed is not debuggable and does not print anything to logcat.
Just to reiterate, the app that crashed is not my app, I have no access to the source, and it's not debuggable (it's a release build). I just want to get any available insights on why it crashed.
EDIT: I forgot to mention, I only found the /data/anr/ and /data/tombstones as sources for potential information. Those do not contain the stacktraces. Is there anything more available?
EDIT: There is a lot of confusion in comments, please read the question carefully. What I'm after is some kind of low level component that knows about the reason of the crash. The virtual machine must know, right?
I identified following sources that may or may not have useful information about 3rd party apps crashes:
adb logcat -b crash
/data/tombstones/
/data/anr/
Cannot. In third-party app, you cannot get detail about crash report. In some rarely case, third-party application has saved crash reports to log file. If you know file location, you can analyze crash on that log file. Otherwise, there isn't any way.
In case you develop your own app, and your application already has released to user and you want to get some statistic about crash event. You can gain some insight by using Crash Report Service as I mention below.
In case you want go get crash report from your own application, here is some libraries and services for your: ACRA library. Crash report will generated and post to Google Form. Really easy to use and setup in your application. As document stated:
#ReportsCrashes(formUri = "http://www.yourselectedbackend.com/reportpath")
public class MyApplication extends Application {
#Override
public void onCreate() {
// The following line triggers the initialization of ACRA
super.onCreate();
ACRA.init(this);
}
}
But you must have your own server. (There are tutorials for deploying this server, but you still must have your own). If you want to depend all to third-party service then Crashlytics or Crittercism or Countly or Google search query
I recently upgraded ACRA to version 4.5.0 and the send method in my custom ReportSender is no longer getting called.
By look at the logs, it looks like it is attempting to upload the crash report to Google Docs.
I have included some of our code below.
Custom ReportSender:
public class AcraPassportSender implements ReportSender {
...
public AcraPassportSender(int versionCode, boolean isStoreVersion){
...
}
#Override
public void send(CrashReportData report) throws ReportSenderException {
PLog.i(TAG, "Attempting to create and upload a bug report");
...
}
}
Application Class:
#ReportsCrashes(formKey="")
public class MyApp extends Application {
#Override
public void onCreate() {
ACRA.init(this);
AcraPassportSender acsender = new AcraPassportSender(version, isStoreVersion);
ACRA.getErrorReporter().setReportSender(acsender);
}
}
The logs show ACRA getting initialized. This worked before I upgraded ACRA. Any ideas of what could be happening here?
You can find the following sentence on the website of ACRA:
Since the recent update of Google Forms by Google, the usage of Google
Docs as a storage engine for ACRA reports is now deprecated.
As far as I know, Google Forms was default method of crash reporting in ACRA. You can look at ACRA project on GitHub and try to use different reporting method than Google Forms.
Moreover, I recommend you to use tools like Crashlytics, which are better than ACRA, allows you to collect crash reports and monitor your applications. Note that Crashlytics were acquired by Twitter and now they're available under fabric.io domain. You can also use paid tools like Bugsnag or create your own reporting solution.
The latest version of ACRA is 4.6.2. I would suggest upgrading to that.
GoogleFormSender was removed in 4.6.0. Other than that it is hard to know wwhat is goinf on as you have not posted the code for your Sender and you have not posted your logcat.
I suggest upgrading to 4.6.2 first and then reassessing.
I've made my app and publish it out . It's been downloaded about 7000 times . it running from api 8 to api 19 .
Before publishing ,I've tested it on 3 different real devices (not virtual) and it was ok .
Now ,about 10 users says that app crashes on different parts and it's bothering me .
How can I find these issues without having real devices ? does virtual devices works the same ? is there any other way that I could find out the problem ? any way I can report the issue from the app and solve it ?
thanks
There are multiple ways of doing this so there is no precise answer.
But the way I do this is through google analytics. I extend the Application class and just send uncaught exceptions to google analytics,
#Override
public void onCreate()
{
super.onCreate();
Thread.setDefaultUncaughtExceptionHandler (new Thread.UncaughtExceptionHandler()
{
#Override
public void uncaughtException (Thread thread, Throwable e)
{
tracker.send(new HitBuilders.ExceptionBuilder()
.setDescription(Arrays.toString(e.getStackTrace()))
.setFatal(true)
.build());
e.printStackTrace();
System.exit(1);
}
});
//...
But as I said you can handle this your own way.
Import analytics into your app
Acra,http://try.crashlytics.com/sdk-android/,
Flurry.
That will show where is your app crashing
Use bugsense, it will provide you the detailed crash report
Go here and sign up and a create a new project
and follow the instructions
https://mint.splunk.com
Here are some crash solutions:
https://github.com/ACRA with a guide ->http://www.toptal.com/android/automated-android-crash-reports-with-acra-and-cloudant
or check https://try.crashlytics.com/
Of course you could just ask the people what device it crashed on and hopefully re-create the bug so that you may find a solution. Good luck
You can view crashes and ANRs in the Play Store developer console: play.google.com/apps/publish/. This will give you a starting point at least.