syncthing-lite icon indicating copy to clipboard operation
syncthing-lite copied to clipboard

provided path is invalid

Open Newar417 opened this issue 6 years ago • 5 comments

As requested from #98 (pasted from the clipboard, detailed report enabled):

java.lang.RuntimeException: Exception in transaction
	at android.arch.b.b.e.a(RoomDatabase.java:309)
	at net.syncthing.repository.android.a.a(SqliteIndexRepository.kt:15)
	at net.syncthing.a.a.c.f.a(IndexMessageQueueProcessor.kt:111)
	at net.syncthing.a.a.c.f$1.c_(IndexMessageQueueProcessor.kt:86)
	at a.c.b.a.a.b(ContinuationImpl.kt:32)
	at kotlinx.coroutines.az$a.a(Dispatched.kt:235)
	at kotlinx.coroutines.a.run(AbstractContinuation.kt:19)
	at kotlinx.coroutines.c.i.run(Tasks.kt:94)
	at kotlinx.coroutines.c.a.a(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.c.a.a(CoroutineScheduler.kt:60)
	at kotlinx.coroutines.c.a$b.run(CoroutineScheduler.kt:732)
Caused by: java.io.IOException: error processing index update: test/file/2016_12_23.dat 
	at net.syncthing.a.a.c.b.a(IndexElementProcessor.kt:36)
	at net.syncthing.a.a.c.e.a(IndexMessageProcessor.kt:27)
	at net.syncthing.a.a.c.f$e.a(IndexMessageQueueProcessor.kt:116)
	at net.syncthing.a.a.c.f$e.a(IndexMessageQueueProcessor.kt:35)
	at net.syncthing.repository.android.a$a.call(SqliteIndexRepository.kt:24)
	at android.arch.b.b.e.a(RoomDatabase.java:303)
	... 10 more
Caused by: java.lang.IllegalArgumentException: provided path is invalid
	at net.syncthing.a.c.e.c.l(PathUtils.kt:50)
	at net.syncthing.a.c.e.c.d(PathUtils.kt:84)
	at net.syncthing.a.c.a.f.<init>(FileInfo.kt:40)
	at net.syncthing.a.c.a.f$a.d(FileInfo.kt:163)
	at net.syncthing.a.a.c.b.a(IndexElementProcessor.kt:109)
	at net.syncthing.a.a.c.b.a(IndexElementProcessor.kt:33)
	... 15 more

java.lang.RuntimeException: Exception in transaction
	at android.arch.b.b.e.a(RoomDatabase.java:309)
	at net.syncthing.repository.android.a.a(SqliteIndexRepository.kt:15)
	at net.syncthing.a.a.c.f.a(IndexMessageQueueProcessor.kt:111)
	at net.syncthing.a.a.c.f$1.c_(IndexMessageQueueProcessor.kt:86)
	at a.c.b.a.a.b(ContinuationImpl.kt:32)
	at kotlinx.coroutines.az$a.a(Dispatched.kt:235)
	at kotlinx.coroutines.a.run(AbstractContinuation.kt:19)
	at kotlinx.coroutines.c.i.run(Tasks.kt:94)
	at kotlinx.coroutines.c.a.a(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.c.a.a(CoroutineScheduler.kt:60)
	at kotlinx.coroutines.c.a$b.run(CoroutineScheduler.kt:732)
Caused by: java.io.IOException: error processing index update: test/file/2016_12_23.dat 
	at net.syncthing.a.a.c.b.a(IndexElementProcessor.kt:36)
	at net.syncthing.a.a.c.e.a(IndexMessageProcessor.kt:27)
	at net.syncthing.a.a.c.f$e.a(IndexMessageQueueProcessor.kt:116)
	at net.syncthing.a.a.c.f$e.a(IndexMessageQueueProcessor.kt:35)
	at net.syncthing.repository.android.a$a.call(SqliteIndexRepository.kt:24)
	at android.arch.b.b.e.a(RoomDatabase.java:303)
	... 10 more
Caused by: java.lang.IllegalArgumentException: provided path is invalid
	at net.syncthing.a.c.e.c.l(PathUtils.kt:50)
	at net.syncthing.a.c.e.c.d(PathUtils.kt:84)
	at net.syncthing.a.c.a.f.<init>(FileInfo.kt:40)
	at net.syncthing.a.c.a.f$a.d(FileInfo.kt:163)
	at net.syncthing.a.a.c.b.a(IndexElementProcessor.kt:109)
	at net.syncthing.a.a.c.b.a(IndexElementProcessor.kt:33)
	... 15 more

Newar417 avatar Dec 08 '18 02:12 Newar417

This looks like there is a space at the end of the filename. Is this correct?

l-jonas avatar Dec 08 '18 13:12 l-jonas

In the log there is a space, but the actual file is without spaces.

Newar417 avatar Dec 09 '18 00:12 Newar417

@Newar417 I tried it. With a space at the end, I can create the same exception (and in the log is exactly one space at the end of the filename like in yours). Without a space there, it works correctly.

I am going to remove the no space-rule as it's valid to use a space at the end of the filename. Moreover, I will add showing which validation rule caused the exception.

It could be that your file has got a space at the end or had it earlier (and the old one is still in the index).

l-jonas avatar Dec 09 '18 10:12 l-jonas

~It works with the latest version.~ Thank you. I checked that file in the terminal and file explorer; there is no space, no clue where it comes from. I have not touched it in years.

Edit: attached a fresh error report.

IndexMessageQueueProcessor.indexUpdateProcessStoredQueue
PathUtils
processed path: test/file/2016_12_23.dat 

java.lang.RuntimeException: Exception in transaction
	at android.arch.b.b.e.a(RoomDatabase.java:309)
	at net.syncthing.repository.android.a.a(SqliteIndexRepository.kt:15)
	at net.syncthing.a.a.c.f.a(IndexMessageQueueProcessor.kt:117)
	at net.syncthing.a.a.c.f$1.c_(IndexMessageQueueProcessor.kt:85)
	at a.c.b.a.a.b(ContinuationImpl.kt:32)
	at kotlinx.coroutines.az$a.a(Dispatched.kt:235)
	at kotlinx.coroutines.a.run(AbstractContinuation.kt:19)
	at kotlinx.coroutines.c.i.run(Tasks.kt:94)
	at kotlinx.coroutines.c.a.a(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.c.a.a(CoroutineScheduler.kt:60)
	at kotlinx.coroutines.c.a$b.run(CoroutineScheduler.kt:732)
Caused by: net.syncthing.a.c.c.a: java.lang.IllegalArgumentException: provided path is invalid
	at net.syncthing.a.c.f.c.l(PathUtils.kt:53)
	at net.syncthing.a.c.f.c.d(PathUtils.kt:99)
	at net.syncthing.a.c.a.f.<init>(FileInfo.kt:40)
	at net.syncthing.a.c.a.f$a.d(FileInfo.kt:163)
	at net.syncthing.a.a.c.b.a(IndexElementProcessor.kt:100)
	at net.syncthing.a.a.c.b.a(IndexElementProcessor.kt:32)
	at net.syncthing.a.a.c.e.a(IndexMessageProcessor.kt:26)
	at net.syncthing.a.a.c.f$e.a(IndexMessageQueueProcessor.kt:122)
	at net.syncthing.a.a.c.f$e.a(IndexMessageQueueProcessor.kt:34)
	at net.syncthing.repository.android.a$a.call(SqliteIndexRepository.kt:24)
	at android.arch.b.b.e.a(RoomDatabase.java:303)
	... 10 more
Caused by: java.lang.IllegalArgumentException: provided path is invalid
	at net.syncthing.a.c.f.c.l(PathUtils.kt:54)
	... 20 more

Space is there (again not in the actual file though).

Newar417 avatar Dec 13 '18 02:12 Newar417

https://github.com/syncthing/syncthing-lite/pull/122 (which changes the handling of the space) isn't part of a release yet. I try to create a release today.

l-jonas avatar Dec 13 '18 06:12 l-jonas