Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work correctly in Linux #188

Open
Asten-Valentinus opened this issue Sep 12, 2024 · 3 comments
Open

Doesn't work correctly in Linux #188

Asten-Valentinus opened this issue Sep 12, 2024 · 3 comments

Comments

@Asten-Valentinus
Copy link

Asten-Valentinus commented Sep 12, 2024

I've tried to use this with ReadItLater and the Obsidian Web Clipper browser extension, but it doesn't seem to do anything when the URI is passed to it. I know I configured the browser extension as instructed, but it doesn't work.

This is related to the following issue on the Web Clipper: Issue 11 on Obsidian Web Clipper

EDIT: I'm using a Linux distro (NixOS) along with the Firefox fork Librewolf, and while the changes in the browser shouldn't change anything, the web clipper issue describes that this is specific to Linux.

@slarrain
Copy link

Same here.

@Vinzent03
Copy link
Owner

Please elaborate your situation more. Is Obsidian already open? If not does Obsidian start? Does the Browser ask you to launch the uri or have you clicked to always allow opening Obsidian uris. Please share the content of the console (CTRL+SHIFT+I) after executing the uri from the browser. If it does not contain the uri and the parsed query parameters, the issues does not lie in this plugin. Do the default Obsidian uris work?

@Asten-Valentinus
Copy link
Author

When I have obsidian closed and use the web clipping shortcut, it launches obsidian as expected (without saving site)

This URI from the docs seems to work (running directly from Obsidian):
[This here is shown](obsidian://adv-uri?filepath=Home%20Index%2Ftoday)

Testing, the ReadItLater URI save link seems to work when run directly in Obsidian:
[Save webpage from clipboard](obsidian://advanced-uri?commandname=ReadItLater%3A%20Save%20clipboard)
or
[Save webpage from clipboard](obsidian://advanced-uri?vault=Obsidian%20Vault&commandname=ReadItLater%3A%20Save%20clipboard)

Checking the console, I found the following error (after running with browser extension link):

app.js:1 Obsidian Developer Console
node:electron/js2c/renderer_init:2 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
  Policy set or a policy with "unsafe-eval" enabled. This exposes users of
  this app to unnecessary security risks.

For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
warnAboutInsecureCSP @ node:electron/js2c/renderer_init:2
app.js:1 Received URL action Object
app.js:1 Uncaught (in promise) Error: Request failed, status 403
    at new t (app.js:1:2030716)
    at vK (app.js:1:2030908)
    at app.js:1:2031587
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)
app.js:1 Received URL action Objectaction: "adv-uri"filepath: "Home Index/today.md"[[Prototype]]: Object
app.js:1 Received URL action Objectaction: "advanced-uri"commandname: "ReadItLater: Save clipboard"vault: "Obsidian Vault"[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
plugin:obsidian-read-it-later:146 Uncaught (in promise) DOMException: Failed to execute 'readText' on 'Clipboard': Document is not focused.
    at Rt.processClipboard (plugin:obsidian-read-it-later:146:2908)
    at Object.callback (plugin:obsidian-read-it-later:146:2444)
    at te.handleCommand (plugin:obsidian-advanced-uri:10:604)
    at ge.chooseHandler (plugin:obsidian-advanced-uri:14:6726)
    at ge.onUriCall (plugin:obsidian-advanced-uri:14:6436)
    at eval (plugin:obsidian-advanced-uri:14:4534)
    at t (app://obsidian.md/app.js:1:2281449)
    at <anonymous>:1:52
    at node:electron/js2c/renderer_init:2:16470
    at IpcRendererInternal.<anonymous> (node:electron/js2c/renderer_init:2:10723)

The error seems to be coming from ReadItLater! I'll open an issue there as well: Issue 173 on ReadItLater

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants