rmapi icon indicating copy to clipboard operation
rmapi copied to clipboard

failed to build documents tree, request failed with status 404

Open samuelaebi opened this issue 3 months ago • 3 comments

I tried to set up rmapi on my new MacBook. I constantly get the following error once I try to run it (it asks me to get a code once and seems to then acquire a token that works until I reset it):

ERROR: 2025/09/05 17:35:18 main.go:79: failed to build documents tree, last error: failed to mirror was not ok: request failed with status 404

Looking at the file generated with "RMAPI_TRACE=1", it always seems to fail with a different file, like this:

Trace: 2025/09/05 17:35:17 transport.go:264: ---- end request ---- Trace: 2025/09/05 17:35:17 blobdoc.go:132: name from metadata: YYY Trace: 2025/09/05 17:35:18 transport.go:260: HTTP/2.0 200 OK Content-Length: 287 Accept-Ranges: bytes Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 Cache-Control: no-store Content-Type: text/plain; charset=utf-8 Date: Fri, 05 Sep 2025 15:35:17 GMT Rm-Token-Ttl-Hint: 10799 Server: Google Frontend Traceparent: 00-a1608a0970d03b03ac2d74be2cfb5de6-e9f35d53d0ecfc8b-00 Via: 1.1 google X-Cloud-Trace-Context: a1608a0970d03b03ac2d74be2cfb5de6/16857920444746759307 X-Envoy-Decorator-Operation: ingress GetFile X-Goog-Hash: crc32c=Qp2apA== { "deleted": false, "lastModified": "1756906894409", "metadatamodified": true, "modified": true, "parent": "a7e8c068-53c8-4711-a2a7-80794f0c903d", "pinned": false, "synced": false, "type": "CollectionType", "version": 2, "visibleName": "XXX" } Trace: 2025/09/05 17:35:18 transport.go:264: ---- end request ---- Trace: 2025/09/05 17:35:18 blobdoc.go:132: name from metadata: XXX Trace: 2025/09/05 17:35:18 main.go:72: failed to mirror was not ok: request failed with status 404 ERROR: 2025/09/05 17:35:18 main.go:79: failed to build documents tree, last error: failed to mirror was not ok: request failed with status 404`

It worked without a flaw on my old MacBook. I don't understand what is different now... Got the binary from the releases page, version v0.0.31.

samuelaebi avatar Sep 05 '25 15:09 samuelaebi

I also started getting these more often in the past weeks.

You can try deleting your .rmapi-auth file and re-authenticate. That fixed it in two instances for me. I don't know why it works, but it does.

Azeirah avatar Sep 05 '25 16:09 Azeirah

I also started getting these more often in the past weeks.

You can try deleting your .rmapi-auth file and re-authenticate. That fixed it in two instances for me. I don't know why it works, but it does.

Thank you. However, I don't have a .rmapi-auth file. My auth info (token) is saved in rmapi.conf. I have reset it a few times already and that doesn't help. The rmapi installation on my old macbook and on my win machine works without a problem. I'm wondering if it has something to do with the way I set up my new macbook (time machine backup) and if there is a file/files that was/were copied over that I need to delete?

samuelaebi avatar Sep 08 '25 07:09 samuelaebi

Update on this: I also get this error if I run rmapi through docker on said macbook. Again, I have no problem using rmapi on my windows machine with the same account.

samuelaebi avatar Nov 27 '25 11:11 samuelaebi

I started hitting this around the same time.. happens 100%, re-authing etc didn't help. i've finally had a chance to look into it and i noticed the homebrew recipe is point to an old release of rmapi.. i decided to try building rmapi from source and now it's all working.

mikekeith avatar Dec 13 '25 00:12 mikekeith