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

Multiplayer Not Working -- streetView not saved in firebase #64

Closed
bestbotplease opened this issue Nov 24, 2020 · 4 comments · Fixed by #65
Closed

Multiplayer Not Working -- streetView not saved in firebase #64

bestbotplease opened this issue Nov 24, 2020 · 4 comments · Fixed by #65
Assignees
Labels
bug Something isn't working

Comments

@bestbotplease
Copy link

I pulled master following the guide, hosted on netlify + set up firebase real-time DB. Single player works fine.
Whenever I create a multiplayer game, I set the room name, my player name, and the timeout period. Everything is created and I receive a message that says waiting on players to join. I noticed the following error in my javascript console:

Uncaught Error: Reference.set failed: First argument contains undefined in property 'dsafasdf.streetView.round1.roundInfo'

Whenever another player attempts to join my URL, they receive the following error:

The first player is creating the room right now. Please wait and try again.

After looking into the issue, it looks like streetView is never saved in Firebase. Thus, the condition on line 170 in DialogRoom.vue is met: !snapshot.hasChild('size') || !snapshot.hasChild('streetView’)

This is what causes the error to display. I’m not sure why streetView isn’t being saved in Firebase, but that must be the issue. I have not been able to find the code where this happens to further debug. Everything else appears to be working.

@BilelJegham BilelJegham added the bug Something isn't working label Nov 24, 2020
@BilelJegham BilelJegham self-assigned this Nov 24, 2020
BilelJegham pushed a commit that referenced this issue Nov 24, 2020
@H0r53
Copy link

H0r53 commented Nov 24, 2020

It looks like the issue is in StreetView.vue. The loadStreetView method is called on mount for player1, which is where the random coordinates are generated. Then checkStreetView is called, which attempts to save the streetView to Firebase around line 236. I reproduced the issue but don't see a fix yet.

@BilelJegham
Copy link
Member

Hi, thanks for the report.

I found the problem, linked to maps without round information.

I finish my test and I will merge the fix.

BilelJegham added a commit that referenced this issue Nov 24, 2020
@BilelJegham BilelJegham linked a pull request Nov 24, 2020 that will close this issue
@bestbotplease
Copy link
Author

Awesome, looks like the bug fix worked. Thanks for the quick help.

@BilelJegham
Copy link
Member

BilelJegham commented Nov 24, 2020

Sorry for the inconvenience

Enjoy 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants