octotree icon indicating copy to clipboard operation
octotree copied to clipboard

Keep getting logged out

Open theCapypara opened this issue 1 year ago • 10 comments

Description

Octotree keeps logging me out. This seems to be an issue with the API. I opened the inspector for the extension and can see that requests are regularly failing.

When that happens the extension immediately logs out.

Environment (if bug)

  • Octotree version: v7.9.3
  • Browser & version: Chrome 115.0.5790.102
  • OS & version: Arch Linux
  • Screenshot, if any (drag an image here)
  • Console error log below this line

_generated_background_page.html:1 Access to fetch at 'https://www.octotree.io/api/v1.0/users/token/refresh' from origin 'chrome-extension://bkhaagjahfmjljalopjnoealnfndnagc' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

theCapypara avatar Aug 02 '23 09:08 theCapypara

Hi, we can't reproduce this issue. Is it still happening? If it is, can you check if you happen to have some other extension or behind firewall that blocks requests to Octotree?

danhgit avatar Aug 11 '23 05:08 danhgit

Hi! I can't test at the moment, will do in a couple of weeks when I'm back at work, but to add some context, I already looked a bit more into this, and it seems that every time this error occured your API has returned 500s without the Access-Control-Allow-Origin headers. I don't think another extension is interfering, as I was able to reproduce it with CURL by just cppying the Request as CURL from the Chrome Dev Tools. It seems the API is returning 500s randomly for a short time and then functions again.

This has been going on for 2-3 months for me before I opened the issue.

theCapypara avatar Aug 11 '23 14:08 theCapypara

Hi @theCapypara is there any update?

danhgit avatar Oct 23 '23 08:10 danhgit

Hi thanks for asking! The issue did not really get better, so I stopped using Octotree for a while. Will install again and see if it got any better now.

theCapypara avatar Oct 23 '23 08:10 theCapypara

@danhgit Sadly this is still happening. Today I just get logged almost immediately. Here's a screenshot from the extensions inspector: image

theCapypara avatar Oct 25 '23 09:10 theCapypara

Thanks. I appreciate you tested it. This is very strange because we do send CORS headers with that API call. Can you email me at [email protected] with a screenshot of the response headers for the api/v1.0/users/token/refresh API call?

danhgit avatar Oct 26 '23 13:10 danhgit

Will do, I actually ran the extension today again and everything was fine. But next time this happens I'll record the headers and send them.

However I kinda also think I got the issue: It seems that whenever there is a Gateway Timeout, Internal Server Error or Too Many Requests* response, there are no CORS headers sent in the response and the extension logs me out.

*: Although the Too Many Requests response also makes no sense, I made the last screenshot 10 minutes after my previous attempt to get the extension working. In general I guess it's odd I'm running into so many errors.

theCapypara avatar Oct 26 '23 20:10 theCapypara

Today this happened again, I was unable to really use the extension at all. I have sent the response information via email.

theCapypara avatar Nov 01 '23 13:11 theCapypara

@theCapypara sorry for taking long to get back. This has taken quite a bit of investigation. I'm sending you an email to follow up.

danhgit avatar Dec 04 '23 08:12 danhgit

Not sure if it's the same issue but I get asked to log in every single day. Would be nice to fix that.

ivan-moto avatar Aug 05 '24 18:08 ivan-moto