EINDEX / logseq-copilot

Logseq Copilot is a Browser extension that allows you to access your Logseq via your browser.
https://logseq-copilot.eindex.me
GNU General Public License v3.0
235 stars 21 forks source link

Cannot work in some cases. #22

Closed leeyaunlong closed 1 year ago

leeyaunlong commented 1 year ago

When I open many tabs in the chrome, after 5 mins or more,the copilot cannot work ( click or shortcut trigger the save action, the logseq has no add anything) At this time , the copilot's setting show the connection is good. i try to re-connect the logseq again, show message is connected. But the webpage still cannot save content to logseq. Need to refresh the page, ( in sometime, refresh also cannot work)

EINDEX commented 1 year ago

How many pages your created? Could you share reproduce methods by step and step.

leeyaunlong commented 1 year ago

My notebook: win11 32g ram. chrome v102 Steps:

  1. open logseq with api server enabled.

  2. open chrome , open 1-3 pages

  3. right click or shortcut save page (url) is ok

  4. right click or shortcut save selection contents is ok.

  5. browse some webpage, save is ok (10-20 tabs , 10 mins)

  6. open 30+ tabs (over 15mins) the save failed (no any errors) PS: I opened 2-3 chrome windows.

  7. my work around: at first, the copliot's config page the connection status is good. click to test is also work. and jump to logseq. my work around: sometimes, refresh web page 2-3 tims, the save is ok sometimes, refresh is unused. need to reboot logseq ( but, i can access the logseq app , no hung, the api page also works well. 127.0.0.1:12315 is work). Rare cases, reboot chrome to fix it.

EINDEX commented 1 year ago

Let me use Chrome for some days, let's see if I can reproduce this.

leeyaunlong commented 1 year ago

Let me use Chrome for some days, let's see if I can reproduce this. How to show debug log with copilot? I can provide more issue info.

EINDEX commented 1 year ago

Thanks,

The clip flow is below. image

Those colors line means two different methods.

The issue you mention here, most is the connection is not established, which means the connection between Current Page(content script) and Background JS is broken.

So, two locations can collect the error log.

  1. The console for the current page, this part can check the content script's working status. you can open it with F12 or Ctrl + Art + I.
  2. The other part is checking the extensions page. chrome://extensions/ and open the developer mode. then you will see the service worker here. click it you can see the log for the background part. image

Hope this will help.

leeyaunlong commented 1 year ago

image it seems beta version bug.

leeyaunlong commented 1 year ago

the failed log, the logseq api is good at this time. snap_20230428_104228_chrome

EINDEX commented 1 year ago

the failed log, the logseq api is good at this time. snap_20230428_104228_chrome

Yes, this is the connection issue between Background and Tab, Let me try to change another way to connect.

EINDEX commented 1 year ago

Fix version just release v1.11.1, if this issue still exists, please reopen.