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

Cannot read properties of null (reading 'path') error #602

Closed
AMGMNPLK opened this issue May 12, 2024 Discussed in #601 · 1 comment
Closed

Cannot read properties of null (reading 'path') error #602

AMGMNPLK opened this issue May 12, 2024 Discussed in #601 · 1 comment

Comments

@AMGMNPLK
Copy link

I encountered an error while using the Smart Connections plugin for Obsidian. When I tried to ask the LLM a question, I received the following alert:

[Smart Connections]

Cannot read properties of null (reading 'path') 

In the console, I also noticed these related error messages:

plugin:smart-connections:8282 TypeError: Cannot read properties of null (reading 'path')
    at eval (plugin:smart-connections:8310:71)
    at Array.map (<anonymous>)
    at ScChat.parse_user_message (plugin:smart-connections:8310:55)
    at ScChat.new_user_message (plugin:smart-connections:8045:30)
    at ScChat.new_user_message (plugin:smart-connections:8279:23)
    at HTMLButtonElement.eval (plugin:smart-connections:6664:34)

plugin:smart-connections:6766 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'querySelector')
    at get last_msg [as last_msg] (plugin:smart-connections:6766:86)
    at ScChatsUI.undo_last_message (plugin:smart-connections:6825:14)
    at ScChat.new_user_message (plugin:smart-connections:8283:28)

It seems the plugin is trying to read a path property that is null, causing the error. This prevents the LLM from generating a response.

Steps to Reproduce

  1. Installed the latest version of the Smart Connections plugin in Obsidian
  2. Tried to ask the LLM a question using the Smart Connections chat interface
  3. Received the "Cannot read properties of null (reading 'path')" error

Additional Context

I also noticed some other errors in the console related to connecting to the Smart Connect server:

plugin:smart-connections:3254 Smart Connect is not running, will try to connect again later
plugin:smart-connections:3281 Failed to reconnect after 10 attempts 
plugin:smart-connections:3400 Failed to reconnect, will not retry...
plugin:smart-connections:2507 Checking for local Smart Connect server...
plugin:smart-connections:2517 Could not connect to local Smart Connect server

Not sure if this is related to the main error, but thought it was worth mentioning. Let me know if you need any other details to investigate this issue. Thanks!

@brianpetro
Copy link
Owner

Hi @AMGMNPLK

Thanks for bringing this to my attention 😊

If you could, please toggle on this setting:
Screenshot 2024-06-06 at 8 12 43 AM

It will make the logs you share more useful by providing improved files and line number references.

If this is still a problem, please re-open this issue with the following details:

  1. Updated screenshots after turning on the "debug at startup time" setting.
  2. which chat model you are using (a screenshot of you smart chat settings would also be helpful)

🌴

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

No branches or pull requests

3 participants