Skip to content

[Bug]: (Android) Error: failed to read index: '.git/index' no longer exists #559

@AmWanselowski

Description

@AmWanselowski

Description

these alerts happens when trying to download changes

Minimal Reproduction

open app

Exception or Error

Click to expand logs

Platform: Android
Device Model: SM-P615
OS Version: 13 (SDK 33)
App Version: 1.8.05+1805

Git Provider: GITHUB
Repo URL: null

Scheduled Sync: never|0

2025-10-24 05:48:04.464 [W] PullFromRepo: Already up to date
2025-10-24 05:48:04.463 [W] PullFromRepo: Fetching changes
2025-10-24 05:48:03.691 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:48:03.690 [W] RecentCommits: Getting local directory
2025-10-24 05:48:03.586 [W] PullFromRepo: Getting local directory
2025-10-24 05:48:03.542 [W] GitStatus: Getting local directory
Error: PanicException(called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 10, message: "failed to read index: '/storage/emulated/0/Documents/Zettelkasten/.git/index' no longer exists" }Backtrace [{ fn: "_ZL15__pthread_startPv" }, { fn: "__start_thread" }])

<asynchronous suspension>
#9      _FutureBuilderState._subscribe.<anonymous closure> (package:flutter/src/widgets/async.dart:641)
<asynchronous suspension>
#8      GitManager.getConflicting (package:GitSync/api/manager/git_manager.dart:630)
<asynchronous suspension>
#7      useDirectory (package:GitSync/api/helper.dart:280)
<asynchronous suspension>
#6      useDirectory.preUseAccess (package:GitSync/api/helper.dart:277)
<asynchronous suspension>
#5      GitManager.getConflicting.<anonymous closure> (package:GitSync/api/manager/git_manager.dart:638)
<asynchronous suspension>
#4      _CustomZone.runUnary (dart:async/zone.dart:1429)
#3      _rootRunUnary (dart:async/zone.dart:1538)
#2      SseCodec.decodeObject (package:flutter_rust_bridge/src/codec/sse.dart:35)
#1      SseCodec._decode (package:flutter_rust_bridge/src/codec/sse.dart:45)
2025-10-24 05:48:03.542 [E] RecentCommits: #0      SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:35)
2025-10-24 05:48:03.541 [W] GitStatus: Getting local directory
Error: PanicException(called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 10, message: "failed to read index: '/storage/emulated/0/Documents/Zettelkasten/.git/index' no longer exists" }Backtrace [{ fn: "_ZL15__pthread_startPv" }, { fn: "__start_thread" }])

<asynchronous suspension>
#10     _FutureBuilderState._subscribe.<anonymous closure> (package:flutter/src/widgets/async.dart:641)
<asynchronous suspension>
#9      _MyHomePageState.getSyncOptions (package:GitSync/main.dart:563)
<asynchronous suspension>
#8      GitManager.getConflicting (package:GitSync/api/manager/git_manager.dart:630)
<asynchronous suspension>
#7      useDirectory (package:GitSync/api/helper.dart:280)
<asynchronous suspension>
#6      useDirectory.preUseAccess (package:GitSync/api/helper.dart:277)
<asynchronous suspension>
#5      GitManager.getConflicting.<anonymous closure> (package:GitSync/api/manager/git_manager.dart:638)
<asynchronous suspension>
#4      _CustomZone.runUnary (dart:async/zone.dart:1429)
#3      _rootRunUnary (dart:async/zone.dart:1538)
#2      SseCodec.decodeObject (package:flutter_rust_bridge/src/codec/sse.dart:35)
#1      SseCodec._decode (package:flutter_rust_bridge/src/codec/sse.dart:45)
2025-10-24 05:48:03.541 [E] RecentCommits: #0      SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:35)
2025-10-24 05:48:01.334 [W] GitStatus: Getting local directory
Error: PanicException(called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 10, message: "failed to read index: '/storage/emulated/0/Documents/Zettelkasten/.git/index' no longer exists" }Backtrace [{ fn: "_ZL15__pthread_startPv" }, { fn: "__start_thread" }])

<asynchronous suspension>
#9      _FutureBuilderState._subscribe.<anonymous closure> (package:flutter/src/widgets/async.dart:641)
<asynchronous suspension>
#8      GitManager.getConflicting (package:GitSync/api/manager/git_manager.dart:630)
<asynchronous suspension>
#7      useDirectory (package:GitSync/api/helper.dart:280)
<asynchronous suspension>
#6      useDirectory.preUseAccess (package:GitSync/api/helper.dart:277)
<asynchronous suspension>
#5      GitManager.getConflicting.<anonymous closure> (package:GitSync/api/manager/git_manager.dart:638)
<asynchronous suspension>
#4      _CustomZone.runUnary (dart:async/zone.dart:1429)
#3      _rootRunUnary (dart:async/zone.dart:1538)
#2      SseCodec.decodeObject (package:flutter_rust_bridge/src/codec/sse.dart:35)
#1      SseCodec._decode (package:flutter_rust_bridge/src/codec/sse.dart:45)
2025-10-24 05:48:01.333 [E] RecentCommits: #0      SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:35)
2025-10-24 05:48:01.333 [W] GitStatus: Getting local directory
Error: PanicException(called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 10, message: "failed to read index: '/storage/emulated/0/Documents/Zettelkasten/.git/index' no longer exists" }Backtrace [{ fn: "_ZL15__pthread_startPv" }, { fn: "__start_thread" }])

<asynchronous suspension>
#9      _FutureBuilderState._subscribe.<anonymous closure> (package:flutter/src/widgets/async.dart:641)
<asynchronous suspension>
#8      GitManager.getConflicting (package:GitSync/api/manager/git_manager.dart:630)
<asynchronous suspension>
#7      useDirectory (package:GitSync/api/helper.dart:280)
<asynchronous suspension>
#6      useDirectory.preUseAccess (package:GitSync/api/helper.dart:277)
<asynchronous suspension>
#5      GitManager.getConflicting.<anonymous closure> (package:GitSync/api/manager/git_manager.dart:638)
<asynchronous suspension>
#4      _CustomZone.runUnary (dart:async/zone.dart:1429)
#3      _rootRunUnary (dart:async/zone.dart:1538)
#2      SseCodec.decodeObject (package:flutter_rust_bridge/src/codec/sse.dart:35)
#1      SseCodec._decode (package:flutter_rust_bridge/src/codec/sse.dart:45)
2025-10-24 05:48:01.332 [E] RecentCommits: #0      SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:35)
2025-10-24 05:48:00.292 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:48:00.292 [W] RecentCommits: Getting local directory
2025-10-24 05:48:00.292 [W] Global: Failed to get HEAD
2025-10-24 05:48:00.283 [W] RecentCommits: Getting local directory
2025-10-24 05:48:00.283 [W] RecentCommits: Getting local directory
2025-10-24 05:48:00.283 [W] RecentCommits: Getting local directory
2025-10-24 05:48:00.282 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:59.278 [W] GitStatus: Getting local directory
2025-10-24 05:47:59.257 [W] GitStatus: Getting local directory
2025-10-24 05:47:59.238 [W] Global: Failed to get HEAD
2025-10-24 05:47:59.226 [W] Global: Failed to get HEAD
2025-10-24 05:47:59.222 [W] RecentCommits: Getting local directory
2025-10-24 05:47:59.221 [W] RecentCommits: Getting local directory
2025-10-24 05:47:59.221 [W] Global: Failed to get HEAD
2025-10-24 05:47:59.219 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:59.214 [W] RecentCommits: Getting local directory
2025-10-24 05:47:59.213 [W] Global: Failed to get HEAD
2025-10-24 05:47:59.210 [W] Global: Failed to get HEAD
2025-10-24 05:47:59.209 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:59.208 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:59.207 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:59.201 [W] RecentCommits: Getting local directory
2025-10-24 05:47:59.201 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:59.200 [W] RecentCommits: Getting local directory
2025-10-24 05:47:59.199 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:59.198 [W] RecentCommits: Getting local directory
2025-10-24 05:47:59.197 [W] RecentCommits: Getting local directory
2025-10-24 05:47:59.196 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:59.055 [W] RecentCommits: .git folder found
2025-10-24 05:47:59.054 [W] RecentCommits: .git folder found
2025-10-24 05:47:59.051 [W] RecentCommits: .git folder found
2025-10-24 05:47:59.051 [W] RecentCommits: .git folder found
2025-10-24 05:47:59.042 [W] GitStatus: Getting local directory
Error: PanicException(called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 10, message: "failed to read index: '/storage/emulated/0/Documents/Zettelkasten/.git/index' no longer exists" }Backtrace [{ fn: "_ZL15__pthread_startPv" }, { fn: "__start_thread" }])

<asynchronous suspension>
#10     _FutureBuilderState._subscribe.<anonymous closure> (package:flutter/src/widgets/async.dart:641)
<asynchronous suspension>
#9      _MyHomePageState.getSyncOptions (package:GitSync/main.dart:563)
<asynchronous suspension>
#8      GitManager.getConflicting (package:GitSync/api/manager/git_manager.dart:630)
<asynchronous suspension>
#7      useDirectory (package:GitSync/api/helper.dart:280)
<asynchronous suspension>
#6      useDirectory.preUseAccess (package:GitSync/api/helper.dart:277)
<asynchronous suspension>
#5      GitManager.getConflicting.<anonymous closure> (package:GitSync/api/manager/git_manager.dart:638)
<asynchronous suspension>
#4      _CustomZone.runUnary (dart:async/zone.dart:1429)
#3      _rootRunUnary (dart:async/zone.dart:1538)
#2      SseCodec.decodeObject (package:flutter_rust_bridge/src/codec/sse.dart:35)
#1      SseCodec._decode (package:flutter_rust_bridge/src/codec/sse.dart:45)
2025-10-24 05:47:59.041 [E] RecentCommits: #0      SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:35)
2025-10-24 05:47:59.039 [W] GitStatus: Getting local directory
Error: PanicException(called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 10, message: "failed to read index: '/storage/emulated/0/Documents/Zettelkasten/.git/index' no longer exists" }Backtrace [{ fn: "_ZL15__pthread_startPv" }, { fn: "__start_thread" }])

<asynchronous suspension>
#9      _FutureBuilderState._subscribe.<anonymous closure> (package:flutter/src/widgets/async.dart:641)
<asynchronous suspension>
#8      GitManager.getConflicting (package:GitSync/api/manager/git_manager.dart:630)
<asynchronous suspension>
#7      useDirectory (package:GitSync/api/helper.dart:280)
<asynchronous suspension>
#6      useDirectory.preUseAccess (package:GitSync/api/helper.dart:277)
<asynchronous suspension>
#5      GitManager.getConflicting.<anonymous closure> (package:GitSync/api/manager/git_manager.dart:638)
<asynchronous suspension>
#4      _CustomZone.runUnary (dart:async/zone.dart:1429)
#3      _rootRunUnary (dart:async/zone.dart:1538)
#2      SseCodec.decodeObject (package:flutter_rust_bridge/src/codec/sse.dart:35)
#1      SseCodec._decode (package:flutter_rust_bridge/src/codec/sse.dart:45)
2025-10-24 05:47:59.038 [E] RecentCommits: #0      SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:35)
2025-10-24 05:47:58.058 [W] GitStatus: Getting local directory
2025-10-24 05:47:57.998 [W] GitStatus: Getting local directory
Error: PanicException(called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 10, message: "failed to read index: '/storage/emulated/0/Documents/Zettelkasten/.git/index' no longer exists" }Backtrace [{ fn: "_ZL15__pthread_startPv" }, { fn: "__start_thread" }])

<asynchronous suspension>
#9      _FutureBuilderState._subscribe.<anonymous closure> (package:flutter/src/widgets/async.dart:641)
<asynchronous suspension>
#8      GitManager.getConflicting (package:GitSync/api/manager/git_manager.dart:630)
<asynchronous suspension>
#7      useDirectory (package:GitSync/api/helper.dart:280)
<asynchronous suspension>
#6      useDirectory.preUseAccess (package:GitSync/api/helper.dart:277)
<asynchronous suspension>
#5      GitManager.getConflicting.<anonymous closure> (package:GitSync/api/manager/git_manager.dart:638)
<asynchronous suspension>
#4      _CustomZone.runUnary (dart:async/zone.dart:1429)
#3      _rootRunUnary (dart:async/zone.dart:1538)
#2      SseCodec.decodeObject (package:flutter_rust_bridge/src/codec/sse.dart:35)
#1      SseCodec._decode (package:flutter_rust_bridge/src/codec/sse.dart:45)
2025-10-24 05:47:57.997 [E] RecentCommits: #0      SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:35)
2025-10-24 05:47:57.042 [W] RecentCommits: Retrieved 14 recent commits
2025-10-24 05:47:55.951 [W] Global: Failed to get HEAD
2025-10-24 05:47:55.944 [W] RecentCommits: .git folder found
2025-10-24 05:47:55.943 [W] RecentCommits: .git folder found
2025-10-24 05:47:55.941 [W] GitStatus: Getting local directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions