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

Crash on login and subsequent launches #9

Closed
lukaskubanek opened this issue Mar 4, 2021 · 5 comments
Closed

Crash on login and subsequent launches #9

lukaskubanek opened this issue Mar 4, 2021 · 5 comments

Comments

@lukaskubanek
Copy link

As mentioned in this tweet I encountered a crash when I tried to log in into SoundCloud and now the app keeps crashing every time I launch it. You can find the crash report in this gist. My SoundCloud username is lukaskubanek. I’d be happy to help you further with resolving the issue.

@lbrndnr
Copy link
Owner

lbrndnr commented Mar 6, 2021

Hi @lukaskubanek, thanks for opening the issue :) The problem is that I don't have access to the API's documentation since it's all private. That's why it's kinda difficult for me to know what exactly is going on. I'm assuming that you liked a station or any other model I haven't implemented yet, which of course crashes when parsed.
It would be easiest if you quickly checked out the repo and ran it yourself. That way we could figure out what exactly is causing the issue. Then I could quickly implement the missing model :)

@lukaskubanek
Copy link
Author

@lbrndnr Indeed, it looks like it’s expecting a like of a playlist and it’s getting something else. Is there a simple way to view the incoming JSON I could look into? The stack trace isn’t of much help due to the Combine pipeline.

@lbrndnr
Copy link
Owner

lbrndnr commented Mar 10, 2021

Sorry for the late response, uni started again :)
You could add something like

            .map { data in
                print(String(data: data, encoding: .utf8))
                return data
            }

in the get function in SoundCloud.swift line 100, right before decode(type: T.self, decoder: decoder) is called :)

@lukaskubanek
Copy link
Author

It looks like it has something to do with my two playlists. I’ve mailed you the JSON response as I don’t want to post it here publicly. Let me know if I can help further.

lbrndnr added a commit that referenced this issue Mar 21, 2021
Signed-off-by: Laurin Brandner <mail@laurinbrandner.ch>
@lbrndnr
Copy link
Owner

lbrndnr commented Mar 21, 2021

Fixed this issue in the latest commit. System playlists can still not be viewed correctly, but at least the app doesn't crash anymore :)

@lbrndnr lbrndnr closed this as completed Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants