tavyandy97/span-tree

The Firefox add-on seems to infinite loop upon opening the tree

Closed this issue · 4 comments

Hi!

I wanted to give SpanTree a try and unfortunately had this issue. Here are my findings.

Update 1, H+2 minutes: this is now working properly without me having changed anything. I don't really know what happened. I reproduced the bug 3-4 times, restarting my browser each time, and by the time I wrote this issue I couldn't anymore

Update 2, H+10 minutes: I know have a in-between, if I click the SpanTree button, the panel blinks, but the browser does not crash.

Error in console:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
    in Unknown (created by n)
in content.js:5:168824 (but I can't open it)

What happens

  • Open the root page of a project
  • The SpanTree button is visible, page is still responsive
  • Click the SpanTree element
  • The left column with the repo's menu flickers and alternates quickly between the menu and the SpanTree element
  • The browser becomes unresponsive (or just very slow if closed quickly). This keeps going even after the Gitlab tab is closed. Nothing works except killing the browser.

What I can tell

  • Self-hosted Gitlab (API /version result : {"version":"13.6.3-ee","revision":"8578025c5e8"})
  • Ubuntu 20.04
  • Firefox 84.0
  • Tested with the Chrome add-on, no issue

If you need any other info feel free to ask, I don't really know how to troubleshoot any further. This project is promising, looking forward to using it :)

Hey @Koroeskohr !
Thank you for reporting this bug and for constantly sharing your findings here. Your initial issue of the extension going on an infinite loop could not be reproduced on Firefox on a Linux machine from my end.

I am looking into the issue and trying to reproduce the updates also. The only case where I was able to reproduce Update 2, H+10 minutes was by following the steps:

  1. Close all tabs and instances of your browser and open a fresh window
  2. Open a repository while SpanTree is active
  3. Expand SpanTree by clicking on the purple SpanTree pill beside the GitLab sidebar (Effect: The file navigation pane should have opened)

image

  1. Now open the Merge Requests for the same repository in a new tab (Effect: This will have closed the file navigation pane in original tab)

image

  1. Now in the original pane where the file navigation pane was opened only the SpanTree pill should be visible. Clicking on the pill (while the other tab ie the merge requests tab has not been closed) will cause the file navigation pane to flicker

Can you please follow this above steps and tell me if this is the exact issue you were facing? Thank you for following through the steps!

Meanwhile I'll keep trying to reproduce the issue.

I also encountered the same issue at first. Immediately after installation, clicking on the SpanTree pill flickers the side panel without opening any new tab for Merge Requests.

It works after restarting the browser.

Now open the Merge Requests for the same repository in a new tab (Effect: This will have closed the file navigation pane in original tab)

I tried opening a new tab for Merge Requests and it flickers.

I couldn't figure out the reason for the flicker on the initial install.

However, I did find the reason for the flicker when another tab (eg Merge Requests) is open. Will start working on the fix.

@davidchoo12

The issue has been resolved and merged. The version (v0.0.4.2) has been updated to the Chrome Webstore and Mozilla Addons. I'm closing this issue.

Feel free to provide more feedback! Hope you're finding SpanTree useful.