-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[expo-contacts] GetContactsAsync crash on ios #29224
Comments
Same here :/ |
I will spend some time debugging this in the evening today. It happens for one user but not the other with the same code, so I suspect it may be related to a specific contact or something in a weird format causing the crash. Will post details after. |
Okay I ruled it down to the line of code: const { data } = await Contacts.getContactsAsync({
fields: [
Contacts.Fields.ID,
Contacts.Fields.Name,
Contacts.Fields.PhoneNumbers,
Contacts.Fields.Image,
Contacts.Fields.ImageAvailable,
],
}) Device Info:
I downgraded our app to expo-contacts 12.8.2 and the bug disappeared and it no longer crashes. |
Guys, this freezing issue occurs when a contact in the iPhone has the department field filled. Unfortunately, it hasn't been fixed yet, but to manually correct it, do this: Access the file: Change the following line:
Finally, go to the root of your project and run the command to create the correction patch: npx patch-package expo-contacts |
@Gutistavo Seems like a really obvious and easy to fix bug. We shall see how long it takes for them to fix... |
This issue was actually fixed here a few weeks ago #28968. I just cherry-picked the commit with the fix to our SDK 51 branch and a new version of expo-contacts will be available soon. |
Still crashing on expo-contacts 13.0.4, i dont think the department name is the only problem.. i tried also with npx patch-package before the publish and still crash. |
Hi @amitshabo, the fix for this will go into expo go in the next build that we do in the coming weeks. In dev builds/release builds, you can install expo-contacts@13.0.4 today for the fix |
Hi @gabrieldonadel , Im currently on dev, installed the expo-contacts@13.0.4, still crashes. you sure the department was the only problem? |
If you're running a development build can you share the error given by Xcode when the app crashes? |
@amitshabo You may need to recompile a new development build for the new version to go live. This did it for me. |
I have still the error even I see this is fixed in 13.0.4 - > node_modules... I tried to downgrade the version but nothing helped... getContactsAsync working only if I dont send any arguments but there are no names which I need... only solution is maybe to return to SDK 50? |
@savkevip If you're running a development build and not using Expo Go, can you share the error given by Xcode when the app crashes? |
so when I run |
@savkevip I think if you are using expo-dev build you need to rebuild your development client with the updated 13.0.4 version. |
I still face the same problem with the expo-contacts library crashing on iOS. I've tried all the suggested fixes, but nothing has worked. |
What worked for me was in local turn it off with config and in prod / test mode enable it after build and it works perfect. |
How do you mean?
Jay Stance
…On Tue, 20 Aug 2024 at 7:31 AM, Amit Shabo ***@***.***> wrote:
I still face the same problem with the expo-contacts library crashing on
iOS. I've tried all the suggested fixes, but nothing has worked.
What worked for me was in local turn it off with config and in prod / test
mode enable it after build and it works perfect.
i have developed it with just requesting like 100 contacts instead of all
and in prod mode i have taken all.
—
Reply to this email directly, view it on GitHub
<#29224 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQHOHR4UNWAPVOAQXRXZP2DZSLPCZAVCNFSM6AAAAABISFDK7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJYGA3DQOBUHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I did something like this:
In production it works with all the contacts. just local its still crashed for me.. |
Minimal reproducible example
https://github.com/expo/expo
What platform(s) does this occur on?
iOS
Did you reproduce this issue in a development build?
No (tested in Expo Go)
Summary
since i upgraded to expo 51 the expo-contacts libary is crashing on ios when im calling the function getContactsAsync with phoneNumbers / email (that what i tried).
Environment
System:
OS: macOS 14.5
Shell: 3.2.57 - /bin/sh
Binaries:
Node: 20.10.0 - /usr/local/bin/node
npm: 10.8.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.11090377
Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
npmPackages:
@expo/metro-config: ~0.18.1 => 0.18.3
expo: ~51.0.9 => 51.0.9
react: 18.2.0 => 18.2.0
react-native: 0.74.1 => 0.74.1
npmGlobalPackages:
eas-cli: 9.1.0
expo-cli: 6.3.10
Expo Workflow: bare
Expo Doctor Diagnostics
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check for issues with metro config
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK
Didn't find any issues with the project!
The text was updated successfully, but these errors were encountered: