Giter Site home page Giter Site logo

Comments (16)

ChristopherGabba avatar ChristopherGabba commented on July 19, 2024 2

I'm also experiencing this bug for some users.

Sentry capturing this:
Screenshot 2024-05-31 at 8 27 44 AM

from expo.

ChristopherGabba avatar ChristopherGabba commented on July 19, 2024 2

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:

  • iOS 17.4.1
  • iPhone 13
  • expo-contacts 13.0.3

I downgraded our app to expo-contacts 12.8.2 and the bug disappeared and it no longer crashes.

from expo.

amitshabo avatar amitshabo commented on July 19, 2024 2

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.
any suggestions?

from expo.

savkevip avatar savkevip commented on July 19, 2024 1

Same here :/

from expo.

ChristopherGabba avatar ChristopherGabba commented on July 19, 2024 1

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.

from expo.

Gutistavo avatar Gutistavo commented on July 19, 2024 1

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:
/node_modules/expo-contacts/ios/Serialization.swift

Change the following line:

   if fieldHasValue(field: person.departmentName) {
-    contact[ContactsKey.department] = person.dates
+    contact[ContactsKey.department] = person.departmentName
   }

Finally, go to the root of your project and run the command to create the correction patch:

npx patch-package expo-contacts

from expo.

gabrieldonadel avatar gabrieldonadel commented on July 19, 2024 1

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.

from expo.

ChristopherGabba avatar ChristopherGabba commented on July 19, 2024

@Gutistavo Seems like a really obvious and easy to fix bug. We shall see how long it takes for them to fix...

from expo.

gabrieldonadel avatar gabrieldonadel commented on July 19, 2024

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 [email protected] today for the fix

from expo.

amitshabo avatar amitshabo commented on July 19, 2024

Hi @gabrieldonadel , Im currently on dev, installed the [email protected], still crashes. you sure the department was the only problem?

from expo.

gabrieldonadel avatar gabrieldonadel commented on July 19, 2024

If you're running a development build can you share the error given by Xcode when the app crashes?

from expo.

ChristopherGabba avatar ChristopherGabba commented on July 19, 2024

@amitshabo You may need to recompile a new development build for the new version to go live. This did it for me.

from expo.

savkevip avatar savkevip commented on July 19, 2024

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: /node_modules/expo-contacts/ios/Serialization.swift

Change the following line:

   if fieldHasValue(field: person.departmentName) {
-    contact[ContactsKey.department] = person.dates
+    contact[ContactsKey.department] = person.departmentName
   }

Finally, go to the root of your project and run the command to create the correction patch:

npx patch-package expo-contacts

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?

from expo.

gabrieldonadel avatar gabrieldonadel commented on July 19, 2024

@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?

from expo.

savkevip avatar savkevip commented on July 19, 2024

@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 npx expo run:ios --device on the device everything is ok when I run over the QR code just crashes without error (no error in the console just the app closes) and when I try to run it on Xcode is crashing on the build.

from expo.

ChristopherGabba avatar ChristopherGabba commented on July 19, 2024

@savkevip I think if you are using expo-dev build you need to rebuild your development client with the updated 13.0.4 version.

from expo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.