skius / rm-pdf-tools

PDF tools for reMarkable tablets
MIT License
16 stars 1 forks source link

Doesn't work on win10 #6

Open zelomel opened 2 years ago

zelomel commented 2 years ago

Hi,

I am trying to use your very interesting application. I am using the version for Windows, but it seems that it does not work. Here the error messages:

Enter one-time code (go to https://my.remarkable.com/connect/desktop): ********
panic: entry doesn't exist

goroutine 1 [running]:
github.com/skius/rm-pdf-tools/cloud.(*Cloud).FindNewFilesEdit(0xc000006140, {0xe9b555, 0x10})
        /github/workspace/cloud/cloud.go:76 +0x476
main.main()
        /github/workspace/main.go:25 +0x3f
skius commented 2 years ago

Hi @zelomel, thanks for the bug report! I've published a new release (v0.2.1), could you try that one? I didn't have time to test it yet.

EDIT: You may additionally want to try deleting the C:\Users\<user>\AppData\Roaming\rmapi\rmapi.conf file (which resets the one-time code).

zelomel commented 2 years ago

Hi @skius

I tried this new release, that still doesn't work.

For the merge function, the messages are:

Refreshing tree...
No docs to edit found!
Inner file 424e1038-444f-4b1b-936a-8e98cbd55396.metadata
Inner file 424e1038-444f-4b1b-936a-8e98cbd55396/f1c635b0-0afb-459e-8b24-945c37521591-metadata.json
Inner file 424e1038-444f-4b1b-936a-8e98cbd55396/f1c635b0-0afb-459e-8b24-945c37521591.rm
Inner file 6e446bb4-d522-4af1-994f-ba3046eec34c.metadata
Inner file 6e446bb4-d522-4af1-994f-ba3046eec34c/07ee98f9-9c1b-43ca-9981-b7949adcbec4-metadata.json
Inner file 6e446bb4-d522-4af1-994f-ba3046eec34c/07ee98f9-9c1b-43ca-9981-b7949adcbec4.rm
Inner file 6e446bb4-d522-4af1-994f-ba3046eec34c/2c72aa7f-95c7-4a20-b486-fa1b32c4b0af-metadata.json
Inner file 6e446bb4-d522-4af1-994f-ba3046eec34c/2c72aa7f-95c7-4a20-b486-fa1b32c4b0af.rm
Inner file 6e446bb4-d522-4af1-994f-ba3046eec34c/545bffe9-b08d-4a71-9435-98d9b56f0970-metadata.json
Inner file 6e446bb4-d522-4af1-994f-ba3046eec34c/545bffe9-b08d-4a71-9435-98d9b56f0970.rm
{uuid: 424e1038-444f-4b1b-936a-8e98cbd55396, content: {"coverPageNumber":-1,"documentMetadata":{},"dummyDocument":false,"extraMetadata":{"LastBallpointv2Color":"Black","LastBallpointv2Size":"2","LastCalligraphyColor":"Black","LastCalligraphySize":"2","LastEraseSectionColor":"Black","LastEraseSectionSize":"2","LastEraserColor":"Black","LastEraserSize":"2","LastEraserTool":"Eraser","LastFinelinerv2Color":"Black","LastFinelinerv2Size":"2","LastHighlighterv2Color":"Black","LastHighlighterv2Size":"2","LastPaintbrushv2Color":"Black","LastPaintbrushv2Size":"2","LastPen":"Pencilv2","LastPencilv2Color":"Black","LastPencilv2Size":"2","LastSelectionToolColor":"Black","LastSelectionToolSize":"2","LastSharpPencilv2Color":"Black","LastSharpPencilv2Size":"2","LastTool":"Pencilv2","LastUndefinedColor":"","LastUndefinedSize":""},"fileType":"pdf","fontName":"","lineHeight":-1,"margins":100,"orientation":"portrait","pageCount":1,"pages":["f1c635b0-0afb-459e-8b24-945c37521591"],"textAlignment":"left","textScale":1}, pagedata: [Blank], rmfiles: [metadata f1c635b0-0afb-459e-8b24-945c37521591-metadata.json f1c635b0-0afb-459e-8b24-945c37521591.rm]}
{uuid: 6e446bb4-d522-4af1-994f-ba3046eec34c, content: {"coverPageNumber":-1,"documentMetadata":{"authors":["***"],"title":"Microsoft Word - Manuscript_Sustainability _template_"},"dummyDocument":false,"extraMetadata":{"LastBallpointv2Color":"Black","LastBallpointv2Size":"2","LastCalligraphyColor":"Black","LastCalligraphySize":"2","LastEraseSectionColor":"Black","LastEraseSectionSize":"2","LastEraserColor":"Black","LastEraserSize":"2","LastEraserTool":"Eraser","LastFinelinerv2Color":"Black","LastFinelinerv2Size":"2","LastHighlighterv2Color":"Black","LastHighlighterv2Size":"2","LastPaintbrushv2Color":"Black","LastPaintbrushv2Size":"2","LastPen":"Finelinerv2","LastPencilv2Color":"Black","LastPencilv2Size":"2","LastSelectionToolColor":"Black","LastSelectionToolSize":"2","LastSharpPencilv2Color":"Black","LastSharpPencilv2Size":"2","LastTool":"Finelinerv2","LastUndefinedColor":"Black","LastUndefinedSize":"2"},"fileType":"pdf","fontName":"","lineHeight":-1,"margins":100,"orientation":"portrait","pageCount":15,"pages":["545bffe9-b08d-4a71-9435-98d9b56f0970","07ee98f9-9c1b-43ca-9981-b7949adcbec4","2c72aa7f-95c7-4a20-b486-fa1b32c4b0af","194bbd7d-d87b-4014-a29b-bfa31d45de62","77236b22-01e6-44aa-8017-8b00f0f89d89","ac216d46-a3ea-4efc-a487-840c2e0dcd43","02521aae-af05-47dc-978e-1b9e6674861d","c16bca97-4953-4a91-9810-ef92f9b3c0c0","8fb28f46-8ed9-41a3-8ead-ae719a1f7c24","9e86132e-c2c4-4481-9330-3be57e9a7e4f","5a5ad7bf-83ec-40ae-a309-3b2c9517c16f","98b9da0d-398b-401f-8955-4bcb803165ad","5a747256-59b5-42cc-aee6-a18ea34b2cb7","9fb9bc49-dcd9-4414-9f05-b3dbb404c163","9ed85d35-5c63-411c-b453-74f3a9f3c8ff"],"textAlignment":"left","textScale":1}, pagedata: [Blank Blank Blank Blank Blank Blank Blank Blank Blank Blank Blank Blank Blank Blank Blank], rmfiles: [07ee98f9-9c1b-43ca-9981-b7949adcbec4-metadata.json 07ee98f9-9c1b-43ca-9981-b7949adcbec4.rm 2c72aa7f-95c7-4a20-b486-fa1b32c4b0af-metadata.json 2c72aa7f-95c7-4a20-b486-fa1b32c4b0af.rm 545bffe9-b08d-4a71-9435-98d9b56f0970-metadata.json 545bffe9-b08d-4a71-9435-98d9b56f0970.rm metadata]}
panic: strconv.Atoi: parsing "metad": invalid syntax

goroutine 1 [running]:
github.com/skius/rm-pdf-tools/actions.getIdxFromFileName({0xc000738535, 0x1})
        /github/workspace/actions/util.go:138 +0xe5
github.com/skius/rm-pdf-tools/actions.RunLines({0xc001077e30, 0x3, 0x24}, {0xc00091be50, 0x1, 0x0})
        /github/workspace/actions/actions.go:191 +0xb6
github.com/skius/rm-pdf-tools/actions.MergeFiles({0xc0002b0540, 0x18ea8f3, 0xc000463eb0}, {0xc0002b0580, 0x2e, 0x0}, {0xc0001b88c0, 0xa})
        /github/workspace/actions/merge.go:68 +0x6ad
main.mergeDocs(0xc00008fd70, {0xc0006022c0, 0x2, 0x2})
        /github/workspace/main.go:72 +0x2fb
main.main()
        /github/workspace/main.go:38 +0x105

and for the Edit function:

Refreshing tree...
UUID: 3cc366a6-2552-4001-aaeb-531c456ba50a name: 1a1,-5 node: &{0xc0004bbd60 map[8f684009-2576-443f-a259-c85b51cff70e:0xc0005a6468] 0xc00050cc78}
Inside 1a1,-5 child: sustainability-1080802-peer-review-v1 copy

Processing file: sustainability-1080802-peer-review-v1 copy
panic: unexpected file: 8f684009-2576-443f-a259-c85b51cff70e.metadata

goroutine 1 [running]:
github.com/skius/rm-pdf-tools/actions.RunFile({0xc0005e09ca, 0x24}, {0xc0007aa7c0, 0xc0007aa7c0}, {0xc0007aa840, 0x38}, {0xc00058c140, 0x2, 0x2})
        /github/workspace/actions/actions.go:87 +0xdcb
main.processDoc(0xc0005a7da0, 0xc0005a6468)
        /github/workspace/main.go:113 +0x21c
main.main()
        /github/workspace/main.go:30 +0x198

The files are downloaded locally, but It seems that the process is not executed.

skius commented 2 years ago

I assume this has to do with the new sync15 protocol reMarkable is switching to - sadly I am still on the old protocol so it's difficult for me to debug this.

It would be helpful if you could share the .zip and other files that rm-pdf-tools downloads when you try to edit a document (that does not contain any sensitive information!).

zelomel commented 2 years ago

Hi @skius

here the messages for the merge function and the zip files:

Refreshing tree...
UUID: 3cc366a6-2552-4001-aaeb-531c456ba50a name: 1a1,-5 node: &{0xc0000fdf40 map[] 0xc0000a8cf0}

No docs to edit found!
Inner file 15840563-3d26-47d0-aeee-6581fa5ac35a.metadata
Inner file 15840563-3d26-47d0-aeee-6581fa5ac35a/6f843efd-994d-472f-8443-a3659730a5ae-metadata.json
Inner file 15840563-3d26-47d0-aeee-6581fa5ac35a/6f843efd-994d-472f-8443-a3659730a5ae.rm
Inner file 15840563-3d26-47d0-aeee-6581fa5ac35a/c65bca4b-9437-4a22-80e8-f4abdac75eb9-metadata.json
Inner file 15840563-3d26-47d0-aeee-6581fa5ac35a/c65bca4b-9437-4a22-80e8-f4abdac75eb9.rm
Inner file 15840563-3d26-47d0-aeee-6581fa5ac35a/e7b9a669-57c6-4462-8da9-5bab679e7f92-metadata.json
Inner file 15840563-3d26-47d0-aeee-6581fa5ac35a/e7b9a669-57c6-4462-8da9-5bab679e7f92.rm
Filetype is not PDF! PDF content is: []
Inner file 7b6b0d4a-f327-42b6-bb01-f8d61dbd0333.metadata
Inner file 7b6b0d4a-f327-42b6-bb01-f8d61dbd0333/3937fbfe-57e9-447a-999e-d53a066b1be1-metadata.json
Inner file 7b6b0d4a-f327-42b6-bb01-f8d61dbd0333/3937fbfe-57e9-447a-999e-d53a066b1be1.rm
Inner file 7b6b0d4a-f327-42b6-bb01-f8d61dbd0333/d53ff0a7-3fde-4322-9b1d-344f276236da-metadata.json
Inner file 7b6b0d4a-f327-42b6-bb01-f8d61dbd0333/d53ff0a7-3fde-4322-9b1d-344f276236da.rm
Filetype is not PDF! PDF content is: []
{uuid: 15840563-3d26-47d0-aeee-6581fa5ac35a, content: {"coverPageNumber":-1,"documentMetadata":{},"dummyDocument":false,"extraMetadata":{"LastBallpointv2Color":"","LastBallpointv2Size":"","LastCalligraphyColor":"","LastCalligraphySize":"","LastEraseSectionColor":"","LastEraseSectionSize":"","LastEraserColor":"Black","LastEraserSize":"2","LastEraserTool":"Eraser","LastFinelinerv2Color":"Black","LastFinelinerv2Size":"2","LastHighlighterv2Color":"","LastHighlighterv2Size":"","LastPaintbrushv2Color":"","LastPaintbrushv2Size":"","LastPen":"Finelinerv2","LastPencilv2Color":"Black","LastPencilv2Size":"1","LastSelectionToolColor":"","LastSelectionToolSize":"","LastSharpPencilv2Color":"","LastSharpPencilv2Size":"","LastTool":"Finelinerv2","LastUndefinedColor":"","LastUndefinedSize":""},"fileType":"pdf","fontName":"","lineHeight":-1,"margins":125,"orientation":"portrait","pageCount":3,"pages":["6f843efd-994d-472f-8443-a3659730a5ae","e7b9a669-57c6-4462-8da9-5bab679e7f92","c65bca4b-9437-4a22-80e8-f4abdac75eb9"],"textAlignment":"justify","textScale":1}, pagedata: [Blank Blank Blank], rmfiles: [6f843efd-994d-472f-8443-a3659730a5ae.rm c65bca4b-9437-4a22-80e8-f4abdac75eb9-metadata.json c65bca4b-9437-4a22-80e8-f4abdac75eb9.rm e7b9a669-57c6-4462-8da9-5bab679e7f92-metadata.json e7b9a669-57c6-4462-8da9-5bab679e7f92.rm metadata 6f843efd-994d-472f-8443-a3659730a5ae-metadata.json]}
{uuid: 7b6b0d4a-f327-42b6-bb01-f8d61dbd0333, content: {"coverPageNumber":-1,"documentMetadata":{},"dummyDocument":false,"extraMetadata":{"LastBallpointv2Color":"","LastBallpointv2Size":"","LastCalligraphyColor":"","LastCalligraphySize":"","LastEraseSectionColor":"","LastEraseSectionSize":"","LastEraserColor":"Black","LastEraserSize":"2","LastEraserTool":"Eraser","LastFinelinerv2Color":"Black","LastFinelinerv2Size":"2","LastHighlighterv2Color":"","LastHighlighterv2Size":"","LastPaintbrushv2Color":"","LastPaintbrushv2Size":"","LastPen":"Finelinerv2","LastPencilv2Color":"Black","LastPencilv2Size":"1","LastSelectionToolColor":"","LastSelectionToolSize":"","LastSharpPencilv2Color":"","LastSharpPencilv2Size":"","LastTool":"Finelinerv2","LastUndefinedColor":"","LastUndefinedSize":""},"fileType":"pdf","fontName":"","lineHeight":-1,"margins":125,"orientation":"portrait","pageCount":2,"pages":["3937fbfe-57e9-447a-999e-d53a066b1be1","d53ff0a7-3fde-4322-9b1d-344f276236da"],"textAlignment":"justify","textScale":1}, pagedata: [Blank Blank], rmfiles: [3937fbfe-57e9-447a-999e-d53a066b1be1-metadata.json 3937fbfe-57e9-447a-999e-d53a066b1be1.rm d53ff0a7-3fde-4322-9b1d-344f276236da-metadata.json d53ff0a7-3fde-4322-9b1d-344f276236da.rm metadata]}
panic: strconv.Atoi: parsing "e7b9a669": invalid syntax

goroutine 1 [running]:
github.com/skius/rm-pdf-tools/actions.getIdxFromFileName({0xc0004df4c5, 0x1})
        /github/workspace/actions/util.go:130 +0xc5
github.com/skius/rm-pdf-tools/actions.RunLines({0xc00012a380, 0x7, 0x24}, {0xc00087ed40, 0x1, 0x0})
        /github/workspace/actions/actions.go:191 +0xb6
github.com/skius/rm-pdf-tools/actions.MergeFiles({0xc000500160, 0x182a8f3, 0xc000073eb0}, {0xc0005001c0, 0x2e, 0xc00006fe20}, {0xc0001b8650, 0xa})
        /github/workspace/actions/merge.go:68 +0x6ad
main.mergeDocs(0xc0000e3d88, {0xc000437200, 0x2, 0x2})
        /github/workspace/main.go:72 +0x2fb
main.main()
        /github/workspace/main.go:38 +0x105

doc-0-15840563-3d26-47d0-aeee-6581fa5ac35a.zip doc-1-7b6b0d4a-f327-42b6-bb01-f8d61dbd0333.zip