App crashes when the HTTPS response status code is 404.
ably_flutter: v1.2.40
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString objectForKeyedSubscript:]: unrecognized selector sent to instance 0x86eb38e944f002ee' *** First throw call stack: (0x18858a8c8 0x1855017c4 0x188626838 0x1885074f8 0x18850f3a0 0x1086266d8 0x1086747e4 0x10861b47c 0x10869b49c 0x10529463c 0x1052ae2d0 0x10529cb4c 0x10529d7d4 0x1052a9b20 0x1052a91c4 0x1e330f3b8 0x1e330e8c0) terminating due to uncaught exception of type NSException
Thanks @devlb for reporting this. Is it reproducible each time or, at least, sometimes?
Yes, this issue occurs every time — when the authUrl returns a 404.
final clientOptions = ably.ClientOptions( clientId: 'xxxx', authUrl: '404 url', );
Yes, this issue occurs every time — when the authUrl returns a 404.
final clientOptions = ably.ClientOptions( clientId: 'xxxx', authUrl: '404 url', );
Couldn't you please post a server response here? I assume that's a JSON with an error field.
decodedError is the string "Bad Request". I hope it can be handled compatibly without crashing.
Thanks for your response. It's now fixed here https://github.com/ably/ably-cocoa/pull/2136
I’m using ably-flutter v1.2.40, but the fix you mentioned is in ably-cocoa. So, which version of ably-flutter should I upgrade to? Or do I need to manually change the ably version in the Podfile?
It's not yet released in ably-cocoa, once it's released, we'll update flutter and let you know ASAP.
Please support it quickly — this is important.
@devlb It's now fixed in https://github.com/ably/ably-flutter/releases/tag/v1.2.42