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

(Bug report) Widget initialization failed #511

Closed
openapphub opened this issue Oct 23, 2024 · 5 comments
Closed

(Bug report) Widget initialization failed #511

openapphub opened this issue Oct 23, 2024 · 5 comments

Comments

@openapphub
Copy link

TriliumNext Version

0.90.8

What operating system are you using?

macOS

What is your setup?

Local + server sync

Operating System Version

macOs Sonoma 14.4

Description

Open a new note or open the client prompt: Widget initialization failed

A lot of pop-ups will appear:

The widget titled "" could not be initialized for the following reason:

this.element.getAttribute is not a function

bootstrap.Dropdown.getOrCreateInstance is not a function

It's causing the client to get stuck, and it's not synchronizing.

Console error message:

sync_status.js:96 Uncaught (in promise) TypeError: bootstrap.Tooltip.getOrCreateInstance is not a function
at h.showIcon (sync_status.js:96:27)
at h.processMessage (sync_status.js:132:18)
at sync_status.js:87:48
at WebSocket.C (ws.js:104:9)

Error logs

09:52:02 Lost websocket connection to the backend. If you keep having this issue repeatedly, you might want to check your reverse proxy (nginx, apache) configuration and allow/unblock WebSocket.
sync_status.js:96 Uncaught (in promise) TypeError: bootstrap.Tooltip.getOrCreateInstance is not a function
at h.showIcon (sync_status.js:96:27)
at h.processMessage (sync_status.js:132:18)
at sync_status.js:87:48
at WebSocket.C (ws.js:104:9)

@eliandoran
Copy link
Contributor

@openapphub , it appears that you are using a plugin which is not compatible with the latest version of TriliumNext where we bumped the Bootstrap to a newer version.

I would suggest to disable the offending script and look for an update to it. If you cannot disable it due to the client being stopped, you would need to enter the safe mode so that the plugins are disabled temporarily.

You could send me the plugin so that I could have a look at it and provide some insights on how it might be fixed.

@openapphub
Copy link
Author

@openapphub , it appears that you are using a plugin which is not compatible with the latest version of TriliumNext where we bumped the Bootstrap to a newer version.

I would suggest to disable the offending script and look for an update to it. If you cannot disable it due to the client being stopped, you would need to enter the safe mode so that the plugins are disabled temporarily.

You could send me the plugin so that I could have a look at it and provide some insights on how it might be fixed.

@eliandoran Thank you for your reply, I would like to ask what command or script is available to see which script is in use right now for activation. I'm not sure exactly which script, I'll try to find them one by one if I don't have access to them

@eliandoran
Copy link
Contributor

@openapphub , I will try to see if I can improve the exception in order to show the failing script.

@eliandoran
Copy link
Contributor

@openapphub , I've triggered a nightly build run which should be updated soon with better error logging: https://github.com/TriliumNext/Notes/releases/tag/nightly

The application should now be more tolerant to errors. Feel free to reopen the issue if you still get a broken application. The goal is to display a toast and proceed with the running of the application regardless of how broken a script/widget is.

@openapphub
Copy link
Author

@openapphub , I've triggered a nightly build run which should be updated soon with better error logging: https://github.com/TriliumNext/Notes/releases/tag/nightly

The application should now be more tolerant to errors. Feel free to reopen the issue if you still get a broken application. The goal is to display a toast and proceed with the running of the application regardless of how broken a script/widget is.

Thank you, I updated the customer service side as well as the server side and there were still errors, I searched through the components and after removing them it worked fine.

09:47 - Search: #widget
Trilium-Breadcrumbs
trilium-auto-hide-info-bar
BackToHistory

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