From 09bb140c665f82e3f8b03fdaaebe056a7861f30e Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Fri, 23 Jun 2023 19:33:31 -0400 Subject: [PATCH] RcloneRpc: Fix hang in setRemoteOptions() when setting options for an OAuth2-based backend The `rclone authorize` flow is triggered when updating any option for a backend that uses OAuth2. This causes the thread to hang indefinitely and blocks further RPC calls. Issue: #16 Signed-off-by: Andrew Gunnerson --- app/src/main/java/com/chiller3/rsaf/RcloneRpc.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/chiller3/rsaf/RcloneRpc.kt b/app/src/main/java/com/chiller3/rsaf/RcloneRpc.kt index a30f990..a96007a 100644 --- a/app/src/main/java/com/chiller3/rsaf/RcloneRpc.kt +++ b/app/src/main/java/com/chiller3/rsaf/RcloneRpc.kt @@ -303,6 +303,9 @@ object RcloneRpc { "name" to remote, "parameters" to options, "opt" to mutableMapOf( + // This is required or else the rclone authorize flow is triggered, even if we + // don't update any authentication-related options. + "nonInteractive" to true, "obscure" to true, ), ),