MuntashirAkon/AppManager · error

IOException(remoteException)

Error message

IOException(remoteException)

What it means

RemoteFile.getCanonicalPath() wraps the Binder RemoteException thrown by the remote IServiceProvider's getCanonicalPath() call into an IOException. This is an IPC failure, not a filesystem error: the remote process was unavailable, crashed, or the transaction failed.

Source

Thrown at libcore/io/src/main/java/io/github/muntashirakon/io/RemoteFile.java:58

    @NonNull
    @Override
    public RemoteFile getChildFile(String name) {
        return new RemoteFile(fs, getPath(), name);
    }

    @Override
    protected RemoteFile[] createArray(int n) {
        return new RemoteFile[n];
    }

    @Override
    @NonNull
    public String getCanonicalPath() throws IOException {
        try {
            return fs.getCanonicalPath(getPath()).tryAndGet();
        } catch (RemoteException e) {
            throw new IOException(e);
        }
    }

    private boolean checkAccess(int access) {
        try {
            return fs.checkAccess(getPath(), access);
        } catch (RemoteException e) {
            return false;
        }
    }

    @Override
    public boolean canRead() {
        return checkAccess(OsConstants.R_OK);
    }

    @Override
    public boolean canWrite() {

View on GitHub (pinned to 0152f468fc)

Solutions

  1. Verify/rebind the remote service (recreate the RemoteFile with a live service instance) and retry.
  2. Catch IOException around RemoteFile calls and re-acquire the service before retrying once.
  3. Check for DeadObjectException semantics in logs to distinguish process death from path errors.
  4. Add linkToDeath/reconnect logic on the service binding so stale services are refreshed before calls.

Example fix

// before
String canonical = remoteFile.getCanonicalPath();
// after
String canonical;
try {
    canonical = remoteFile.getCanonicalPath();
} catch (IOException e) {
    service = rebindService();
    canonical = new RemoteFile(service, remoteFile.getPath()).getCanonicalPath();
}
Defensive patterns

Strategy: retry

Validate before calling

if (service == null || !service.asBinder().pingBinder()) {
    service = rebindService();
}

Try / catch

try {
    return remoteFile.getCanonicalPath();
} catch (IOException e) {
    if (e.getCause() instanceof RemoteException) {
        rebindService();
        return remoteFile.getCanonicalPath();
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling getCanonicalPath() when the remote service process is dead, the Binder transaction fails, or the reply could not be read (TransactionTooLargeException, DeadObjectException).

Common situations: The provider/host app was killed in the background while a RemoteFile operation was in flight; service disconnected between binding and the call; oversized parceled replies on old Android versions.

Related errors


AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12). Data as JSON: /api/errors/e9e5d6d8c6f2f6e7. Report an issue: GitHub.