HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
19.57k stars 2.42k forks source link

UI hangs when opening project: uncaught in promise error shown in console #1420

Open tomasohara opened 3 years ago

tomasohara commented 3 years ago

Describe the bug

The UI hangs when opening project: it just shows the Heidi opossum animation walking. In addition, the following error is shown in the console log:

mobx-state-tree.module.js:3128 Uncaught (in promise) Error: [mobx-state-tree] No matching type for union (() | null?) at Do (mobx-state-tree.module.js:3128) at t.instantiate (mobx-state-tree.module.js:5435) ... at $r (mobx-state-tree.module.js:2456) at l (mobx-state-tree.module.js:3617) at A (mobx-state-tree.module.js:3631) Do @ mobx-state-tree.module.js:3128 t.instantiate @ mobx-state-tree.module.js:5435 Here are the backend and console log files: _backend-07sep21.log _console-7sept21.log

To Reproduce

Steps to reproduce the behavior: I'm not quite sure how to reproduce the hangup. We have been using the attached JSON file (combined-204671-205834-206619-admin-corresp.03sep21.new.1.json.txt) for several days with no problem. In addition, this is the first time we encountered the hangup and have been using Label Studio regularly for over a month.

combined-204671-205834-206619-admin-corresp.03sep21.new.1.json.txt

Expected behavior

The system reports an error, so that we can try to fix the data (either via database update or via new import).

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

nicholasrq commented 3 years ago

hey! thanks for the report

i tried importing the data you provided and can't catch a hang atm. it might take a while to investigate the issue, as it's not simply reproducible

tomasohara commented 3 years ago

You should be able to reproduce it from the sqlite3 database which is attached. label_studio.sqlite3.gz

Here's how I start it: label-studio start --data-dir /tmp --database /tmp/label_studio.sqlite3

It hangs when attempting to open fda-documents: http://localhost:8080/projects/9/data

victor-ab commented 3 years ago

Got the same behavior with different data.

tomasohara commented 3 years ago

Thanks for the info. Do you have any tips for working around the problem?

On Tue, Sep 21, 2021 at 1:16 PM Victor Borges @.***> wrote:

Got the same behavior with different data.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/heartexlabs/label-studio/issues/1420#issuecomment-924240067, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFCQ2EMQ6BTVKWZQY5SKMTUDDDZFANCNFSM5DTDG4FA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

makseq commented 3 years ago

@tomasohara Sorry for the delay. The solution for you:

  1. Go to the broken Project => Settings
  2. Open Danger Zone
  3. Click "Drop All Tabs"

@victor-ab Hope this steps help you too.

tomasohara commented 3 years ago

Thanks very much for the clarification. Max! That's a quick fix.

Best, Tom

On Thu, Sep 23, 2021 at 4:11 PM Max Tkachenko @.***> wrote:

@tomasohara https://github.com/tomasohara Sorry for the delay. The solution for you:

  1. Go to the broken Project => Settings
  2. Open Danger Zone
  3. Click "Drop All Tabs"

@victor-ab https://github.com/victor-ab Hope this steps help you too.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/heartexlabs/label-studio/issues/1420#issuecomment-926163902, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFCQ2EVOTWD5DAVFYAY7VLUDOJZDANCNFSM5DTDG4FA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tomasohara commented 3 years ago

Shouldn't that be left open? The issue still remains, and so we are still vulnerable to a potential hangup. (Removing the tabs is just an expedient to make the system usable. )

makseq commented 3 years ago

@tomasohara Could you record a video with this broken moment? What do you do to reproduce it?

tomasohara commented 3 years ago

OK, see the attached files: one is a video and the other is the captured log file.

This was invoked as following using the DB attached above (label_studio.sqlite3.gz): label-studio start --port 6666 --data-dir . --database ./label_studio.sqlite3 --no-browser --debug --log-level DEBUG tomasohara-label-stupid-hangup-24sept21.mp4-split-c.gz tomasohara-label-stupid-hangup-24sept21.mp4-split-b.gz tomasohara-label-stupid-hangup-24sept21.mp4-split-a.gz _heidi-hangup-24sept21.log

tomasohara commented 3 years ago

Basically just open fda-documents project in the above SqlLite3 DB. (The temp-fda-documents is the same project reloaded.)

makseq commented 3 years ago

@tomasohara unfortunately logs won't help, because it's a frontend issue, logs are from backend only.

I have to see how you reproduce this from the scratch after tabs dropping, I didn't find this in your video..

tomasohara commented 3 years ago

Unfortunately, I don't know how to reproduce it. Someone else made changes to the tabs that resulted in the hang up. (By the way, we are having a bunch of quirks involving the tabs, such as amnesia in the task filters. I'll report separately when I get a chance.)

Didn't @victor-ab reproduce the hangup. It would seem easier to track this down on your end if so. Otherwise, we would have to reconstruct the tab changes from the DB backups, which would be tedious.

Moreover, isn't there someone on the front-end team who can debug this via Dev Tools? I tried doing that initially, but I couldn't make sense of all the calls. For example, when I would try breaking into the debugger, it would end up in sentry-related code (e.g., sentryWrapped). Attached is another console log, in case that helps.

$ grep -1 sentry _label-studio-dev-tools-console-7sept21.log | tail
    at HTMLUnknownElement.sentryWrapped (index.js?v=0423b1:506)
    at Object.invokeGuardedCallbackDev (index.js?v=0423b1:52112)
--
    at HTMLUnknownElement.callCallback (index.js?v=0423b1:52063)
    at HTMLUnknownElement.sentryWrapped (index.js?v=0423b1:506)
    at Object.invokeGuardedCallbackDev (index.js?v=0423b1:52112)
--
    at HTMLUnknownElement.callCallback (index.js?v=0423b1:52063)
    at HTMLUnknownElement.sentryWrapped (index.js?v=0423b1:506)
    at Object.invokeGuardedCallbackDev (index.js?v=0423b1:52112)

label-studio-dev-tools-console-7sept21.txt

makseq commented 3 years ago

@tomasohara Sorry, but without exact steps on how to reproduce this, we can't help.

pottieral commented 3 years ago

Hi, just a quick note that the "drop all tabs" tip helped me today. Thank you !

tomasohara commented 3 years ago

@tomasohara Sorry, but without exact steps on how to reproduce this, we can't help.

[complaint deleted]

I'll address this later. I didn't mean for that to turn into a complaint.

tomasohara commented 3 years ago

I'll post a "ignore all tabs" feature request. (It takes time for my users to setup the tabs, so deleting them is not a workaround.)

Thanks @pottieral: I agree that having the "drop all tabs" option is good. (But that is just an expedient.)

@makseq: will switching to PostgreSQL alleviate the DB corruption that leads to the tab issue? We only have 3 users active users, so concurrency shouldn't have been an issue.

makseq commented 3 years ago

@tomasohara On my practice, similar problems happen when there is something wrong in the task.data + filter over it.