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

Cannot add to playlists and view playlists and app crashes on next startup #56

Closed
mytja opened this issue Apr 10, 2021 · 9 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@mytja
Copy link
Member

mytja commented Apr 10, 2021

Describe the bug
There are a lot of bugs. They are described bellow

To Reproduce
Steps to reproduce the behavior:

  1. Get latest version from main branch
  2. Do flutter run
  3. Create a playlist
  4. Add a song to playlist
  5. Click on playlist
  6. Get an error
  7. Close a app
  8. Open the app
  9. Startup error

While I was checking JSON, I noticed, that playlist JSON is completly empty.

After clearing cache AND data, it starts working again, but only until you repeat those steps.

This error also occours when I set the server & restart the app.

I tried debugging it, but Exceptions aren't very detailed, but it seems the error occours somewhere here: https://github.com/alexmercerind/harmonoid/blob/master/lib/main.dart#L21-L54

Expected behavior
The app, changing server, JSON writing and playlists should be working fine

Screenshots
I created a playlist:
playlist

Clicked on a playlist:
playlist2

Closed the app and reopened it:
exception

Smartphone (please complete the following information):

  • Device: Samsung Galaxy A21s
  • OS: Android 10 - OneUI 2.1
  • Version Latest from master

Thank you so much for your time

@mytja mytja added the bug Something isn't working label Apr 10, 2021
@raitonoberu
Copy link
Contributor

raitonoberu commented Apr 10, 2021

Huh, I remember fixing the same bug.. https://github.com/alexmercerind/harmonoid/commit/ab2773d3dd64b190fedff37aec9903eaa05c3c57
Why is this happening again?

@mytja
Copy link
Member Author

mytja commented Apr 10, 2021

I really don't know

@alexmercerind
Copy link
Member

alexmercerind commented Apr 10, 2021

@mytja are you using last "stable" build or the one from master? (Sorry I read your message now). Some of @raitonoberu's bug-fixes were really crucial & I'm glad he took the lead.
(I added so many things at the end with little to no testing, so bug-fixes were left). I'll have a look, I'm kinda feeling good to be back here on GitHub now.

I tried debugging it, but Exceptions aren't very detailed, but it seems the error occours somewhere here:
https://github.com/alexmercerind/harmonoid/blob/master/lib/main.dart#L21-L54

The exception isn't much detailed because we're just catching single exception without whole call stack.

Thanks for detailed reproduction steps.

@alexmercerind
Copy link
Member

OT: Is the Discord server still up?

@raitonoberu
Copy link
Contributor

I'm sorry you're a couple of days late.

@alexmercerind
Copy link
Member

Maybe GitHub discussions are cool enough now. 🙂

@mytja
Copy link
Member Author

mytja commented Apr 10, 2021

I'm using latest from master
I did flutter run when i cloned it

@alexmercerind
Copy link
Member

This could result in many other problems, I didn't notice that I wasn't using the fromMap method as every other place in the source.

@mytja
Copy link
Member Author

mytja commented Apr 10, 2021

Thank you so much
I will test it now

EDIT:
It works.
Thank you so much

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

No branches or pull requests

3 participants