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

View disconnected - Agent does not exist (anymore) #304

Open
2 of 7 tasks
rsverhagen94 opened this issue Jul 20, 2021 · 6 comments
Open
2 of 7 tasks

View disconnected - Agent does not exist (anymore) #304

rsverhagen94 opened this issue Jul 20, 2021 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@rsverhagen94
Copy link

What is your question?
Often when running MATRX I encounter the below shown view disconnected issue. In this case the user can no longer control the agent and the page should be refreshed before being able to proceed. Any idea where this issue comes from and how to potentially solve/avoid it?

Screenshot from 2021-07-15 12-38-14

To what is your question related?

  • I am not sure if I should use MATRX.
  • I have a question about the idea behind MATRX.
  • I don't know how to do something with MATRX.
  • I don't know where to find something.
  • I think I found a bug, but I am not sure.
  • I want to contribute, but don't know where to start.
  • Something else.
@rsverhagen94 rsverhagen94 added the question Further information is requested label Jul 20, 2021
@thaije
Copy link
Collaborator

thaije commented Jul 20, 2021

Hi @rsverhagen94, this notification happens when the frontend can't find the agent (human_0_in_team_0 in your case) in the state it received from the MATRX backend. Two example causes are that the frontend cannot connect to MATRX at all and doesn't get a state, or because a new world has started that doesn't include an agent with that name/ID.

Do you have some more info on when and how this occurs? For instance, after completing a world and starting the new one, or also in the middle of a world? Or when it is running for a longtime? And how often do you have this issue?
Also, do you have a stacktrace of the browser console and the Python console when that happens?

This seems like a difficult issue to replicate, so it would also be really helpful if I could take a look at your code and try to debug it directly by running it and replicating the issue. Would that be a possibility?

@rsverhagen94
Copy link
Author

Hi @thaije, thanks for the quick reply! In almost all cases this issue occurs in the middle of a world, but does not seem to be dependent on the amount of time the world is running. It does seem to happen more often when the controls haven't been used for a little while. The issue occurs around twice when completing a world.

You can find my code at https://github.com/rsverhagen94/MATRX. Let me know if you can access and run it, or if you need additional information. Thanks a lot already for your help!

@thaije
Copy link
Collaborator

thaije commented Jul 23, 2021

Hey @rsverhagen94, I was able to clone your repository and install everything according to your requirements.txt. Is it correct you're using MATRX v2.0.8? I ran the main.py a couple times:

  • doing and completing the task a couple times
  • starting the task (incl pressing Ready) but doing nothing while having the GUI open
  • starting the task (incl pressing Ready) but switching to a different non-MATRX browser tab so it is in the background

I also tried accessing it from localhost:3000 (not recommended) and 127.0.0.1:3000 (recommended, faster url for the frontend).
In each of the case I wasn't able to reproduce it. Am I still missing something?

If you do re-encounter the problem, can you post a stacktrace of the browser console log and the MATRX Python terminal log?

@rsverhagen94
Copy link
Author

Hi @thaije. I am indeed using v2.0.8. Good to hear you did not encounter the problem. Below the two screenshots of when the issue does occur.

Screenshot from 2021-07-25 12-35-12
Screenshot from 2021-07-25 12-35-06

@thaije
Copy link
Collaborator

thaije commented Jul 26, 2021

Thanks for the screenshots @rsverhagen94. From the stack traces I can't pinpoint the cause of why the view disconnects either, but what I can do is change the way MATRX handles a disconnect. Now it seems to crash (red browser console error), but instead catch that error and let it try to reconnect. That could solve your issue.
When would you need that fix for e.g. running experiments? Then I'll try to fit it in my schedule :)
You would have to upgrade your MATRX version for that though.

@rsverhagen94
Copy link
Author

Hi @thaije, thanks for your help. I already started conducting last week but fortunately the issue only occurred rarely untill now.

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

No branches or pull requests

3 participants