Coder Social home page Coder Social logo

goniszewski / grimoire Goto Github PK

View Code? Open in Web Editor NEW
1.6K 7.0 52.0 5.33 MB

Bookmark manager for the wizards πŸ§™

Home Page: https://grimoire.pro

License: MIT License

JavaScript 6.26% CSS 0.02% HTML 0.14% TypeScript 32.21% Svelte 60.79% Dockerfile 0.48% Shell 0.09%
bookmarks bookmarks-manager pocketbase sveltekit tailwindcss svellte self-hosted typescript

grimoire's People

Contributors

babariviere avatar dependabot[bot] avatar goniszewski avatar jonrick avatar whereistejas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

grimoire's Issues

Docker image without needing source

In order to simplify installation, it would be great to be able to use the docker image without needing to clone the repository. Ideally, the image would also include and apply all the pocketbase migrations at startup, so that those files aren't required either.

Handle relative URL's while fetching images for new bookmark

Describe the bug
Some URLs have only the filename of an image being parsed by get-metadata.ts (like favicon.icon). It causes an unhandled error when addNewBookmark action tries to fetch it here:

if (main_image_url || icon_url) {
.

To Reproduce
Steps to reproduce the behavior:

  1. Add new bookmark with URL https://news.ycombinator.com/
  2. It should fail with errors Error: Not found: /favicon.ico and Error: Cannot use relative URL (favicon.ico) with global fetch β€” use event.fetch instead: https://kit.svelte.dev/docs/web-standards#fetch-apis

Expected behavior
In get-metadata.ts all relative URLs for images should be replaced with absolute ones, if possible. The addNewBookmark should gracefully handle any failed attempts for fetching images.

How can I help?

I've been watching this project with great interest since you posted about it on reddit and I'd like to help make some of the roadmap features a reality. Are there features you're working on currently that you'd like help with QA on? Are there features you know you're not going to tackle in the immediate that you'd like me or others to start on? Thanks for open sourcing all your time and effort!

Browser Addon and SSO

Great Project.

If you are creating a browser-addon, please keep in mind that people (like me) are using it for sites that are protected by basic auth/sso (like authentik)

Social bookmarking on the Fediverse

Cool project, found via HN. Since you are already having account management, Social bookmarking seems like a small step away. Recently Postmarks was launched with Fediverse support, and very well received. You may consider adding ActivityPub support and be interoperable with Postmarks and other apps on the Fediverse (like Mastodon and Lemmy). It that doesn't interest you, feel free to close the issue.. I'm just providing a showerthought idea.. πŸ€—

ClientResponseError 0: The request was autocancelled.

Describe the bug
Docker compose starts up just fine, however as soon as you hit the web URL, I get a 500 Internal Error

To Reproduce

  1. git clone https://github.com/goniszewski/grimoire
  2. docker-compose up

Expected behavior
The containers should start, and I should be able to hit the URL and view the application

Screenshots
Error:

 docker-compose logs | more
/usr/lib/python3.12/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (2.0.7) or chardet (5.2.0)/charset_normalizer (3.2.0) doesn't match a supported version!
  warnings.warn(
Attaching to grimoire, grimoire-pocketbase
grimoire      | Listening on 0.0.0.0:5173
grimoire      | ClientResponseError 0: The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.
grimoire      |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire      |     at async load (file:///app/build/server/chunks/0-546e495e.js:32:24)
grimoire      |     at async load_server_data (file:///app/build/server/index.js:1186:18)
grimoire      |     at async file:///app/build/server/index.js:2557:18 {
grimoire      |   url: '',
grimoire      |   status: 0,
grimoire      |   response: {},
grimoire      |   isAbort: true,
grimoire      |   originalError: DOMException [AbortError]: This operation was aborted
grimoire      |       at fetch (file:///app/build/shims.js:20346:13)
grimoire      |       at async load (file:///app/build/server/chunks/0-546e495e.js:32:24)
grimoire      |       at async load_server_data (file:///app/build/server/index.js:1186:18)
grimoire      |       at async file:///app/build/server/index.js:2557:18
grimoire      | }

image

Desktop (please complete the following information):

  • OS: Fedora Linux 39
  • Browser: Vivaldi
  • Version: 6.5.3206.55 (Stable channel) (64-bit)

Feature: allow disabling registration

Is your feature request related to a problem? Please describe.
I would like to use my grimoire instance as a single user one. This would allow me to expose it to the internet without having random people create user on this instance.

Describe the solution you'd like
The best solution would be to set an environment variable to enable registration or not (e.g. Gitea does it this way: https://docs.gitea.com/next/administration/config-cheat-sheet#service-service DISABLE_REGISTRATION).

Describe alternatives you've considered
One hacky way was to do it using this solution:
pocketbase/pocketbase#3488 (comment)

Additional context

support sqlite?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Error with .env file

Describe the bug
Error regarding .env file

To Reproduce
Here is my compose file

version: '3.7'
services:
pocketbase:
image: spectado/pocketbase:0.19.2
container_name: grimoire-pocketbase
restart: unless-stopped
ports:
- '8091:80'
volumes:
- /mnt/user/appdata/grimoire/pb_data:/pb_data
- /mnt/user/appdata/grimoire/pb_migrations:/pb_migrations/
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8091/api/health || exit 1
interval: 5s
timeout: 5s
retries: 5
env_file: .env
grimoire:
image: goniszewski/grimoire:latest
container_name: grimoire
restart: unless-stopped
env_file: .env
build:
context: .
dockerfile: Dockerfile
ports:
- '5173:5173'
depends_on:
- pocketbase

Desktop (please complete the following information):

  • OS: Unraid
  • Browser Edge
  • Version [

Additional context
I'm trying to deploy this using portainer but I get this error message

Deployment error
failed to deploy a stack: Failed to load /data/compose/47/.env: open /data/compose/47/.env: no such file or directory

After first install login not possible with initial user "Incorrect credentials"

Describe the bug
docker-compose up "install" produces non working instance, no idea how to login when all i get is Incorrect credentials.

% grep -v '^#' .env
PUBLIC_POCKETBASE_URL=
[email protected]
ROOT_ADMIN_PASSWORD=test123
ORIGIN=http://localhost:5173
PUBLIC_HTTPS_ONLY=
PORT=5173
PUBLIC_SIGNUP_DISABLED=false
% docker compose up
[+] Running 2/2
 βœ” Container grimoire-pocketbase  Recreated                                                                                                0.1s
 βœ” Container grimoire             Recreated                                                                                                0.1s
Attaching to grimoire, grimoire-pocketbase
grimoire-pocketbase  | 2024/01/06 03:26:54 Server started at http://0.0.0.0:80
grimoire-pocketbase  | β”œβ”€ REST API: http://0.0.0.0:80/api/
grimoire-pocketbase  | └─ Admin UI: http://0.0.0.0:80/_/
grimoire             | Listening on 0.0.0.0:5173
grimoire             | { invalid: true }
grimoire             | { invalid: true }

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/goniszewski/grimoire
  2. edit .env
  3. docker compose up
  4. go to http://localhost:5173/login, try to login -> invalid credentials with the pw defined from .env

Expected behavior
be able to login with the email/pw defined in .env

Screenshots
image

Desktop (please complete the following information):

  • OS: debian sid
  • Browser chrome
  • Version 120.0.6099.129 (Official Build) (64-bit)

Bookmark images are fetched from 127.0.0.1 only

It appears that bookmark images are hardcoded to fetch from 127.0.0.1 with no way to configure the actual pocketbase url.

Screenshot 2023-11-26 124014

I have confirmed that the application url is set correctly in pocketbase's settings.

History Sync

Is your feature request related to a problem? Please describe.
There's no single self-hosted sync server that takes care of browsinghistory. Except for Firefox Sync server.

Describe the solution you'd like
For Grimoire to sync browsing history.

Describe alternatives you've considered
Firefox Sync server, which has lots of issues and it's hard to properly set up.

Grimoire web app is showing outdated information for Settings and Bookmarks

Describe the bug
After deleting a bookmark or changing settings, the webapp does not update the view until the page is refreshed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to settings, toggle animations off.
  2. Click on the "Back to Home" button
  3. Go back to settings, animations are still toggled on
  4. Refresh the page, animations are now toggled off.
  5. Similarly after deleting a bookmark, it is still present on the view until the page is refreshed.

Expected behavior
The webapp should have the latest data. You should not have to refresh to see the up to data settings or bookmarks.

Screenshots
Before refresh:
image
After refresh:
image

Desktop (please complete the following information):

  • OS: Windows 11, Grimoire running on WSL
  • Browser Firefox
  • Version 120.0.1

Let me know if you need any more information

Update search mechanism for bookmarks

Is your feature request related to a problem? Please describe.
At this very moment, bookmark search is based on items from $page.data.bookmarks (code) which can be pretty sparse thanks to page and limit parameters (code).

This is unacceptable and should be handled properly for the whole bookmark collection. Keep in mind that PocketBase doesn't support fuzzy search yet, and Fuse.js we're using is local only, so all the bookmarks should be loaded on the client/server. It can cause a significant load when dealing with large collections.

Describe the solution you'd like
I want to make the search work with all users' bookmarks. Moreover, to be efficient enough to not cause any issues with bigger bookmark counts.

Describe alternatives you've considered
We can always try to connect to the DB itself. But if there's any way to deal with this problem without bypassing PB, it would be the preferred one.

Additional context
Not atm.

Docker install is very cumbersome

It took 11 plus minutes to deploy the container only to find out it won't work locally. Do I HAVE to have it behind a reverse proxy? If so please let me know so I can test again. I hope to use this and write a review soon.

Issues seem to be with Pocketbase? When I try to log in I get this error. I followed your install guide which seems pretty basic. The install however took forever lol.

Cross-site POST form submissions are forbidden

chrome_USdVWDG5KN

Thank you!

No way to choose model in Ollama

There is nothing to choose in model dropdown

Screenshot from 2023-12-09 12-14-56

curl http://10.0.0.76:11434/
Ollama is running%  

I am not sure if ollama is expected to be working in current release.
If not, you can close the issue.

Internal server error 500

Describe the bug
The application starts itself without errors after docker-compose up:

$ docker-compose up
[+] Building 0.0s (0/0)
[+] Running 2/0
 βœ” Container grimoire-pocketbase  Created
 βœ” Container grimoire             Created
Attaching to grimoire, grimoire-pocketbase
grimoire-pocketbase  | 2024/01/23 13:15:19 Server started at http://0.0.0.0:80
grimoire-pocketbase  | β”œβ”€ REST API: http://0.0.0.0:80/api/
grimoire-pocketbase  | └─ Admin UI: http://0.0.0.0:80/_/
grimoire             | Listening on 0.0.0.0:5173

But when I try to access http://localhost:5173 I receive an error 500. The console shows an error in loop:

grimoire             | ClientResponseError 0: The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.
grimoire             |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire             |     at async load (file:///app/build/server/chunks/0-546e495e.js:32:24)
grimoire             |     at async load_server_data (file:///app/build/server/index.js:1186:18)
grimoire             |     at async file:///app/build/server/index.js:2557:18 {
grimoire             |   url: '',
grimoire             |   status: 0,
grimoire             |   response: {},
grimoire             |   isAbort: true,
grimoire             |   originalError: DOMException [AbortError]: This operation was aborted
grimoire             |       at fetch (file:///app/build/shims.js:20346:13)
grimoire             |       at async load (file:///app/build/server/chunks/0-546e495e.js:32:24)
grimoire             |       at async load_server_data (file:///app/build/server/index.js:1186:18)
grimoire             |       at async file:///app/build/server/index.js:2557:18
grimoire             | }
grimoire             | ClientResponseError 0: The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.
grimoire             |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire             |     at async load (file:///app/build/server/chunks/0-546e495e.js:32:24)
grimoire             |     at async load_server_data (file:///app/build/server/index.js:1186:18)
grimoire             |     at async respond_with_error (file:///app/build/server/index.js:2215:27)
grimoire             |     at async resolve (file:///app/build/server/index.js:3573:16)
grimoire             |     at async Object.handle (file:///app/build/server/chunks/hooks.server-6da8a1ec.js:31:20)
grimoire             |     at async respond (file:///app/build/server/index.js:3404:22)
grimoire             |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |   url: '',
grimoire             |   status: 0,
grimoire             |   response: {},
grimoire             |   isAbort: true,
grimoire             |   originalError: DOMException [AbortError]: This operation was aborted
grimoire             |       at fetch (file:///app/build/shims.js:20346:13)
grimoire             |       at async load (file:///app/build/server/chunks/0-546e495e.js:32:24)
grimoire             |       at async load_server_data (file:///app/build/server/index.js:1186:18)
grimoire             |       at async respond_with_error (file:///app/build/server/index.js:2215:27)
grimoire             |       at async resolve (file:///app/build/server/index.js:3573:16)

<continues forever>

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/goniszewski/grimoire
  2. cd grimoire
  3. docker-compose up
  4. Try to access http://localhost:5173

Expected behavior
The web application should not return an error 500.

Desktop (please complete the following information):

  • OS: WSL 2 openSUSE running on Windows 11
  • Browser Firefox
  • Version 121

Additional context
I already have other docker containers running without problems in my WSL.

This is my .env:

# Set it if you're using external PocketBase installation (default: http://localhost:8090)
# Example: PUBLIC_POCKETBASE_URL=https://grimoire.mydomain.com:8090
PUBLIC_POCKETBASE_URL=
# RECOMMENDED: Change this to your email
[email protected]
# RECOMMENDED: Use a secure password. Can be later changed in PocketBase's admin panel
ROOT_ADMIN_PASSWORD=123456
# Set this to your domain name (default: http://localhost:5173)
# Example: ORIGIN=grimoire.mydomain.com
ORIGIN=http://localhost:5173
# Set this to true if you're using HTTPS (default: false)
# Example: PUBLIC_HTTPS_ONLY=true
PUBLIC_HTTPS_ONLY=false
# Change to the port you want the app to listen on (default: 5173)
# Example: PORT=80
PORT=5173
# Set this to true if you want to disable public signups (default: false)
PUBLIC_SIGNUP_DISABLED=false

Import bookmarks from Shaarli

Import bookmarks from Shaarli could ease migration.

  • Ability to import ~5000 links with notes and ~1700 tags
  • Support markdown notes for links
  • Support notes without links (eg. grocery shopping list, private note, etc)
  • Support public and private notes
  • Optimize displaying entries up to 15 or more tags

Login through reverse proxy results in cross-site form submissions forbidden

When running a Caddy reverse proxy directing https://grimoire.mysite.com to localhost:5173, the login page loads fine, but after clicking submit the following error appears: Cross-site POST form submissions are forbidden

This is usually resolved by either making Grimoire aware of its own domain in a Docker variable or enabling cross-site POST in Caddy, but Grimoire shouldn't be redirecting to another domain, so the former is more likely. Enabling cross-site can be a security risk as a compromised container can redirect your login credentials to another site.

Can't build the application

Hi,
i'm trying to build the docker-compose but i t fail in the JS stacktrace, if i understand correctly.

This is the list of messages:

Building grimoire
[+] Building 285.0s (13/15) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.04kB 0.0s
=> [internal] load metadata for docker.io/library/node:20-slim 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 273B 0.0s
=> [base 1/5] FROM docker.io/library/node:20-slim 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 10.52kB 0.1s
=> CACHED [base 2/5] RUN corepack enable 0.0s
=> CACHED [base 3/5] RUN apt-get update && apt-get install -y python3 python3-pip 0.0s
=> CACHED [base 4/5] COPY . /app 0.0s
=> CACHED [base 5/5] WORKDIR /app 0.0s
=> CACHED [build 1/2] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile 0.0s
=> CACHED [prod-deps 1/1] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-loc 0.0s
=> CACHED [stage-3 1/3] COPY --from=prod-deps /app/node_modules /app/node_modules 0.0s
=> ERROR [build 2/2] RUN pnpm run build 284.7s


[build 2/2] RUN pnpm run build:
2.117
2.117 > [email protected] build /app
2.117 > vite build
2.117
5.613
5.615 vite v4.5.1 building SSR bundle for production...
5.694 transforming...
9.906
9.906 warn - As of Tailwind CSS v3.3, the @tailwindcss/line-clamp plugin is now included by default.
9.906 warn - Remove it from the plugins array in your configuration to eliminate this warning.
10.85
10.85 ╭── 🌼 daisyUI 3.9.4 https://daisyui.com
11.18 β”‚
11.18 β”œβ”€β”€ 2 themes are enabled. How to add more themes:
11.18 β”‚ https://daisyui.com/docs/themes
11.18 β”‚
11.18 ╰── πŸ’š Support daisyUI project: https://opencollective.com/daisyui
11.18
11.77
11.77 ╭── 🌼 daisyUI 3.9.4 https://daisyui.com
12.04 β”‚
12.04 β”œβ”€β”€ 2 themes are enabled. How to add more themes:
12.04 β”‚ https://daisyui.com/docs/themes
12.04 β”‚
12.04 ╰── ⭐ Star daisyUI project on GitHub: https://github.com/saadeghi/daisyui
12.04
64.97 src/routes/+page.svelte (189:13) "PUBLIC_SIGNUP_DISABLED" is not exported by "virtual:$env/static/public", imported by "src/routes/+page.svelte".
66.19 "BaseAuthStore" is imported from external module "pocketbase" but never used in "src/lib/pb.ts".
66.20 βœ“ 5036 modules transformed.
66.63 rendering chunks...
72.59 vite v4.5.1 building for production...
72.59
72.61 transforming...
283.8
283.8 <--- Last few GCs --->
283.8
283.8 [19:0x560ebd0] 276977 ms: Mark-Compact 1836.5 (1906.5) -> 1821.3 (1908.3) MB, 1863.04 / 0.21 ms (average mu = 0.207, current mu = 0.212) allocation failure; scavenge might not succeed
283.8 [19:0x560ebd0] 279277 ms: Mark-Compact 1838.0 (1908.3) -> 1822.5 (1909.8) MB, 1995.94 / 0.06 ms (average mu = 0.171, current mu = 0.132) allocation failure; scavenge might not succeed
283.8
283.8
283.8 <--- JS stacktrace --->
283.8
283.8 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
283.8 ----- Native stack trace -----
283.8
283.8 1: 0xca5430 node::Abort() [node]
283.8 2: 0xb7807d [node]
283.8 3: 0xeca0b0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
283.8 4: 0xeca397 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
283.8 5: 0x10dc0e5 [node]
283.8 6: 0x10dc674 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
283.8 7: 0x10f3564 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [node]
283.8 8: 0x10f3d7c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
283.8 9: 0x114cb3c v8::internal::MinorGCJob::Task::RunInternal() [node]
283.9 10: 0xd201a6 [node]
283.9 11: 0xd22d5f node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
283.9 12: 0x188aa33 [node]
283.9 13: 0x189f41b [node]
283.9 14: 0x188b757 uv_run [node]
283.9 15: 0xbbbb83 node::SpinEventLoopInternal(node::Environment*) [node]
283.9 16: 0xcf4d25 [node]
283.9 17: 0xcf56ed node::NodeMainInstance::Run() [node]
283.9 18: 0xc5f367 node::Start(int, char**) [node]
283.9 19: 0x7f751e2171ca [/lib/x86_64-linux-gnu/libc.so.6]
283.9 20: 0x7f751e217285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
283.9 21: 0xbb8d7e _start [node]
284.5 Aborted (core dumped)
284.5  ELIFECYCLE  Command failed with exit code 134.

Dockerfile:14

12 | FROM base AS build
13 | RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
14 | >>> RUN pnpm run build
15 |
16 | FROM base

ERROR: failed to solve: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1
ERROR: Service 'grimoire' failed to build : Build failed

Are a minimal requirements to install?
I have 4GB of memory in the system but i use less than 1GB.
I hope that someone can help me.

  • OS: Ubuntu 22.04.3 LTS x86_64
  • Browser Firefox
  • Version 121.0

ClientResponseError 400: Failed to authenticate.

Describe the bug
Can't log in.

To Reproduce
Steps to reproduce the behavior:

  1. I cloned the repo
  2. ran docker-compose --env-file .env.docker up

Expected behavior
I could log in using the credentials in .env.docker

Screenshots
Additional context

Attaching to grimoire-pocketbase, grimoire
grimoire-pocketbase | 2023/11/29 20:52:18 Server started at http://0.0.0.0:80
grimoire-pocketbase | β”œβ”€ REST API: http://0.0.0.0:80/api/
grimoire-pocketbase | └─ Admin UI: http://0.0.0.0:80/_/
grimoire      | Listening on 0.0.0.0:5173
grimoire      | ClientResponseError 400: Failed to authenticate.
grimoire      |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire      |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire      |     at async default (file:///app/build/server/chunks/7-cc1cc215.js:9:20)
grimoire      |     at async handle_action_request (file:///app/build/server/index.js:1072:18)
grimoire      |     at async render_page (file:///app/build/server/index.js:2508:23)
grimoire      |     at async resolve (file:///app/build/server/index.js:3524:24)
grimoire      |     at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire      |     at async respond (file:///app/build/server/index.js:3410:22)
grimoire      |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire      |   url: 'http://pocketbase/api/collections/users/auth-with-password',
grimoire      |   status: 400,
grimoire      |   response: { code: 400, message: 'Failed to authenticate.', data: {} },
grimoire      |   isAbort: false,
grimoire      |   originalError: {
grimoire      |     url: 'http://pocketbase/api/collections/users/auth-with-password',
grimoire      |     status: 400,
grimoire      |     data: { code: 400, message: 'Failed to authenticate.', data: {} }
grimoire      |   }
grimoire      | }
grimoire      | ClientResponseError 404: The requested resource wasn't found.
grimoire      |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire      |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire      |     at async default (file:///app/build/server/chunks/12-e50058f8.js:14:7)
grimoire      |     at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire      |     at async resolve (file:///app/build/server/index.js:3524:24)
grimoire      |     at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire      |     at async respond (file:///app/build/server/index.js:3410:22)
grimoire      |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire      |   url: 'http://pocketbase/api/collections/categories/records',
grimoire      |   status: 404,
grimoire      |   response: {
grimoire      |     code: 404,
grimoire      |     message: "The requested resource wasn't found.",
grimoire      |     data: {}
grimoire      |   },
grimoire      |   isAbort: false,

Unable to clone from git using the instructions in the README

Running the git clone command in an otherwise functioning Fedora installation results in the following:

[nico@gallus grimoire]$ git clone [email protected]:goniszewski/grimoire.git
Cloning into 'grimoire'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I was able to replicate the issue on an Arch machine as well.

Internal Server Error on User Registration in Development Mode

Describe the bug

Internal Server Error on User Registration. The default admin and password in the env.docker are also not working

To Reproduce
Steps to reproduce the behavior:

Run docker-compose --env-file .env.docker up

Sign up

And the error occurs.

Expected behavior

A user should be created with the supplied username and password.

Screenshots

image

Desktop (please complete the following information):

  • OS: Debian 11
  • Browser: Firefox-ESR
  • Version: 115.5.0esr

Additional context

ilfs@ilfs80:~/Public/grimoire$ docker compose --env-file .env.docker up
[+] Running 16/16
 βœ” pocketbase 3 layers [β£Ώβ£Ώβ£Ώ]      0B/0B      Pulled                                                                              16.4s 
   βœ” 96526aa774ef Pull complete                                                                                                   3.5s 
   βœ” b81d65e74622 Pull complete                                                                                                   4.4s 
   βœ” a6035ffe0b8d Pull complete                                                                                                   7.8s 
 βœ” grimoire 11 layers [β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώ]      0B/0B      Pulled                                                                       92.5s 
   βœ” 1f7ce2fa46ab Pull complete                                                                                                   8.4s 
   βœ” be65943961fd Pull complete                                                                                                   6.7s 
   βœ” deaa56ebdf84 Pull complete                                                                                                  13.4s 
   βœ” 75001c095b3d Pull complete                                                                                                  11.5s 
   βœ” 696f14a4770f Pull complete                                                                                                  12.1s 
   βœ” bcd4e171318c Pull complete                                                                                                  14.0s 
   βœ” e20100610709 Pull complete                                                                                                  30.2s 
   βœ” 912033d20149 Pull complete                                                                                                  18.2s 
   βœ” 4f4fb700ef54 Pull complete                                                                                                  16.5s 
   βœ” 86b0332a7a4b Pull complete                                                                                                  23.4s 
   βœ” ac31ac158758 Pull complete                                                                                                  20.9s 
[+] Running 3/3
 βœ” Network grimoire_default       Created                                                                                         0.2s 
 βœ” Container grimoire-pocketbase  Created                                                                                         6.5s 
 βœ” Container grimoire             Created                                                                                         1.9s 
Attaching to grimoire, grimoire-pocketbase
grimoire-pocketbase  | 2023/11/30 12:36:14 Server started at http://0.0.0.0:80
grimoire-pocketbase  | β”œβ”€ REST API: http://0.0.0.0:80/api/
grimoire-pocketbase  | └─ Admin UI: http://0.0.0.0:80/_/
grimoire             | Listening on 0.0.0.0:5173
grimoire             | Error: Not found: /favicon.ico
grimoire             |     at resolve (file:///app/build/server/index.js:3585:18)
grimoire             |     at resolve (file:///app/build/server/index.js:3412:34)
grimoire             |     at Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:26)
grimoire             |     at respond (file:///app/build/server/index.js:3410:43)
^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...
[+] Stopping 2/2
 βœ” Container grimoire             Stopped                                                                                        11.6s 
 βœ” Container grimoire-pocketbase  Stopped                                                                                         1.2s 
canceled

ilfs@ilfs80:~/Public/grimoire$ docker compose --env-file .env.docker up
[+] Running 2/2
 βœ” Container grimoire-pocketbase  Running                                                                                         0.0s 
 βœ” Container grimoire             Recreated                                                                                       1.0s 
Attaching to grimoire, grimoire-pocketbase
grimoire             | Listening on 0.0.0.0:5173
grimoire             | Error: Not found: /favicon.ico
grimoire             |     at resolve (file:///app/build/server/index.js:3585:18)
grimoire             |     at resolve (file:///app/build/server/index.js:3412:34)
grimoire             |     at Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:26)
grimoire             |     at respond (file:///app/build/server/index.js:3410:43)
grimoire             | ClientResponseError 0: Something went wrong while processing your request.
grimoire             |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire             |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |     at async default (file:///app/build/server/chunks/7-ca624c92.js:9:20)
grimoire             |     at async handle_action_request (file:///app/build/server/index.js:1072:18)
grimoire             |     at async render_page (file:///app/build/server/index.js:2508:23)
grimoire             |     at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |     at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |     at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |   url: '',
grimoire             |   status: 0,
grimoire             |   response: {},
grimoire             |   isAbort: false,
grimoire             |   originalError: TypeError: fetch failed
grimoire             |       at fetch (file:///app/build/shims.js:20346:13)
grimoire             |       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |       at async default (file:///app/build/server/chunks/7-ca624c92.js:9:20)
grimoire             |       at async handle_action_request (file:///app/build/server/index.js:1072:18)
grimoire             |       at async render_page (file:///app/build/server/index.js:2508:23)
grimoire             |       at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |       at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |       at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |       at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |     cause: Error: connect ECONNREFUSED 127.0.0.1:8090
grimoire             |         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
grimoire             |       errno: -111,
grimoire             |       code: 'ECONNREFUSED',
grimoire             |       syscall: 'connect',
grimoire             |       address: '127.0.0.1',
grimoire             |       port: 8090
grimoire             |     }
grimoire             |   }
grimoire             | }
grimoire             | ClientResponseError 0: Something went wrong while processing your request.
grimoire             |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire             |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |     at async default (file:///app/build/server/chunks/7-ca624c92.js:9:20)
grimoire             |     at async handle_action_request (file:///app/build/server/index.js:1072:18)
grimoire             |     at async render_page (file:///app/build/server/index.js:2508:23)
grimoire             |     at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |     at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |     at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |   url: '',
grimoire             |   status: 0,
grimoire             |   response: {},
grimoire             |   isAbort: false,
grimoire             |   originalError: TypeError: fetch failed
grimoire             |       at fetch (file:///app/build/shims.js:20346:13)
grimoire             |       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |       at async default (file:///app/build/server/chunks/7-ca624c92.js:9:20)
grimoire             |       at async handle_action_request (file:///app/build/server/index.js:1072:18)
grimoire             |       at async render_page (file:///app/build/server/index.js:2508:23)
grimoire             |       at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |       at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |       at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |       at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |     cause: Error: connect ECONNREFUSED 127.0.0.1:8090
grimoire             |         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
grimoire             |       errno: -111,
grimoire             |       code: 'ECONNREFUSED',
grimoire             |       syscall: 'connect',
grimoire             |       address: '127.0.0.1',
grimoire             |       port: 8090
grimoire             |     }
grimoire             |   }
grimoire             | }
grimoire             | ClientResponseError 0: Something went wrong while processing your request.
grimoire             |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire             |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |     at async default (file:///app/build/server/chunks/12-82d76df8.js:12:7)
grimoire             |     at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire             |     at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |     at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |     at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |   url: '',
grimoire             |   status: 0,
grimoire             |   response: {},
grimoire             |   isAbort: false,
grimoire             |   originalError: TypeError: fetch failed
grimoire             |       at fetch (file:///app/build/shims.js:20346:13)
grimoire             |       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |       at async default (file:///app/build/server/chunks/12-82d76df8.js:12:7)
grimoire             |       at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire             |       at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |       at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |       at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |       at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |     cause: Error: connect ECONNREFUSED 127.0.0.1:8090
grimoire             |         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
grimoire             |       errno: -111,
grimoire             |       code: 'ECONNREFUSED',
grimoire             |       syscall: 'connect',
grimoire             |       address: '127.0.0.1',
grimoire             |       port: 8090
grimoire             |     }
grimoire             |   }
grimoire             | }
grimoire             | ClientResponseError 0: Something went wrong while processing your request.
grimoire             |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire             |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |     at async default (file:///app/build/server/chunks/12-82d76df8.js:12:7)
grimoire             |     at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire             |     at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |     at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |     at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |   url: '',
grimoire             |   status: 0,
grimoire             |   response: {},
grimoire             |   isAbort: false,
grimoire             |   originalError: TypeError: fetch failed
grimoire             |       at fetch (file:///app/build/shims.js:20346:13)
grimoire             |       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |       at async default (file:///app/build/server/chunks/12-82d76df8.js:12:7)
grimoire             |       at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire             |       at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |       at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |       at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |       at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |     cause: Error: connect ECONNREFUSED 127.0.0.1:8090
grimoire             |         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
grimoire             |       errno: -111,
grimoire             |       code: 'ECONNREFUSED',
grimoire             |       syscall: 'connect',
grimoire             |       address: '127.0.0.1',
grimoire             |       port: 8090
grimoire             |     }
grimoire             |   }
grimoire             | }
grimoire             | ClientResponseError 0: Something went wrong while processing your request.
grimoire             |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire             |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |     at async default (file:///app/build/server/chunks/12-82d76df8.js:12:7)
grimoire             |     at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire             |     at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |     at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |     at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |   url: '',
grimoire             |   status: 0,
grimoire             |   response: {},
grimoire             |   isAbort: false,
grimoire             |   originalError: TypeError: fetch failed
grimoire             |       at fetch (file:///app/build/shims.js:20346:13)
grimoire             |       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |       at async default (file:///app/build/server/chunks/12-82d76df8.js:12:7)
grimoire             |       at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire             |       at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |       at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |       at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |       at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |     cause: Error: connect ECONNREFUSED 127.0.0.1:8090
grimoire             |         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
grimoire             |       errno: -111,
grimoire             |       code: 'ECONNREFUSED',
grimoire             |       syscall: 'connect',
grimoire             |       address: '127.0.0.1',
grimoire             |       port: 8090
grimoire             |     }
grimoire             |   }
grimoire             | }
grimoire             | ClientResponseError 0: Something went wrong while processing your request.
grimoire             |     at file:///app/node_modules/.pnpm/[email protected]/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31144
grimoire             |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |     at async default (file:///app/build/server/chunks/12-82d76df8.js:12:7)
grimoire             |     at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire             |     at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |     at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |     at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |     at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |   url: '',
grimoire             |   status: 0,
grimoire             |   response: {},
grimoire             |   isAbort: false,
grimoire             |   originalError: TypeError: fetch failed
grimoire             |       at fetch (file:///app/build/shims.js:20346:13)
grimoire             |       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
grimoire             |       at async default (file:///app/build/server/chunks/12-82d76df8.js:12:7)
grimoire             |       at async handle_action_json_request (file:///app/build/server/index.js:997:18)
grimoire             |       at async resolve (file:///app/build/server/index.js:3524:24)
grimoire             |       at async Object.handle (file:///app/build/server/chunks/hooks.server-13110f1a.js:31:20)
grimoire             |       at async respond (file:///app/build/server/index.js:3410:22)
grimoire             |       at async Array.ssr (file:///app/build/handler.js:1221:3) {
grimoire             |     cause: Error: connect ECONNREFUSED 127.0.0.1:8090
grimoire             |         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
grimoire             |       errno: -111,
grimoire             |       code: 'ECONNREFUSED',
grimoire             |       syscall: 'connect',
grimoire             |       address: '127.0.0.1',
grimoire             |       port: 8090
grimoire             |     }
grimoire             |   }
grimoire             | }


Feature ideas

Feature parity to Shaarli:

  • See also #8
  • Install as PWA (progressive webapp) on Android
  • Share into Grimoire on Android and/or an Android app like Shaarlier
  • Parameterized share link that can be used for bookmarklets or custom scripts (eg. ?url=...&title=...&note=...&...)
  • If a link has already been shared, load the existing data as edit
  • Local storage entry edit backup (in case the browser crashes, the submit fails, etc, the possibility to go back to the edit form with the last unsaved state, very useful for notes) (similar)
  • Search in tags with multiple match (eg. "android app opensource" meaning a match for 3 tags) or in the whole entry

I added checkboxes in case something is already supported

Adding/loading bookmarks doesn't work correctly with custom domain

          > With commit [d485055](https://github.com/goniszewski/grimoire/commit/d485055081a5d191a6782a3363e13c8dce8cc97b) I was successful in launching the app via `docker compose up` for external IP, domain as well as simply local deployment. Moreover, this commit fixes an issue with invalid URLs for files stored by PocketBase.

I hope it will work for you guys just fine this time. Please inform me if that's the case, or if there are any issues or questions related to new/updated environment variables. And also, please accept my apologies for this mess!

It worked for me, but there are still a few issues I observe.

  1. After creating a user, I get a 500 error one single time with the same TypeError: Cannot read properties of null (reading 'id') error. But after refreshing I'm logged in.

  2. Adding a new bookmark just freezes after the spinning circle to grab the meta data. I can, however, press enter again at the URL box to save it.

  3. Saving the bookmark does not add the bookmark to the bookmarks page automatically. I had to manually refresh again to see it appear.

  4. The new bookmark has no meta data, only the URL and HTML code is saved. Images, titles etc are not saved, this is presumably due to error number 2.

Originally posted by @maya329 in #12 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.