Jump to content
Enpass Discussion Forum

Enpass Autofill Accessibility causes other app to crash

Aidan Host

Recommended Posts


Firstly, thank you for the great apps (I use it on various devices).

Now on to my problem, I am an android developer and I am using the Enpass android app on my main phone, because that is where one would need a password manager. I happened to install an app that I am developing on my main phone to test while I was away from my desk and I got a crash in said app. I have tracked down the cause of the crash to the Enpass autofill accessibility setting. If I disable Enpass in the accessibility settings then the crash no longer occurs.


Essentially, in order to cause the crash I tap on an item in a recycler view list to switch to another activity (a detail view of the tapped item) and then push the device's back button to return to the recycler view list. In order for the crash to occur this needs to happen at least twice and in quick succession. So, tap item, tap back, tap item, tap back (not allowing the loading on each activity to finish).


Device: LG G5 (H850)

Android 7.0

Enpass 5.4.8

Enpass Autofill Service and Notification are enabled. Enpass Keyboard is not enabled.


The Enpass notification does not show while I am switching between the views mentioned above. It does show when I am on the app's login screen though.


Below is the stack trace of the crash in my app:

E/AndroidRuntime: FATAL EXCEPTION: main
     Process: [My App's Package Name], PID: 1318
     java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.view.ViewParent.requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent)' on a null object reference
         at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:6309)
         at android.view.View.sendAccessibilityEventUnchecked(View.java:6288)
         at android.view.View$SendViewStateChangedAccessibilityEvent.run(View.java:23713)
         at android.os.Handler.handleCallback(Handler.java:751)
         at android.os.Handler.dispatchMessage(Handler.java:95)
         at android.os.Looper.loop(Looper.java:154)
         at android.app.ActivityThread.main(ActivityThread.java:6247)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)



I had a look at the source code for the View class and the method that is throwing the exception is requestSendAccessibilityEvent()


The below code is from the API 25 source code, View.java:

public void announceForAccessibility(CharSequence text) {
        if (AccessibilityManager.getInstance(mContext).isEnabled() && mParent != null) {
            AccessibilityEvent event = AccessibilityEvent.obtain(
            mParent.requestSendAccessibilityEvent(this, event);


The exception happens because mParent is null, and that code should not run/execute if the mParent object is null. So something is changing the mParent object to null after the if statement has done the check.


Now because the exception occurs in the android system code, there is not much I can do to catch the error. Perhaps there is an update you guys can make to your app? Are you guys calling the announceForAccessibility() method in the Enpass android app anywhere?

Link to comment
Share on other sites

Ok, so an update.


I ended up installing the LastPass android app and testing with their AutoFill Accessibility Service enabled and Enpass disabled. I got the crash with their as well, so it is not limited to or caused by Enpass.


It turns out that a third party library I have implemented (with a custom TextView class over riding the method isShown()) only returns the field variable. After many hours of searching and digging I found a solution on StackOverflow: http://stackoverflow.com/questions/20429603/android-4-4-kitkat-random-crash


The solution was to call the isShown() method of the super class (in this case TextView) together with the field variable.


Anyway, Enpass is fulfilling my needs quite well on Android & Mac. There are a few things that I would like to see implemented, but those improvements take time.


Keep up the good work guys.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Create New...