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

when connected to server, activities get shared automatically #810

Closed
prakashujjwal1010 opened this issue May 29, 2020 · 15 comments
Closed
Labels
bug to be release Fixed, to be release
Milestone

Comments

@prakashujjwal1010
Copy link
Contributor

when connected to server, activities get shared automatically without even clicking network button.
I tested with both dev.sugarizer.org and local server on even different laptops in dev branch .
also tested on https://dev.sugarizer.org/
The issue doesn't occur in master branch.
from this issue several activities are having problem like In last one loses activity we are not able to play vs computer mode(single player mode).
see below
ezgif com-video-to-gif (14)

The issue was not there until some weeks ago ( when i was developing chess activity).

will be very helpful if other contributors can verify this issue.

@dhruvmisra
Copy link
Contributor

Hey @prakashujjwal1010, I tried to replicate the issue on my side but I wasn't successful. The activity was not being shared automatically after opening it. I tried running the local server and also on https://dev.sugarizer.org/. Could you explain the steps you followed? Or could you mention other activities you are facing this issue with?

I did notice a different strange behavior: If I click on the single-user mode (left one with icon: zoom-home.svg) in the presence palette, it still shares the activity. Only this time the styling of the presence palette is a little off, as can be seen in the GIF uploaded by you.

I think it's happening after lib/sugar-web/presence.js was updated to show the connected users. The problem you are facing might also be linked to this. @llaske, can you confirm the odd behavior on your side?

@prakashujjwal1010
Copy link
Contributor Author

prakashujjwal1010 commented May 29, 2020

Steps to replicate the issue:

  • Log in as a new user,
  • open any activity and share it by clicking on the network palette.
  • now stop the activity
  • now when you open any other activity , it will get shared automatically

I am facing this issue on all the activities which have multiuser feature (presence)

@dhruvmisra
Copy link
Contributor

Weird, I still couldn't replicate it. :(
I tried it with a different browser too. Try clearing your browser cache, maybe that'll help?

@prakashujjwal1010
Copy link
Contributor Author

yes, i tried clearing cache also...but still getting the same.
i even tested it on my phone browser, still getting the issue...
:(

@llaske
Copy link
Owner

llaske commented May 29, 2020

Same for me, I can't reproduce the issue on my side :-(
BTW @dhruvmisra you're right regarding the weird behavior: clicking on the Private button shared the activity... could you fill an issue on this.
And yes, I've updated recently the presence palette so a difference between dev and master branch is possible.

@llaske
Copy link
Owner

llaske commented May 29, 2020

@prakashujjwal1010 could you try with different network speed (choose from the Network sheet in the Chrome dev window)?

@prakashujjwal1010
Copy link
Contributor Author

prakashujjwal1010 commented May 30, 2020

@llaske @dhruvmisra please try this :

ezgif com-video-to-gif (15)

  • go to https://dev.sugarizer.org/
  • sign in as a new user
  • open paint activity from home view or list view
    please test two three times...
    ( i've tested this on different laptop )
    yes, @llaske i have tried with different speeds on different laptops with different internet connections.

@dhruvmisra
Copy link
Contributor

dhruvmisra commented May 30, 2020

Yes! It happened with me too. Paint automatically shared an instance. I opened Last One Loses, it didn't share it automatically but once I shared it myself and closed the activity, every time I open it again it shares it automatically.

EDIT: It doesn't happen to me locally though when I'm running the server from sugarizer-server repository. When you mentioned about being connected to server, did you connect to a local sugarizer-server or the https://dev.sugarizer.org/?

@llaske llaske added the bug label May 30, 2020
@llaske
Copy link
Owner

llaske commented May 30, 2020

Unfortunately I can't reproduce on my side, even with the detailed steps :-(

I've fixed in #813 the related issue #811.
@prakashujjwal1010 @dhruvmisra Could you check if this PR fix both issues on your side?

@prakashujjwal1010
Copy link
Contributor Author

@dhruvmisra , yes you are right the issue doesn't exist when connected to local remote sugarizer-server but when connected to dev.sugarizer.org, it is there.

@llaske , when connected to sugarizer-server it solves the #811 on my side.

but when connected to https://dev.sugarizer.org/ now network button is not working means the activity is not getting shared on clicking network button. :(

don't know the reason behind this difference when connected to different servers, as it should behave same

@llaske
Copy link
Owner

llaske commented May 31, 2020

@prakashujjwal1010 thanks for the detailed description of the issue. It helps me a lot to understand the problem. The difference with a local server and dev.sugarizer.org - and also the reason why I can't reproduce the issue on my side - is that it depends of the network latency to accept connection.
I've finally reproduce the issue on my side by forcing my local server to 1 second wait before accepting connection (here for information).
With this one second latency I was able to reproduce both issue: automatic share and disable of network buttons.

I've updated the #813 PR to integrate the fix.

@prakashujjwal1010 @dhruvmisra could you test again on your side to see if it works now?

@dhruvmisra
Copy link
Contributor

I changed the network throttling in Chrome Dev tools to 'Mid-tier mobile' and I was able to reproduce the issue using local server as well.

@llaske The PR does fix the issue. No problems after network throttling as well.

Also thanks to @prakashujjwal1010, now that I have your attention on Last One Loses activity, I think the workflow after sharing the activity can be improved. As you can see, the user who shares the activity can't play the game until some other user connects and is also stuck if the connected user leaves in the middle. (As pointed out by @sarthak-g in #722). I think the solution proposed to let the user play against computer is good and feels intuitive.
I agree that the duration of the LOL game is small but I think that shouldn't be a reason to provide a bad experience (restarting to play if activity got shared) to the user. What do you say?

@prakashujjwal1010
Copy link
Contributor Author

@llaske , the issue is fixed now, on my side. thanks.
@dhruvmisra , yes I think letting user play until another user connects or if opponent leaves in the middle is a good idea.

@llaske
Copy link
Owner

llaske commented Jun 1, 2020

Thanks to both of you.

@dhruvmisra I'm agree regarding Last One Loses activity. Please fill an issue regarding that.

@llaske
Copy link
Owner

llaske commented Jun 2, 2020

Fixed in 95e9cd2

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

No branches or pull requests

3 participants