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

Open note externally does not work on Flatpak builds #54

Closed
CrO2Cl2 opened this issue Apr 15, 2024 · 3 comments
Closed

Open note externally does not work on Flatpak builds #54

CrO2Cl2 opened this issue Apr 15, 2024 · 3 comments

Comments

@CrO2Cl2
Copy link
Member

CrO2Cl2 commented Apr 15, 2024

Trilium Version

0.63.5

What operating system are you using?

Other Linux

What is your setup?

Local + server sync

Operating System Version

Zorin OS 17.1

Description

Since I remember using Trilium on the flathub build, the "open note externally" feature has never worked. This is probably because of the permissions the flatpak has.

If it is not possible to give the flatpak the permissions to use this feature, we should at least tell the user that this feature is not available for the flatpak, so that the user does not think that this is a problem on their side.

Error logs

No response

@pano9000
Copy link
Member

pano9000 commented Feb 7, 2025

I can confirm this happens locally with the v0.91.6 as well.
However I can see the following error being output in the console:

Error: EMFILE: too many open files, watch '/var/tmp/tmp-3-0VpaCASEYD3c-School schedule.html'
    at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
    at watch (node:fs:2490:36)
    at createFsWatchInstance (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:126:16)
    at setFsWatchListener (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:171:19)
    at NodeFsHandler._watchWithNodeFs (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:325:22)
    at NodeFsHandler._handleFile (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:391:29)
    at NodeFsHandler._addToNodeFs (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:615:31)
    at file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/index.js:343:25
    at async Promise.all (index 0) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  path: '/var/tmp/tmp-3-0VpaCASEYD3c-School schedule.html',
  filename: '/var/tmp/tmp-3-0VpaCASEYD3c-School schedule.html'
}
Error: EMFILE: too many open files, watch '/var/tmp/tmp-3-0VpaCASEYD3c-School schedule.html'
    at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
    at watch (node:fs:2490:36)
    at createFsWatchInstance (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:126:16)
    at setFsWatchListener (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:171:19)
    at NodeFsHandler._watchWithNodeFs (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:325:22)
    at NodeFsHandler._handleFile (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:391:29)
    at NodeFsHandler._addToNodeFs (file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/handler.js:615:31)
    at file:///app/lib/com.github.triliumnext.notes/resources/app.asar/node_modules/chokidar/esm/index.js:343:25
    at async Promise.all (index 0) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  path: '/var/tmp/tmp-3-0VpaCASEYD3c-School schedule.html',
  filename: '/var/tmp/tmp-3-0VpaCASEYD3c-School schedule.html'
}

and it being printed twice is not a copy/paste mistake :-)

@pano9000 pano9000 changed the title (Bug report) Open note externally Open note externally does not work on Flatpak builds Feb 7, 2025
@mattiklock
Copy link

FWIW, I have made "Open Note Externally" work on 0.63.7 by running it like so:

TMPDIR=$(mktemp -d)

flatpak run --filesystem=$TMPDIR --env=TMPDIR=$TMPDIR com.github.zadam.trilium 

@eliandoran
Copy link
Contributor

Fixed in 0f28bbb.

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

4 participants