ably-flutter icon indicating copy to clipboard operation
ably-flutter copied to clipboard

App crashes when the HTTPS response status code is 404.

Open devlb opened this issue 2 months ago • 5 comments

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

Image

┆Issue is synchronized with this Jira Task by Unito

devlb avatar Oct 29 '25 05:10 devlb

Thanks @devlb for reporting this. Is it reproducible each time or, at least, sometimes?

maratal avatar Oct 30 '25 13:10 maratal

Yes, this issue occurs every time — when the authUrl returns a 404.

final clientOptions = ably.ClientOptions( clientId: 'xxxx', authUrl: '404 url', );

devlb avatar Nov 03 '25 02:11 devlb

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.

maratal avatar Nov 03 '25 14:11 maratal

Image decodedError is the string "Bad Request". I hope it can be handled compatibly without crashing.

devlb avatar Nov 05 '25 06:11 devlb

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

maratal avatar Nov 05 '25 12:11 maratal

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?

devlb avatar Nov 06 '25 04:11 devlb

It's not yet released in ably-cocoa, once it's released, we'll update flutter and let you know ASAP.

maratal avatar Nov 06 '25 12:11 maratal

Please support it quickly — this is important.

devlb avatar Nov 06 '25 12:11 devlb

@devlb It's now fixed in https://github.com/ably/ably-flutter/releases/tag/v1.2.42

maratal avatar Nov 11 '25 14:11 maratal