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

JIRA request timeout leads to out-of-memory death #369

Closed
squarebracket opened this issue May 14, 2020 · 11 comments
Closed

JIRA request timeout leads to out-of-memory death #369

squarebracket opened this issue May 14, 2020 · 11 comments
Labels

Comments

@squarebracket
Copy link

Your Environment

  • Version used: snap version 5.1.4
  • Operating System and version: fedora 31
  • Desktop Environment: gnome 3.34

Expected Behavior

N/A

Current Behavior

On startup, everything seems fine:

    PID      RSS CMD
2624406   133556 /snap/superproductivity/618/superproductivity --no-sandbox
2624485    41588  \_ /snap/superproductivity/618/superproductivity --type=zygote --no-sandbox
2624507   115452  \_ /snap/superproductivity/618/superproductivity --type=gpu-process --field-tri
2624509    57516  \_ /snap/superproductivity/618/superproductivity --type=utility --field-trial-h
2624512   162708  \_ /snap/superproductivity/618/superproductivity --type=renderer --no-sandbox -

Everything works for a while, but after a bit I'll get this:

17:12:31.490 › Frontend Error: Error: Uncaught (in promise): Object: {"HANDLED_ERROR_PROP":"Jira: Request timed out"}

This is then followed a few minutes later by a flood of "blocking access" messages:

17:17:18.452 › Frontend Error: Error: Uncaught (in promise): Object: {"HANDLED_ERROR_PROP":"Blocked access to prevent being shut out issue/*"}

At this point, 2624512 in the above ps output spikes in memory usage (> 4GB). The UI becomes unresponsive at this point. The "polling jira" message shows at the bottom of the screen, and its progress bar is moving, but nothing in the UI responds.

If I have the console open, then the debugger will pause execution with a message like "something something to avoid out-of-memory error." At this point it's around 4.4GB RSS. If I just let it run without the debugger, I get a stack trace and core dump.

At this point, 2624512 in the above ps crashes. All other processes remain alive. The window empties and it's nothing but a blank white window. I then have to manually kill the process, as trying to close the window does not work.

Steps to Reproduce (for bugs)

  1. Set up JIRA integration
  2. Add a bunch of tickets to your daily queue, or whatever it's called
  3. Wait

Logs

Truncated journalctl logs from a previous crash:

May 13 17:12:31 superproductivity: 17:12:31.490 › Frontend Error: Error: Uncaught (in promise): Object: {"HANDLED_ERROR_PROP":"Jira: Request timed out"}
May 13 17:12:31 superproductivity:     at resolvePromise (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:832:39)
May 13 17:12:31 superproductivity:     at file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:739:21
May 13 17:12:31 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/main.c7bad27ebcd79014f9eb.js:1:2403855)
May 13 17:12:31 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:386:30)
May 13 17:12:31 superproductivity:     at Object.onInvoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28285:33)
May 13 17:12:31 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:385:36)
May 13 17:12:31 superproductivity:     at e.run (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:143:47)
May 13 17:12:31 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:891:38)
May 13 17:12:31 superproductivity:     at t.invokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:421:35)
May 13 17:12:31 superproductivity:     at Object.onInvokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28273:33) Error: Uncaught (in promise): Object: {"HANDLED_ERROR_PROP":"Jira: Request timed out"}
May 13 17:12:31 superproductivity:     at resolvePromise (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:832:39)
May 13 17:12:31 superproductivity:     at file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:739:21
May 13 17:12:31 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/main.c7bad27ebcd79014f9eb.js:1:2403855)
May 13 17:12:31 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:386:30)
May 13 17:12:31 superproductivity:     at Object.onInvoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28285:33)
May 13 17:12:31 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:385:36)
May 13 17:12:31 superproductivity:     at e.run (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:143:47)
May 13 17:12:31 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:891:38)
May 13 17:12:31 superproductivity:     at t.invokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:421:35)
May 13 17:12:31 superproductivity:     at Object.onInvokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28273:33)
May 13 17:12:32 superproductivity: 17:12:32.357 › Frontend Error Stack: Error: Uncaught (in promise): Object: {"HANDLED_ERROR_PROP":"Jira: Request timed out"}
May 13 17:12:32 superproductivity:     at resolvePromise (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:832:39)
May 13 17:12:32 superproductivity:     at file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:739:21
May 13 17:12:32 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/main.c7bad27ebcd79014f9eb.js:1:2403855)
May 13 17:12:32 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:386:30)
May 13 17:12:32 superproductivity:     at Object.onInvoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28285:33)
May 13 17:12:32 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:385:36)
May 13 17:12:32 superproductivity:     at e.run (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:143:47)
May 13 17:12:32 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:891:38)
May 13 17:12:32 superproductivity:     at t.invokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:421:35)
May 13 17:12:32 superproductivity:     at Object.onInvokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28273:33) resolvePromise (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:832:39)
May 13 17:12:32 superproductivity: file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:739:21
May 13 17:12:32 superproductivity: Ur (file:///snap/superproductivity/618/resources/app.asar/dist/main.c7bad27ebcd79014f9eb.js:1:2403855)
May 13 17:12:32 superproductivity: t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:386:30)
May 13 17:12:32 superproductivity: Object.onInvoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28285:33)
May 13 17:12:32 superproductivity: t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:385:36)
May 13 17:12:32 superproductivity: e.run (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:143:47)
May 13 17:12:32 superproductivity: apply (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:891:38)
May 13 17:12:32 superproductivity: t.invokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:421:35)
May 13 17:12:32 superproductivity: Object.onInvokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28273:33)
May 13 17:17:18 superproductivity: 17:17:18.452 › Frontend Error: Error: Uncaught (in promise): Object: {"HANDLED_ERROR_PROP":"Blocked access to prevent being shut out issue/..."}
May 13 17:17:18 superproductivity:     at resolvePromise (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:832:39)
May 13 17:17:18 superproductivity:     at file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:739:21
May 13 17:17:18 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/main.c7bad27ebcd79014f9eb.js:1:2403855)
May 13 17:17:18 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:386:30)
May 13 17:17:18 superproductivity:     at Object.onInvoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28285:33)
May 13 17:17:18 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:385:36)
May 13 17:17:18 superproductivity:     at e.run (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:143:47)
May 13 17:17:18 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:891:38)
May 13 17:17:18 superproductivity:     at t.invokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:421:35)
May 13 17:17:18 superproductivity:     at Object.onInvokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28273:33) Error: Uncaught (in promise): Object: {"HANDLED_ERROR_PROP":"Blocked access to prevent being shut out issue/..."}
May 13 17:17:18 superproductivity:     at resolvePromise (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:832:39)
May 13 17:17:18 superproductivity:     at file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:739:21
May 13 17:17:18 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/main.c7bad27ebcd79014f9eb.js:1:2403855)
May 13 17:17:18 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:386:30)
May 13 17:17:18 superproductivity:     at Object.onInvoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28285:33)
May 13 17:17:18 superproductivity:     at t.invoke (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:385:36)
May 13 17:17:18 superproductivity:     at e.run (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:143:47)
May 13 17:17:18 superproductivity:     at apply (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:891:38)
May 13 17:17:18 superproductivity:     at t.invokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js:421:35)
May 13 17:17:18 superproductivity:     at Object.onInvokeTask (file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js:28273:33)
    ... above error repeated 81 more times, once for each ticket ...
May 13 17:18:30 audit[2190996]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=2190996 comm="superproductivi" exe="/snap/superproductivity/618/superproductivity" sig=5 res=1
May 13 17:18:30 kernel: traps: superproductivi[2190996] trap int3 ip:55645d4b1efa sp:7ffd612e0f80 error:0 in superproductivity[55645bf16000+53d8000]
May 13 17:18:30 systemd[1]: Started Process Core Dump (PID 2359813/UID 0).
May 13 17:18:30 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@18-2359813-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 13 17:18:55 systemd-coredump[2359814]: Process 2190996 (superproductivi) of user 1000 dumped core.
  Stack trace of thread 2190996:
  #0  0x000055645d4b1efa n/a (superproductivity)
  #1  0x000055645d4b1d69 n/a (superproductivity)
  #2  0x000055645ca2c000 n/a (superproductivity)
  #3  0x000055645ca2bfc9 n/a (superproductivity)
  #4  0x000055645cbbd965 n/a (superproductivity)
  #5  0x000055645cbbf005 n/a (superproductivity)
  #6  0x000055645cbbb8e5 n/a (superproductivity)
  #7  0x000055645cbb90ee _ZN2v88internal4Heap14CollectGarbageENS0_15AllocationSpaceENS0_23GarbageCollectionReasonENS_15GCCallbackFlagsE (superproductivity)
  #8  0x000055645cbc54fc n/a (superproductivity)
  #9  0x000055645cb90d5c _ZN2v88internal7Factory23NewFixedArrayWithFillerENS0_9RootIndexEiNS0_6ObjectENS0_14AllocationTypeE (superproductivity)
  #10 0x000055645cd91d48 n/a (superproductivity)
  #11 0x000055645cd92476 _ZN2v88internal18BaseNameDictionaryINS0_14NameDictionaryENS0_19NameDictionaryShapeEE3AddEPNS0_7IsolateENS0_6HandleIS2_EENS7_INS0_4NameEEENS7_INS0_6ObjectEEENS0_15PropertyDetailsEPNS0_13InternalIndexE (superproductivity)
  #12 0x000055645ced175d n/a (superproductivity)
  #13 0x000055645d3f5e99 n/a (superproductivity)
  #14 0x000029c6a10f9796 n/a (n/a)
  #15 0x000055645d385a18 n/a (superproductivity)
  #16 0x000055645d465951 n/a (superproductivity)
  #17 0x000055645d385a18 n/a (superproductivity)
  #18 0x000055645d385a18 n/a (superproductivity)
  #19 0x000029c6a0fe12ff n/a (n/a)
  #20 0x000055645d3815e7 n/a (superproductivity)
  #21 0x000055645d46e01b n/a (superproductivity)
  #22 0x000055645d385a18 n/a (superproductivity)
  #23 0x000055645d385a18 n/a (superproductivity)
  #24 0x000029c6a12e5e51 n/a (n/a)
  #25 0x000029c6a12be1cc n/a (n/a)
  #26 0x000055645d385a18 n/a (superproductivity)
  #27 0x000055645d385a18 n/a (superproductivity)
  #28 0x000055645d385a18 n/a (superproductivity)
  #29 0x000029c6a132a922 n/a (n/a)
  #30 0x000029c6a12ef6b3 n/a (n/a)
  #31 0x000055645d38331a n/a (superproductivity)
  #32 0x000055645d3830f8 n/a (superproductivity)
  #33 0x000055645cb49a87 n/a (superproductivity)
  #34 0x000055645cb49798 _ZN2v88internal9Execution4CallEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_iPS6_ (superproductivity)
  #35 0x000055645ca49c2e _ZN2v88Function4CallENS_5LocalINS_7ContextEEENS1_INS_5ValueEEEiPS5_ (superproductivity)
  #36 0x000055645f422fd4 n/a (superproductivity)
  #37 0x000055645f84b9e7 n/a (superproductivity)
  #38 0x000055645f84bbf1 n/a (superproductivity)
  #39 0x000055645fa8a847 n/a (superproductivity)
  #40 0x000055645fa8a790 n/a (superproductivity)
  #41 0x000055645fa89f93 n/a (superproductivity)
  #42 0x000055645f3e6aa4 n/a (superproductivity)
  #43 0x000055645ddc4f80 n/a (superproductivity)
  #44 0x000055645ddd5eee n/a (superproductivity)
  #45 0x000055645ddd5cb7 n/a (superproductivity)
  #46 0x000055645dd97b9a n/a (superproductivity)
  #47 0x000055645ddd67c8 n/a (superproductivity)
  #48 0x000055645ddaffb7 n/a (superproductivity)
  #49 0x0000556460fac1d1 n/a (superproductivity)
  #50 0x000055645d5de1a4 n/a (superproductivity)
  #51 0x000055645f3108a4 n/a (superproductivity)
  #52 0x000055645c991d91 n/a (superproductivity)
  #53 0x000055645bf16cbb n/a (superproductivity)
  #54 0x00007fe40bc73b97 n/a (/lib/x86_64-linux-gnu/libc-2.27.so)
May 13 17:18:55 systemd[1]: [email protected]: Succeeded.
May 13 17:18:55 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@18-2359813-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 13 17:19:04 abrtd[1048]: Size of '/var/spool/abrt' >= 5000 MB (MaxCrashReportsSize), deleting old directory 'ccpp-2020-05-13-03:35:16.809799-1897531'
May 13 17:19:09 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.8-org.freedesktop.problems@15 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 13 17:19:09 abrt-notification[2360251]: Process 2190996 (superproductivity) crashed in ??()

I have a 1GB core dump in case it's useful.

@squarebracket
Copy link
Author

This time around I noticed this in the console:

main.c7bad27ebcd79014f9eb.js:1 Jira: Response Request ID not existing

polyfills.7edae71eed3180374236.js:1 GET file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js net::ERR_FILE_NOT_FOUND

polyfills.7edae71eed3180374236.js:1 GET file:///snap/superproductivity/618/resources/app.asar/dist/webpack:/node_modules/zone.js/dist/zone.js net::ERR_FILE_NOT_FOUND

@johannesjo
Copy link
Owner

Thank you very much for reporting this and reporting this in such a thorough manner. Much appreciated!

A couple of questions:

  1. There are 81 different jira tickets imported at the same time which seems to work as expected at first, correct?
  2. Could you also post your jira configuration (without your credentials etc)?
  3. It seems to me that at some point the jira requests for updating the issues started failing. Do you have any indication why this might have be the case? Was your internet connection lost or very bad or did you reload the app at some point or might you have been locked out for any other reason?
  4. Can you reproduce this consistently?

I have a guess what's causing the spike in memory usage. The material snack component is very resource hungry for some reason (I probably should replace it with my own more easy going implementation at some point). Currently all issues are polled for changes individually (also some room for optimization here :)) so 81 of those snacks are opened at the same time which cause this insane spike. I'll try to provide a fix for this.

I have no clue however what's making the requests fail in the first place and if that's an issue on SPs side of things.

@johannesjo johannesjo added the bug label May 14, 2020
@johannesjo
Copy link
Owner

Puh this was a hard nut to crack. My initial guess was wrong. What was causing this extraordinary amount of memory usage is stacktrace.js (stacktracejs/stacktrace.js#222). I think I fixed it by limiting the maximum number of times it can be called in a short succession and by deactivating traces for errors expected to be happening from time to time like this one.

The fix will be available with the next release.

@squarebracket
Copy link
Author

Missed your first comment @johannesjo, sorry about that.

I'm not really sure why I get that initial request timeout failure that causes this condition. I can think of two possible causes:

  1. I have so many tickets "open" that I'm flooding the jira server with requests, and it drops the connection (do you know if there are request limits or if it should return 429?)
  2. DNS, because sometimes it's just DNS

If I restart SP immediately after the crash, the jira sync works, so it really is just some strange temporary failure.

You're correct that several jira syncs can happen with no crashes. For instance, I've had SP open since starting work around 4 hours ago, and not a single crash has happened. But two nights ago when I was doing some testing in prep for opening this issue, it would happen much faster (within ~30m) if I re-opened SP immediately after the crash. Anecdotally, it seems that time-until-next-crash seems to decrease the longer I use SP, but that could be my imagination.

Also probably worth pointing out that this morning I threw some of my open tickets into the backlog (I don't know if this disables the sync for the ticket, but I figured I'd try it in case #1 really is the problem). I'll let you know if I make it through the workday with no crashes. If that happens, I guess that points to a "too many tickets" problem.

I haven't looked at the code, but I imagine that you're disabling jira sync if you catch any request error when trying to sync. Perhaps this should only be triggered when jira explicitly denies your request, e.g. returning a 401. That way it could survive any internet blips. Anyway, probably a topic for a separate issue.

This is my jira config, in case it's still useful:

{
  "isEnabled": true,
  "_isBlockAccess": false,
  "host": "https://mycompany.atlassian.net",
  "userName": "redacted",
  "password": "redacted",
  "isAutoPollTickets": true,
  "searchJqlQuery": "",
  "isAutoAddToBacklog": true,
  "autoAddBacklogJqlQuery": "assignee = currentUser() AND sprint in openSprints() AND resolution = Unresolved",
  "isWorklogEnabled": true,
  "isAutoWorklog": false,
  "isAddWorklogOnSubTaskDone": true,
  "isUpdateIssueFromLocal": false,
  "isShowComponents": true,
  "isCheckToReAssignTicketOnTaskStart": false,
  "userAssigneeName": "redacted",
  "storyPointFieldId": null,
  "isTransitionIssuesEnabled": true,
  "availableTransitions": [],
  "transitionConfig": {
    "IN_PROGRESS": "ALWAYS_ASK",
    "DONE": "ALWAYS_ASK"
  },
  "userToAssignOnDone": null
}

@squarebracket
Copy link
Author

lol, speak of the devil... just got the crash.

@johannesjo
Copy link
Owner

Quick Update: The fix should be available in the edge channel now. Could you maybe try again with that? It also includes a little bit more helpful logging for the timeout error.

About 1:
I am not sure to be honest. Taking my past experience with Jira into consideration I would assume that this highly depends on how the server is configured. Things are always further complicated because it's not possible to make Jira requests like a sane person, but only through another fake server to work around their restrictive setup.

Jira access is blocked for 401 and for when the timeout error happens. Thinking about it the reason might be that the requests took indeed longer than the 12 seconds defined. I remember building it like this because I personally encountered the case for a particular client when I got a never resolving request instead of a 401 (security through obscurity...) and after a couple of those I got shut out completely.

Might make sense to make this timeout configurable though or at least to set a bigger default value.

@squarebracket
Copy link
Author

I remember building it like this because I personally encountered the case for a particular client when I got a never resolving request instead of a 401 (security through obscurity...) and after a couple of those I got shut out completely.

Huh. Interesting!

The fix should be available in the edge channel now. Could you maybe try again with that?

Installed. I will report back.

Thanks for such a quick turnaround!

@johannesjo
Copy link
Owner

johannesjo commented May 15, 2020

Just setting a higher timeout value is not as easy as I thought unfortunately, as the timeout value being lower than the delay for polling changes, was what was making it work in the first place. So I attempted to fix & improve the logic of the initial check request, but it's a little bit messy/complicated. I hope it doesn't break anything :D

Normally I would just remove this weird workaround but getting blocked from your companies Jira because of your ToDo app is a case I want to avoid at any cost.

The changes with the higher timeout value should be on the edge channel soon. Please let me know if this solves the issue with failing requests.

@squarebracket
Copy link
Author

I can see I got the "request timed out" and a bunch of "blocked" errors and it didn't crash. So that's good. But it seems that each blocked access message results in a TypeError: Cannot set property 'innerText' of null. I haven't noticed any actual bugs that it causes, though. When I unblock jira, sync happens again and no errors.

@squarebracket
Copy link
Author

Just updated to 622, I'll let you know if that fixes the request timeout.

Normally I would just remove this weird workaround but getting blocked from your companies Jira because of your ToDo app is a case I want to avoid at any cost.

That's exceedingly reasonable.

@johannesjo
Copy link
Owner

Excellent! Thank you very much for letting me know! :)

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

No branches or pull requests

2 participants