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

Load error! (too much recursion) #1077

Closed
WKSu opened this issue Jun 2, 2020 · 6 comments
Closed

Load error! (too much recursion) #1077

WKSu opened this issue Jun 2, 2020 · 6 comments

Comments

@WKSu
Copy link

WKSu commented Jun 2, 2020

Hi,

It seems I am unable to load certain trees in my database anymore due to a load error caused by too much recursion. I am still able to export this and see my content, however, I would be interested in what is causing this so I can prevent it in the future. Here are some details:
image.

I am not sure what is causing this but it seems to have occured after I updated to 0.42.4 from 0.40.3

I am using Trillium 0.42.4. It is a similar issue as this one, so I will provide the same logs.
image
image

backend_log.txt

Creating a backup and reading from that did not seem to solve the issue. I am also unable to open / edit the notes in this tree to alter it but I suspect there are some weird linkings going on between them. Any idea on how to solve this? Thanks!

@zadam
Copy link
Owner

zadam commented Jun 2, 2020

Hello, thank you reporting this issue!

The log does not really have anything suspicious but the "too much recursion" could suggest that there is some kind of cycle in the note graph.

It would be extremely helpful if you could create an anonymized database and send it to zadam.apps@gmail.com. Just click on the button here:

And go to the ~/trilium-data/anonymized/ and take the DB file there. This file retains the structure of the note tree but deletes (and VACUUMs) all the data and metadata.

Since I won't see the "Literature" title, I can't identify the problematic node - what noteId does it have? You can see that in Note Actions -> Show note info.

Thank you!

@WKSu
Copy link
Author

WKSu commented Jun 2, 2020

Hi Zadam,

Thanks for the fast reply! Unfortunately, I am getting another error when I try to anonymize my database. I am not sure how to define a filename or should I try the new trilium update?

image

21:56:01.221 INFO ERROR: JS Error: Error when calling POST anonymization/anonymize: error - Internal Server Error
21:56:40.309 INFO GET /api/options
21:56:40.342 INFO GET /api/options/user-themes
21:56:40.342 INFO GET /api/keyboard-actions
21:56:43.276 INFO POST /api/anonymization/anonymize
21:56:43.320 INFO ERROR: Error executing transaction, executing rollback. Inner stack: Error: sqlite: filename is not defined
at /home/kevin/Projects/trilium-linux-x64-server/node_modules/sqlite/build/Database.js:34:23
at new Promise ()
at Database.open (/home/kevin/Projects/trilium-linux-x64-server/node_modules/sqlite/build/Database.js:31:16)
at Object.open (/home/kevin/Projects/trilium-linux-x64-server/node_modules/sqlite/build/index.js:13:14)
at Object.anonymize (/home/kevin/Projects/trilium-linux-x64-server/src/services/anonymization.js:17:29)
at anonymize (/home/kevin/Projects/trilium-linux-x64-server/src/routes/api/anonymization.js:6:25)
at /home/kevin/Projects/trilium-linux-x64-server/src/routes/routes.js:92:38
at /home/kevin/Projects/trilium-linux-x64-server/src/services/sql.js:224:25
Outside stack: Error
at Object.transactional (/home/kevin/Projects/trilium-linux-x64-server/src/services/sql.js:215:23)
at /home/kevin/Projects/trilium-linux-x64-server/src/routes/routes.js:91:38
at /home/kevin/Projects/trilium-linux-x64-server/node_modules/cls-hooked/context.js:118:13
at Namespace.run (/home/kevin/Projects/trilium-linux-x64-server/node_modules/cls-hooked/context.js:97:5)
at Namespace.runAndReturn (/home/kevin/Projects/trilium-linux-x64-server/node_modules/cls-hooked/context.js:117:8)
at Object.init (/home/kevin/Projects/trilium-linux-x64-server/src/services/cls.js:5:28)
at /home/kevin/Projects/trilium-linux-x64-server/src/routes/routes.js:85:38
at Layer.handle [as handle_request] (/home/kevin/Projects/trilium-linux-x64-server/node_modules/express/lib/router/layer.js:95:5)
at next (/home/kevin/Projects/trilium-linux-x64-server/node_modules/express/lib/router/route.js:137:13)
at csrf (/home/kevin/Projects/trilium-linux-x64-server/node_modules/csurf/index.js:117:5)
21:56:43.333 INFO ERROR: post /api/anonymization/anonymize threw exception: Error: sqlite: filename is not defined
at /home/kevin/Projects/trilium-linux-x64-server/node_modules/sqlite/build/Database.js:34:23
at new Promise ()
at Database.open (/home/kevin/Projects/trilium-linux-x64-server/node_modules/sqlite/build/Database.js:31:16)
at Object.open (/home/kevin/Projects/trilium-linux-x64-server/node_modules/sqlite/build/index.js:13:14)
at Object.anonymize (/home/kevin/Projects/trilium-linux-x64-server/src/services/anonymization.js:17:29)
at anonymize (/home/kevin/Projects/trilium-linux-x64-server/src/routes/api/anonymization.js:6:25)
at /home/kevin/Projects/trilium-linux-x64-server/src/routes/routes.js:92:38
at /home/kevin/Projects/trilium-linux-x64-server/src/services/sql.js:224:25
21:56:43.342 INFO ERROR: JS Error: Error when calling POST anonymization/anonymize: error - Internal Server Error
21:57:42.329 INFO GET /api/backend-log

@zadam
Copy link
Owner

zadam commented Jun 3, 2020

Hello, looks like the anonymization had a bug - I just released 0.42.6 which should fix that - could you download that release and try anonymization again?

I appreciate your help!

@zadam zadam closed this as completed in 1502b9c Jun 4, 2020
@zadam
Copy link
Owner

zadam commented Jun 4, 2020

Hello, with the help of your anonymized database I could figure out the issue - the problem was with the fact that you had a template note which was a child/descendant of its own template instance. This created attribute inheritance cycle. This situation is valid, but sort of unexpected so I did not test it before.

Anyway I added the protection to the code to avoid this kind of cycle and I will be releasing it soon.

Thank you for your help! It's really important to fix these kind of blocker issues.

@zadam
Copy link
Owner

zadam commented Jun 8, 2020

Fix should be in v0.42.7

@WKSu
Copy link
Author

WKSu commented Jun 9, 2020

Thanks, can confirm it works now on my end! Much appreciate all the work you put into Trillium and it really shows as it is an amazing knowledge database!

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

2 participants