zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
26.84k stars 1.87k forks source link

Where are Mobile frontend logs? #2579

Open LorenAmelang opened 2 years ago

LorenAmelang commented 2 years ago

I still haven't succeeded in building a proper server, I'm testing the Mobile frontend connecting to my Windows install. From my new iPad with iPadOS 15.1, I can create a text note which gets saved to Windows, and type a few words into it that get saved, but I can't paste content into it without lots of errors. The content appears on the iPad but is not saved:

iPad-2022 01 18-13 36 31 000 crop

Those error messages pop up for a few seconds and disappear by themselves before I can comprehend them. Most of them say "Error calling PUT notes..." I have no idea of a proper sequence of all of them. There is nothing at those times in the Windows logs.

I see an issue here suggesting the Mobile logs are visible in DevTools on the mobile device, but as I understand things, there is no DevTools function in mobile Safari, you have to wire up a Mac and watch remotely. But I don't have a Mac...

Is there some other way to understand what is happening? A problem with Paste in iPadOS? Too much content too quickly? You just can't really use a Windows install as a server?

I so wish there was a web clipper for mobile Safari!

zadam commented 2 years ago

Lack of console is very annoying in mobile browsers. It makes debugging hard.

These errors might be logged on the backend side so I would check the trilium-data/log folder.

(Also the obligatory disclaimer that Safari is not supported/tested browser)

LorenAmelang commented 2 years ago

Today it just works! From iPad Safari, connecting to my Windows install. Typing, pasting snippets, even copying whole web pages with the Force Select All automation add-on and pasting to Trilium. Changes appear in Windows almost instantly!

And the successful interactions appear in the backend log:

12:16:58.568 304 GET /api/clipper/handshake with 45 bytes took 2ms
12:17:01.892 Generated CSRF token ZQIlY10I-PSPUWiiyWmdshC_mk9vyWIM3TB0 with secret _csrf=6wC6Am3NVzcikIdqq_ppUuBf; Path=/
12:17:02.056 304 GET /api/options with 6375 bytes took 1ms
12:17:02.058 200 GET /api/tree with 18378 bytes took 1ms
12:17:02.059 Keyboard action showNoteInfo found in database, but not in action definition.
12:17:02.059 Keyboard action showLinkMap found in database, but not in action definition.
12:17:02.059 Keyboard action toggleZenMode found in database, but not in action definition.
12:17:02.059 Keyboard action focusOnAttributes found in database, but not in action definition.
12:17:02.060 304 GET /api/keyboard-actions with 11944 bytes took 1ms
12:17:02.062 304 GET /api/keyboard-shortcuts-for-notes with 2 bytes took 1ms
12:17:02.064 304 GET /api/script/widgets with 2915 bytes took 1ms
12:17:02.101 200 POST /api/tree/load with 1658 bytes took 1ms
12:17:02.142 200 POST /api/tree/load with 1577 bytes took 1ms
12:17:02.143 304 GET /api/search/%23bookmarked%20or%20%23bookmarkFolder with 2 bytes took 1ms
12:17:02.370 304 GET /api/notes/OHNX38FoofoQ with 575 bytes took 1ms
12:17:04.140 304 GET /api/script/startup with 1229 bytes took 1ms
12:17:04.157 200 POST /api/tree/load with 1658 bytes took 1ms
12:17:27.346 Slow 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 16ms
12:17:27.353 200 GET /api/notes/OHNX38FoofoQ with 570 bytes took 1ms
12:17:28.343 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 6ms
12:17:28.346 200 GET /api/notes/OHNX38FoofoQ with 571 bytes took 1ms
12:17:32.251 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 8ms
12:17:32.259 200 GET /api/notes/OHNX38FoofoQ with 572 bytes took 1ms
12:17:33.252 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 5ms
12:17:33.255 200 GET /api/notes/OHNX38FoofoQ with 574 bytes took 1ms
12:17:34.263 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 8ms
12:17:34.272 200 GET /api/notes/OHNX38FoofoQ with 581 bytes took 1ms
12:17:35.915 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 9ms
12:17:35.926 200 GET /api/notes/OHNX38FoofoQ with 577 bytes took 1ms
12:17:36.916 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 3ms
12:17:36.919 200 GET /api/notes/OHNX38FoofoQ with 578 bytes took 1ms
12:17:37.929 Slow 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 13ms
12:17:37.934 200 GET /api/notes/OHNX38FoofoQ with 579 bytes took 1ms
12:17:38.935 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 9ms
12:17:38.947 200 GET /api/notes/OHNX38FoofoQ with 580 bytes took 1ms
12:17:39.934 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 3ms
12:17:39.938 200 GET /api/notes/OHNX38FoofoQ with 593 bytes took 1ms
12:17:58.565 304 GET /api/clipper/handshake with 45 bytes took 1ms
12:18:58.574 304 GET /api/clipper/handshake with 45 bytes took 0ms
12:19:06.070 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 3ms
12:19:06.076 200 GET /api/notes/OHNX38FoofoQ with 812 bytes took 0ms
12:19:13.191 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 4ms
12:19:13.194 200 GET /api/notes/OHNX38FoofoQ with 852 bytes took 0ms
12:19:14.200 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 4ms
12:19:14.203 200 GET /api/notes/OHNX38FoofoQ with 892 bytes took 0ms
12:19:14.207 200 GET /api/notes/OHNX38FoofoQ with 892 bytes took 1ms
12:19:58.566 304 GET /api/clipper/handshake with 45 bytes took 1ms
12:20:19.420 Slow 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 11ms
12:20:19.428 200 GET /api/notes/OHNX38FoofoQ with 3857 bytes took 1ms
12:20:19.610 Saving image idxs-icon.svg
12:20:19.624 Download of https://tools.usps.com/go/images/idxs-icon.svg succeeded and was saved as image note szUaIYwmrEvG
12:20:19.629 200 POST /api/tree/load with 3470 bytes took 1ms
12:20:19.636 200 POST /api/tree/load with 3470 bytes took 1ms
12:20:22.012 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 6ms
12:20:22.022 200 GET /api/tree?subTreeNoteId=OHNX38FoofoQ with 3620 bytes took 0ms
12:20:22.023 200 GET /api/notes/OHNX38FoofoQ with 3889 bytes took 0ms
12:20:22.029 200 GET /api/tree?subTreeNoteId=OHNX38FoofoQ with 3620 bytes took 1ms
12:20:23.035 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 7ms
12:20:23.041 200 GET /api/notes/OHNX38FoofoQ with 3930 bytes took 0ms
12:20:23.044 200 GET /api/notes/OHNX38FoofoQ with 3930 bytes took 0ms
12:20:58.575 304 GET /api/clipper/handshake with 45 bytes took 2ms
12:21:51.115 Slow 200 PUT /api/notes/OHNX38FoofoQ with 92 bytes took 15ms
12:21:51.122 200 GET /api/notes/OHNX38FoofoQ with 7037 bytes took 1ms
12:21:58.565 304 GET /api/clipper/handshake with 45 bytes took 1ms

Nothing appeared there for yesterday's failures. I assume that means the iPad wasn't able to communicate with Windows at all during those error popup messages.

Do those "found in database, but not in action definition" lines mean something needs to be configured or updated?

I did update the iPadOS from 15.1 to 15.2 last night... Not likely that's the difference, but who knows?

zadam commented 2 years ago

Do those "found in database, but not in action definition" lines mean something needs to be configured or updated?

No, these are harmless.