Pierrad / obsidian-github-copilot

A bridge between Obsidian and Github Copilot
Apache License 2.0
113 stars 8 forks source link

Asked to restart sign-in process every day. #36

Open MaxWolf-01 opened 1 month ago

MaxWolf-01 commented 1 month ago

Describe the bug The plugin asks me to restart the sign-in process every day. This does not seem to be based on me restarting Obsidian or rebooting my PC, but seems to be a daily occurance.

A related issue is that the notice pops up even when copilot is disabled (not the entire plugin, but by clicking the icon in the taskbar), repeatedly, every time I focus a different tab.

Expected behavior It would be great if the rate of required re-sign-ins could be reduced, and if the notice that a new sign-in is necessary would appear only once.

Obsidian and environment (please complete the following information):

Pierrad commented 1 month ago

Hi @MaxWolf-01,

Thanks for using the plugin!

Normally you need to sign-in when you install the plugin and after that it should never ask you again (unless you disconnect from Copilot manually).

Can you provide more detail about your setup? I see that you're using Ubuntu, how did you install Obsidian? And are you using something special related to Node?

The authenticated status is computed by the copilot process so if you're asked to sign-in everyday it means that the agent is not capable of retaining the connection.

In the plugin settings, you should be able to activate the debugging mode, it should print some logs into the developer console. Can you share with me some logs when you login or when you start obsidian the day after? Maybe there is something useful.

MaxWolf-01 commented 1 month ago

Here is some additional info and logs I could gather:

I'm using Obsidian via the latest AppImage (1.6.7) Node version: v21.7.3 Nothing special that I am aware of. Below is a list of the plugins I have enabled.

Logs:

plugin:github-copilot:26943 Error onFileOpen: TypeError: Cannot read properties of undefined (reading 'openDocument')
error   @   plugin:github-copilot:26943
onFileOpen  @   plugin:github-copilot:27010
await in onFileOpen (async)     
EventManager.fileOpenHandler    @   plugin:github-copilot:27065
e.tryTrigger    @   app.js:1
e.trigger   @   app.js:1
t.trigger   @   app.js:1
t.activeLeafEvents  @   app.js:1
l   @   app.js:1
c   @   app.js:1
setTimeout (async)      
u   @   app.js:1
t.setActiveLeaf @   app.js:1
eval    @   plugin:obsidian-kanban:67
o   @   plugin:obsidian-kanban:33
checkCallback   @   app.js:1
BK  @   app.js:1
e.executeCommand    @   app.js:1
eval    @   plugin:obsidian-kanban:67
o   @   plugin:obsidian-kanban:33
e.executeCommandById    @   app.js:1
eval    @   plugin:obsidian-completr:80423
e.handleKey @   app.js:1
e.handleKey @   app.js:1
t.handleKey @   app.js:1
e.onKeyEvent    @   app.js:1

(this is the error I get in conjunction with the "Copilot is not ready yet, please check your settings" notice) Btw: When i press the restart sign-in process button, I receive two notices: "Obsidian Copilot is setup" followed by "You are already signed in" - So I don't need to do the full sign-in process, just need to click the button every day.

Plugins enabled: 27
1: Kanban v2.0.51
2: Smart Typography v1.0.18
3: Git v2.25.0
4: Commander v0.5.1
5: Heatmap Calendar v0.7.1
6: Dataview v0.5.67
7: Templater v2.4.1
8: Relative Line Numbers v3.0.0
9: Charts v3.9.0
10: Mermaid Tools v1.1.3
11: Homepage v4.0.3
12: Pandoc Plugin v0.4.1
13: Easy Bake v1.1.0
14: Omnisearch v1.24.0
15: Latex Suite v1.9.4
16: WakaTime v1.0.0
17: TikZJax v0.5.2
18: Image Converter v1.1.7
19: Excalidraw v2.3.0
20: Vimrc Support v0.10.1
21: Image Context Menus v1.9.0
22: Github Copilot v1.0.10
23: Text Extractor v0.5.2
24: Completr v3.2.0
25: Paste URL into selection v1.7.0
26: Quick Switcher++ v4.4.0
27: Daily Note Navbar v0.2.0