kingrukawa / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

Status bar notification, trying to test if my Spreadsheet gets populated #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
FYI: Using this on an emulator, not a real device. Is the SDCard on the 
emulator acting up or am I missing something?

What steps will reproduce the problem?
My App runs fine, just don't see anything populating the spreadsheet.
Followed the How to wiki, not sure if I am missing anything.

I have the following in one of my Activities onCreate , just to test if it 
populates the spreadsheet, am I missing something?
Exception e = new Exception(); 
//ErrorReporter.getInstance().handleException(e);
ErrorReporter.getInstance().handleSilentException(e);

What is the expected output? What do you see instead?
My App works as expected, I see the following in LogCat.

Do not see the status bar notification.

03-11 11:35:19.057: ERROR/ACRA(855): Error while retrieving crash data
03-11 11:35:19.057: ERROR/ACRA(855): java.lang.NullPointerException
03-11 11:35:19.057: ERROR/ACRA(855):     at 
java.util.Hashtable.put(Hashtable.java:369)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
org.acra.ErrorReporter.retrieveCrashData(ErrorReporter.java:352)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
org.acra.ErrorReporter.handleException(ErrorReporter.java:533)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
org.acra.ErrorReporter.handleSilentException(ErrorReporter.java:590)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
com.ajay.paul.AquaScorpio.Convert.onCreate(Convert.java:106)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
android.os.Looper.loop(Looper.java:123)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
android.app.ActivityThread.main(ActivityThread.java:3647)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
java.lang.reflect.Method.invokeNative(Native Method)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
java.lang.reflect.Method.invoke(Method.java:507)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-11 11:35:19.057: ERROR/ACRA(855):     at 
dalvik.system.NativeStart.main(Native Method)
03-11 11:35:19.179: DEBUG/ACRA(855): Writing crash report file.
03-11 11:35:19.427: ERROR/ACRA(855): An error occured while writing the report 
file...
03-11 11:35:19.427: ERROR/ACRA(855): java.lang.NullPointerException
03-11 11:35:19.427: ERROR/ACRA(855):     at 
org.acra.ErrorReporter.saveCrashReportFile(ErrorReporter.java:670)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
org.acra.ErrorReporter.handleException(ErrorReporter.java:551)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
org.acra.ErrorReporter.handleSilentException(ErrorReporter.java:590)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
com.ajay.paul.AquaScorpio.Convert.onCreate(Convert.java:106)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
android.os.Looper.loop(Looper.java:123)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
android.app.ActivityThread.main(ActivityThread.java:3647)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
java.lang.reflect.Method.invokeNative(Native Method)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
java.lang.reflect.Method.invoke(Method.java:507)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-11 11:35:19.427: ERROR/ACRA(855):     at 
dalvik.system.NativeStart.main(Native Method)
03-11 11:35:19.577: WARN/System.err(855): java.lang.NullPointerException
03-11 11:35:19.588: WARN/System.err(855):     at 
org.acra.ErrorReporter.getCrashReportFilesList(ErrorReporter.java:690)
03-11 11:35:19.627: WARN/System.err(855):     at 
org.acra.ErrorReporter.checkAndSendReports(ErrorReporter.java:726)
03-11 11:35:19.638: WARN/System.err(855):     at 
org.acra.ErrorReporter$ReportsSenderWorker.run(ErrorReporter.java:109)

What version of the product are you using? On what operating system?
The latest, 3.1.1. OS: Windows Server 2003

Please provide any additional information below.

Original issue reported on code.google.com by ajayjoseis on 11 Mar 2011 at 4:50

GoogleCodeExporter commented 8 years ago
Hi,

Using handleSilentException() won't show any notification as it allows you to 
send debugging "silent" reports even if you are using the status bar 
notification mode.

Anyway, this should not crash. The stacktrace make me wonder if you correctly 
added the call to ACRA.init(this) in your Application.onCreate() method. Could 
you please check this ?

Kevin

Original comment by kevin.gaudin on 11 Mar 2011 at 5:27

GoogleCodeExporter commented 8 years ago
Thanks for the quick feedback.

I have:
  public void onCreate() {
        ACRA.init(this);         
        super.onCreate();
    }

in the App.onCreate()

Using 
ErrorReporter.getInstance().handleException(e); 

Still the same Error.
All works as expected with the same ARCA error as before.

Snippet of manifest:
 <application android:icon="@drawable/icon" android:label="@string/app_name" android:name="Tech">

        <activity android:name="org.acra.CrashReportDialog"
        android:theme="@android:style/Theme.Dialog"
        android:launchMode="singleInstance"
        android:excludeFromRecents="true"
        android:finishOnTaskLaunch="true" />

Class:
public class Tech extends Application {

    @Override
    public void onCreate() {
        ACRA.init(this);         
        super.onCreate();
    }

}

Original comment by ajayjoseis on 12 Mar 2011 at 7:24

GoogleCodeExporter commented 8 years ago
Could you please add your @ReportsCrashes configuration on top of your 
Application (Tech) class ?

Original comment by kevin.gaudin on 12 Mar 2011 at 8:18

GoogleCodeExporter commented 8 years ago
Thanks. But I do have that as well, there would be build errors if I didn't 
have this. Its probably something else that I am overlooking. I am going to 
look further.

@ReportsCrashes(formKey="XXX-I have the formkey here",
        mode = ReportingInteractionMode.NOTIFICATION,
        resNotifTickerText = R.string.crash_notif_ticker_text,
        resNotifTitle = R.string.crash_notif_title,
        resNotifText = R.string.crash_notif_text,
        resNotifIcon = android.R.drawable.stat_notify_error, // optional. default is a warning sign
        resDialogText = R.string.crash_dialog_text,
        resDialogIcon = android.R.drawable.ic_dialog_info, //optional. default is a warning sign
        resDialogTitle = R.string.crash_dialog_title, // optional. default is your application name
        resDialogCommentPrompt = R.string.crash_dialog_comment_prompt, // optional. when defined, adds a user text field input with this text resource as a label
        resDialogOkToast = R.string.crash_dialog_ok_toast // optional. displays a Toast message when the user accepts to send a report.
        )

Original comment by ajayjoseis on 14 Mar 2011 at 5:59

GoogleCodeExporter commented 8 years ago
It worked, my Manifest was wrong.
Overlooked a silly mistake.
Had another application branch, forgot to remove it after the copy paste from 
the wiki :)

Original comment by ajayjoseis on 14 Mar 2011 at 6:10

GoogleCodeExporter commented 8 years ago
Great work on creating the library, glad to see it working!

Thanks,
Ajay

Original comment by ajayjoseis on 14 Mar 2011 at 6:24

GoogleCodeExporter commented 8 years ago
Ok, great you solved your issue ;-)

Thanks,
Kevin

Original comment by kevin.gaudin on 15 Mar 2011 at 12:03

GoogleCodeExporter commented 8 years ago
Would you mind to indicate which changes you made to your manifest to make it 
work?
I am having troubles since my application is crashing at ACRA.init(this). 
I am not sure if I did something wrong in the manifesto

Original comment by david.w....@gmail.com on 31 Oct 2011 at 2:45