Android

[안드로이드 오류]Fatal Exception: java.lang.IllegalStateException: Cannot perform this action on a sealed instance.

삼성 갤럭시 S9를 사용하는 사용자로부터 앱 오류 리포트가 보고 되었다. 오류가 발생한 위치도 알 수 없는 상황이다.

이럴때 개발자는 어떻게 해결방법을 찾을 것인가?? org.chromim.content.browser.accessibility 라이브러리 문제일까?

 

[오류 내용]

WebContentsAccessibilityImpl.java line 29

org.chromium.content.browser.accessibility.WebContentsAccessibilityImpl.createAccessibilityNodeInfo

Fatal Exception: java.lang.IllegalStateException: Cannot perform this action on a sealed instance.
       at android.view.accessibility.AccessibilityNodeInfo.enforceNotSealed(AccessibilityNodeInfo.java:2992)
       at android.view.accessibility.AccessibilityNodeInfo.setSource(AccessibilityNodeInfo.java:818)
       at android.view.accessibility.AccessibilityNodeInfo.setSource(AccessibilityNodeInfo.java:795)
       at android.view.accessibility.AccessibilityNodeInfo.obtain(AccessibilityNodeInfo.java:3008)
       at org.chromium.content.browser.accessibility.WebContentsAccessibilityImpl.createAccessibilityNodeInfo(WebContentsAccessibilityImpl.java:29)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1165)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1175)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1175)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1175)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1175)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1175)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1175)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1175)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1175)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1078)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1074)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1074)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1074)
       at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:876)
       at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:199)
       at android.view.AccessibilityInteractionController.-wrap1(AccessibilityInteractionController.java)
       at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1225)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6938)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

 

[오류가 발생한 휴대폰 정보]


나와 같은 오류를 해결한 개발자가 있는지 검색하였으나 오류내용만 같을뿐 발생한 라이브러리가 달랐다.

stackoverflow.com/questions/7575921/illegalstateexception-can-not-perform-this-action-after-onsaveinstancestate-wit

 

IllegalStateException: Can not perform this action after onSaveInstanceState with ViewPager

I’m getting user reports from my app in the market, delivering the following exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at android.app.

stackoverflow.com

오류가 발생한 클래스를 찾아보았다.

chromium.googlesource.com/chromium/src/+/66.0.3359.158/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java

    @Override
    public AccessibilityNodeInfo createAccessibilityNodeInfo(int virtualViewId) {
        if (!isAccessibilityEnabled()) {
            return null;
        }
        int rootId = nativeGetRootId(mNativeObj);
        if (virtualViewId == View.NO_ID) {
            return createNodeForHost(rootId);
        }
        if (!isFrameInfoInitialized()) {
            return null;
        }
        final AccessibilityNodeInfo info = AccessibilityNodeInfo.obtain(mView);
        info.setPackageName(mContext.getPackageName());
        info.setSource(mView, virtualViewId);
        if (virtualViewId == rootId) {
            info.setParent(mView);
        }
        if (nativePopulateAccessibilityNodeInfo(mNativeObj, info, virtualViewId)) {
            return info;
        } else {
            info.recycle();
            return null;
        }
    }

나와 같은 오류보고를 받은 개발자 글들을 많이 발견하였으나, 해결책은 없었다. 이렇게 뜬금없이 비정상종료가 발생하는 사용자가 생기면 당황스럽다. 이럴 때 오류가 발생한 폰이 있다면 해결할 수 있을까? 반대로 오류 해결 이전에 오류를 재현할 수 있을까??

Leave a Reply

error: Content is protected !!