vrtmrz / obsidian-livesync-webclip

MIT License
27 stars 3 forks source link

0.5.0 does nothing #8

Open chymian opened 1 year ago

chymian commented 1 year ago

@vrtmrz pleased to see some efforts on this. I'm desperatly waiting for this to work.

I deinstalled 0.4 (was never working) 0.5.0 is setup but does absolutly nothing on click, just show "fetching page..." forever nothing in the browser console, nothing in the HA-proxy log (VPS) nothing in couchdb.log (VPS)

browser: Version 111.0.5563.147 (Official Build, ungoogled-chromium) built on Debian bullseye/11, running on Debian bookworm/12 (64-Bit)

vrtmrz commented 1 year ago

Thank you for testing, and I am so sorry to disappoint you.

May I ask you to select Inspect on the popup of the clipper, and check what has appeared in the DevTools that you open?

chymian commented 1 year ago

@vrtmrz

Thank you for testing, and I am so sorry to disappoint you.

sure, and never mind. thank you for your work! this would be the perfect addition for my workflow.

hope this is, what you asked for: this is from the ungoogled-chromium:

vendor.js:2 Uncaught (in promise) ReferenceError: WebAssembly is not defined
    at e.exports [as default] (vendor.js:2:166816)
    at popup.js:1:2176
    at Generator.next (<anonymous>)
    at popup.js:1:372
    at new Promise (<anonymous>)
    at r (popup.js:1:165)
    at L (popup.js:1:2096)
    at v.<anonymous> (popup.js:1:5662)
    at Generator.next (<anonymous>)
    at popup.js:1:372

I additionally installed the orignal chrome from debian repo, which gives a different message: Version 115.0.5790.110 (Official Build) unknown (64-Bit)

popup.js:1     POST https://cdb.xxx.xxx:5985/obsidian_numbero-uno/_all_docs 404 (Not Found)
(anonymous) @ popup.js:1
(anonymous) @ popup.js:1
r @ popup.js:1
_fetch @ popup.js:1
(anonymous) @ popup.js:1
(anonymous) @ popup.js:1
r @ popup.js:1
_fetchJson @ popup.js:1
(anonymous) @ popup.js:1
(anonymous) @ popup.js:1
r @ popup.js:1
_collectChunks @ popup.js:1
(anonymous) @ popup.js:1
s @ popup.js:1
Promise.then (async)
c @ popup.js:1
s @ popup.js:1
Promise.then (async)
c @ popup.js:1
(anonymous) @ popup.js:1
r @ popup.js:1
put @ popup.js:1
(anonymous) @ popup.js:1
(anonymous) @ popup.js:1
s @ popup.js:1
(anonymous) @ popup.js:1
popup.js:1 Uncaught (in promise) Error: API Error (_all_docs)
    at v.<anonymous> (popup.js:1:3469)
    at Generator.next (<anonymous>)
    at s (popup.js:1:222)
(anonymous) @ popup.js:1
s @ popup.js:1
Promise.then (async)
c @ popup.js:1
(anonymous) @ popup.js:1
s @ popup.js:1
(anonymous) @ popup.js:1

and HA-Proxy on my VPS in front of obsreceiver logs:

Jul 31 13:51:19 storefe haproxy[379451]: 183.182.110.6:5175 [31/Jul/2023:13:51:19.286] obsreceiver~ obsreceiver/obsreceiver1 0/0/2/10/12 404 158 - - ---- 3/2/0/0/0 0/0 "POST /obsidian_numbero-uno/_all_docs HTTP/1.1"
Jul 31 13:53:49 storefe haproxy[379451]: 183.182.110.6:5176 [31/Jul/2023:13:51:18.993] obsreceiver~ obsreceiver/<NOSRV> -1/-1/-1/-1/150327 408 237 - - cR-- 2/1/0/0/0 0/0 "<BADREQ>"

BTW: obsreceiver works very well with curl & http-shotcut forwading (via clipborad) on android into a document.

vrtmrz commented 1 year ago

Thank you for the detail! It is so helpful!

According to the message, ungoogled-chromim looks do not accept to run Web assembly. It has been used for hash generation for deduplicating to keep traffic volume low. I have googled and read this, and it might be correct in some aspects. (From some other aspects, it might not be balanced with our paying). Therefore, it is an understandable configuration, but not suitable for this extension. Would you mind if I ask you to enable WebAssembly? (However, if you really need it, feel free to request the feature. Actually reasonable).

The second is surely the error notified from the clipper. This occurs when the result does not contain the necessary one. Could you please click the line which is indicated in red, at the network pane of DevTools? We can see what is actually replied in there. However, the log of the proxy says that it has been 404. It would be more reliable if you could also check there.

chymian commented 1 year ago

@vrtmrz

__ungoogled_chromium:__ I found that Webassembly is compiled in, but disabled in: chrome://flags/. what are the minumum of all the options you need enabled?

Experimental WebAssembly
Enable web pages to use experimental WebAssembly features. – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

[#enable-experimental-webassembly-features](chrome://flags/#enable-experimental-webassembly-features)
Disabled

Experimental WebAssembly JavaScript Promise Integration (JSPI)
Enable web pages to use experimental WebAssembly JavaScript Promise Integration (JSPI) API. – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

[#enable-experimental-webassembly-stack-switching](chrome://flags/#enable-experimental-webassembly-stack-switching)
Default

WebAssembly baseline compiler
Enables WebAssembly baseline compilation and tier up. – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

[#enable-webassembly-baseline](chrome://flags/#enable-webassembly-baseline)
Default

WebAssembly Garbage Collection
Enables the experimental Garbage Collection (GC) extensions to WebAssembly. – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

[#enable-webassembly-garbage-collection](chrome://flags/#enable-webassembly-garbage-collection)
Default

WebAssembly lazy compilation
Enables lazy (JIT on first call) compilation of WebAssembly modules. – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

[#enable-webassembly-lazy-compilation](chrome://flags/#enable-webassembly-lazy-compilation)
Default

WebAssembly Relaxed SIMD
Enables the use of WebAssembly vector operations with relaxed semantics – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

[#enable-webassembly-relaxed-simd](chrome://flags/#enable-webassembly-relaxed-simd)
Default

WebAssembly tiering
Enables tiered compilation of WebAssembly (will tier up to TurboFan if #enable-webassembly-baseline is enabled). – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

[#enable-webassembly-tiering](chrome://flags/#enable-webassembly-tiering)
Default

Secure Payment Confirmation Debug Mode
This flag removes the restriction that PaymentCredential in WebAuthn and secure payment confirmation in PaymentRequest API must use user verifying platform authenticators. – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

[#enable-debug-for-secure-payment-confirmation](chrome://flags/#enable-debug-for-secure-payment-confirmation)
Default

Insecure origins treated as secure
Treat given (insecure) origins as secure origins. Multiple origins can be supplied as a comma-separated list. Origins must have their protocol specified e.g. "http://example.com". For the definition of secure contexts, see https://w3c.github.io/webappsec-secure-contexts/ – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

original debian chrome:

enlightment:

since it's called webclip for OBS-livesync I assumed, it hast to connect to the obsreceiver – which was uttrly wrong, as I found out: connecting the browser-plugin directly to the couchdb/proxy works - more or less. with no E2EE encryption password, it saves the file & attachements.

I'm very sorry for this missconception in my thinking, which created unnecessary workload for you. It happened, when I was new to OBS & all the plugins. so when I started the setup, I was flooded with all kind of information and due to lack of docu, I made the wrong conclusion after setting up couchdb, obsreceiver & livesync, I thought it attaches to the same endpoint.

can you pls. write a little bit of how-to in the git README & the plugin description you see in the browser? and how should the E2EE play into that? enabling it, does stop the functionality.

IMHO: the clipped files are not really readable, with all the clutter of sidebars, footer, etc. may I suggest to have a look at how wallabag does it. it hast the "perfect" html2md extraction.

pls. see https://github.com/wallabag/wallabag

Contributing ... Content extraction relies on Graby, php-readability and ftr-site-config.