Better error handling #637
Replies: 5 comments
-
Currently, the following issues are a consequence of the lack of proper error handling: #51 #134 #172 #183. I could probably add a few more by looking at my logs. |
Beta Was this translation helpful? Give feedback.
-
Indeed, there are a few key errors that are somewhat irritating:
|
Beta Was this translation helpful? Give feedback.
-
@sashahilton00 Thanks for the summary. Another reconnection story: I have librespot running on a headless machine. I run it in discovery mode and use Android via wifi to connect it to spotify. It often happens that I listen to some music and then don't use it for several days. When I then try to connect again, it crashes instantly and only works after a restart. I need to capture a backtrace for this, I just installed a non-stripped version and can probably reproduce tomorrow. I agree on the protobuf thing. I have only dealt with protobuf in C++ and C#, and adding new fields was always non-fatal. If this isn't the case for the Rust implementation, that is a serious problem. |
Beta Was this translation helpful? Give feedback.
-
As for protobuf, the problem is here, where an error in an enum variant in a repeated field cannot be ignored. See also here. |
Beta Was this translation helpful? Give feedback.
-
For the 5xx errors, shall I just add a check that panics librespot for now? Seems better than hanging indefinitely... |
Beta Was this translation helpful? Give feedback.
-
This issue is meant to be a tracking issue for better error handling in librespot. Right now, there are way to many calls to unwrap() on conditions which might fail, resulting in application crashes.
This is particularly annoying when a connection loss results in a crash, instead of reconnecting. It's also annoying when spurious failures on the server side lead to crashes. We need to come up with a way to improve error handling globally in librespot.
Beta Was this translation helpful? Give feedback.
All reactions