ddvk / rmfakecloud

host your own cloud for the remarkable
GNU Affero General Public License v3.0
705 stars 57 forks source link

Errror after storage-space-issue #229

Closed ghost closed 1 year ago

ghost commented 1 year ago

"Unexpected end of JSON input" seen onto the webUI under "Documents"

What does it mean and how can I fix it?

ddvk commented 1 year ago

what does the log show?

ghost commented 1 year ago

time="2023-03-19T07:30:27+01:00" level=info msg=/ time="2023-03-19T07:30:27+01:00" level=info msg="[GIN] 2023/03/19 - 07:30:27 | 200 | 153.794µs | 172.28.0.1 | GET \"/\"" time="2023-03-19T07:30:27+01:00" level=info msg="[GIN] 2023/03/19 - 07:30:27 | 200 | 8.251776ms | 172.28.0.1 | GET \"/static/css/main.d94d89ba.css\"" time="2023-03-19T07:30:27+01:00" level=info msg="[GIN] 2023/03/19 - 07:30:27 | 200 | 5.794799ms | 172.28.0.1 | GET \"/static/js/main.9c2de5b1.js\"" time="2023-03-19T07:30:28+01:00" level=info msg="[ui-authmiddleware] User from token: ctl" time="2023-03-19T07:30:28+01:00" level=info msg="[GIN] 2023/03/19 - 07:30:28 | 200 | 731.716µs | 172.28.0.1 | HEAD \"/ui/api/\"" time="2023-03-19T07:30:28+01:00" level=info msg="[GIN] 2023/03/19 - 07:30:28 | 200 | 472.366µs | 172.28.0.1 | GET \"/favicon.ico\"" time="2023-03-19T07:30:30+01:00" level=info msg="[ui-authmiddleware] User from token: ctl" time="2023-03-19T07:30:30+01:00" level=info msg="cache corrupt" time="2023-03-19T07:30:30+01:00" level=error msg="unexpected end of JSON input" time="2023-03-19T07:30:30+01:00" level=info msg="[GIN] 2023/03/19 - 07:30:30 | 500 | 3.308321ms | 172.28.0.1 | GET \"/ui/api/documents\""

ddvk commented 1 year ago

can you try with v0.0.13.2 ?

ghost commented 1 year ago

Now I did. I'm sorry, but the UI gives the same error.

Rest works fine.

Eeems commented 1 year ago

Now I did. I'm sorry, but the UI gives the same error.

Rest works fine.

And the log has the same error message?

ghost commented 1 year ago

time="2023-03-20T16:32:46+01:00" level=info msg=/ time="2023-03-20T16:32:46+01:00" level=info msg="[GIN] 2023/03/20 - 16:32:46 | 200 | 142.703µs | 172.28.0.1 | GET \"/\"" time="2023-03-20T16:32:47+01:00" level=info msg="[ui-authmiddleware] User from token: ctl" time="2023-03-20T16:32:47+01:00" level=info msg="[GIN] 2023/03/20 - 16:32:47 | 200 | 284.61µs | 172.28.0.1 | HEAD \"/ui/api/\"" time="2023-03-20T16:32:49+01:00" level=info msg="[ui-authmiddleware] User from token: ctl" time="2023-03-20T16:32:49+01:00" level=warning msg="cached tree corrupt, returning empty tree" time="2023-03-20T16:32:49+01:00" level=error msg="unexpected end of JSON input" time="2023-03-20T16:32:49+01:00" level=info msg="[GIN] 2023/03/20 - 16:32:49 | 500 | 2.774819ms | 172.28.0.1 | GET \"/ui/api/documents\""

Eeems commented 1 year ago

"cached tree corrupt, returning empty tree": https://github.com/ddvk/rmfakecloud/blob/1bbf2ceefc7c8ddf2390c8a5401765b027add6c9/internal/storage/models/hashtree.go#L73 It seems to only be called from here: https://github.com/ddvk/rmfakecloud/blob/1bbf2ceefc7c8ddf2390c8a5401765b027add6c9/internal/storage/fs/blobstore.go#L41

My guess is that the cached tree isn't valid json anymore.

You will want to inspect the .tree file in your user folder to see what is wrong with it. You may need to delete the file. I'd recommend renaming it at first instead of deleting.

ghost commented 1 year ago

That worked. Yes, out-of-storage problem of the device may effect a damage of the file. But I didn't found that special file. Sorry about that. I will try to remember next time.

Am Mo., 20. März 2023 um 16:43 Uhr schrieb Nathaniel van Diepen < @.***>:

"cached tree corrupt, returning empty tree": https://github.com/ddvk/rmfakecloud/blob/1bbf2ceefc7c8ddf2390c8a5401765b027add6c9/internal/storage/models/hashtree.go#L73 It seems to only be called from here: https://github.com/ddvk/rmfakecloud/blob/1bbf2ceefc7c8ddf2390c8a5401765b027add6c9/internal/storage/fs/blobstore.go#L41

My guess is that the cached tree isn't valid json anymore.

You will want to inspect the .tree file in your user folder to see what is wrong with it. You may need to delete the file. I'd recommend renaming it at first instead of deleting.

— Reply to this email directly, view it on GitHub https://github.com/ddvk/rmfakecloud/issues/229#issuecomment-1476476295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK35VR2RO5642KX6X3PZ5ZTW5B3KTANCNFSM6AAAAAAV7KGUHM . You are receiving this because you authored the thread.Message ID: @.***>

ddvk commented 1 year ago

duh, I forgot to remove the error