-
Notifications
You must be signed in to change notification settings - Fork 731
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
App crashes on iOS 14.4.1 #3247
Comments
We have found same issue (we are using version 1.5.2 and iOS 14.4 (18D46)). Based on the investigation, issue is probably related with some change in |
Thanks for the issue reports, we'll take a look into this asap. |
Update: I've got a fix for this figured out. I just need to do some clean up of the code and tests to get the PR packaged up nicely. Ran out of time for tonight, but I'll get this finished up tomorrow and a PR in. We are going to include this in the 1.6.0 release that is coming at the end of the week! |
I've got a PR for the fix up now here. |
Closed by: apollographql/apollo-ios-dev#61 |
There was a minor mistake in that PR. This is now fixed by: apollographql/apollo-ios-dev#68. We'll be putting out a 1.6.1 patch to correct this shortly! |
Summary
On iOS 14.4.1 I'm getting the following exception when running my app
SIGABRT: Could not cast value of type 'Swift.AnyHashable' (0x...) to 'Swift.String' (0x...).
when accessing the
key
subscript in theDataDict
(line 55_data[key] as! T
).This is not the first query that is loaded, but it is a first one that has a more complex structure including fragments and also probably the first query that has an optional property with
nil
assigned .The
value
linked to thekey
is of typeString?
and the actual value isnil
.The same app loading the same data does not crash on iOS 16.6.1 and iOS 17.0.2.
Version
1.5.0
Steps to reproduce the behavior
I have tried to replicate the issue in a demo project, but couldn't do so using the mocking option.
If you can point me in the right direction on how to write a test with loading a JSON file, I'm happy to provide a demo project that replicates the behaviour.
Sorry for not providing more relevant info at the moment.
Logs
No response
Anything else?
Reverting Apollo to 1.4.0 "solves" the issue.
The text was updated successfully, but these errors were encountered: