Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

provided path is invalid #121

Open
Newar417 opened this issue Dec 8, 2018 · 5 comments
Open

provided path is invalid #121

Newar417 opened this issue Dec 8, 2018 · 5 comments

Comments

@Newar417
Copy link

Newar417 commented Dec 8, 2018

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
@l-jonas
Copy link

l-jonas commented Dec 8, 2018

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

@Newar417
Copy link
Author

Newar417 commented Dec 9, 2018

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

@l-jonas
Copy link

l-jonas commented Dec 9, 2018

@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).

This was referenced Dec 9, 2018
@Newar417
Copy link
Author

Newar417 commented Dec 13, 2018

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).

@l-jonas
Copy link

l-jonas commented Dec 13, 2018

#122 (which changes the handling of the space) isn't part of a release yet. I try to create a release today.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants