Search Unity

Consumer closed input channel or an error occurred. events=0x9

Discussion in 'Android' started by Seraphim-Whiteless, Dec 6, 2019.

  1. Seraphim-Whiteless

    Seraphim-Whiteless

    Joined:
    Jun 23, 2014
    Posts:
    197
    Hi everyone!
    We have a problem with app update.
    if app have some native plugins changed, it will crash on a first run.
    problem solving by cache clearing while update.
    but how can i clear it by my app?

    trying some native Java methods ..
    Code (JavaScript):
    1. File dir = context.getCacheDir();
    2. deleteDir(dir);
    but it does not work

    this solve problem, but clearing also all user data
    Code (JavaScript):
    1. Runtime runtime = Runtime.getRuntime();
    2. runtime.exec("pm clear "+packageName);

    Anybody know some solution?

    native method does not available for app
    Code (JavaScript):
    1. /**
    2.     * Attempts to delete the cache files associated with an application.
    3.     * Since this may take a little while, the result will
    4.     * be posted back to the given observer.  A deletion will fail if the calling context
    5.     * lacks the {@link android.Manifest.permission#DELETE_CACHE_FILES} permission, if the
    6.     * named package cannot be found, or if the named package is a "system package".
    7.     *
    8.     * @param packageName The name of the package to delete
    9.     * @param observer An observer callback to get notified when the cache file deletion
    10.     * is complete.
    11.     * {@link android.content.pm.IPackageDataObserver#onRemoveCompleted(String, boolean)}
    12.     * will be called when that happens.  observer may be null to indicate that
    13.     * no callback is desired.
    14.     *
    15.     * @hide
    16.     */
    17.    @UnsupportedAppUsage
    18.    public abstract void deleteApplicationCacheFiles(@NonNull String packageName,
    19.            @Nullable IPackageDataObserver observer);
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    What crash do you get exactly?
    Is it plugins themselves that cause it or side effects of them?
     
  3. Seraphim-Whiteless

    Seraphim-Whiteless

    Joined:
    Jun 23, 2014
    Posts:
    197
    armx64 on AndroidOne 9x work good
    armv7 on android 6.0 crash on first run after update app
    2+ launching good

    no cras logs. Just closing app


    Code (JavaScript):
    1.  
    2. W InputDispatcher: channel '1baac53 com.foranj.aquariumfarm/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
    3.  
    4. E InputDispatcher: channel '1baac53 com.foranj.aquariumfarm/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    5.  
    6. 12-24 12:20:16.260   932  1767 I WindowState: WIN DEATH: Window{1baac53 u0 com.foranj.aquariumfarm/com.unity3d.player.UnityPlayerActivity}
    7.  
    8. 12-24 12:20:16.261   932  1767 V WindowManager: Remove Window{1baac53 u0 com.foranj.aquariumfarm/com.unity3d.player.UnityPlayerActivity} client=948d442, surface=Surface(name=com.foranj.aquariumfarm/com.unity3d.player.UnityPlayerActivity) Callers=com.android.server.wm.WindowState$DeathRecipient.binderDied:1217 android.os.BinderProxy.sendDeathNotice:566 <bottom of call stack> <bottom of call stack>
    9.  
    10. 12-24 12:20:16.261   932  1767 W InputDispatcher: Attempted to unregister already unregistered input channel '1baac53 com.foranj.aquariumfarm/com.unity3d.player.UnityPlayerActivity (server)'
    11.  
    12.  
    full log in attachment
     

    Attached Files:

    • log1.txt
      File size:
      306.9 KB
      Views:
      536
    Last edited: Dec 24, 2019
  4. Seraphim-Whiteless

    Seraphim-Whiteless

    Joined:
    Jun 23, 2014
    Posts:
    197
  5. Seraphim-Whiteless

    Seraphim-Whiteless

    Joined:
    Jun 23, 2014
    Posts:
    197
    is community dead?
     
  6. cgydev

    cgydev

    Joined:
    Oct 2, 2015
    Posts:
    15
    Having same crash.
    Some additional information, for me the Crash happens once I call Application.Quit through the APP and try to open it again from the drawer that opens of the apps in memory.