question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Contact getContactByIdAsync API not working

See original GitHub issue

Environment

Environment: OS: Windows 10 Node: 9.3.0 Yarn: 1.3.2 npm: 5.7.1 Watchman: Not Found Xcode: N/A Android Studio: Version 3.0.0.0 AI-171.4443003

Packages: (wanted => installed) expo: ^25.0.0 => 25.0.0 react: ^16.2.0 => 16.2.0 react-native: ^0.52.0 => 0.52.0

Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/jurosh-cbe5f27b-45bd-42dc-ab30-0a113d661cc3.tar.gz

Tested targets:

Android (MIUI 9) VS Emulator for Anroid

Steps to Reproduce

  1. Get contacts with Expo.Contacts.getContactsAsync(options) so we will know contact.id
  2. Try to get single contact with Expo.Contacts.getContactByIdAsync(options)
await Expo.Contacts.getContactByIdAsync({
    fields: [],
    id: 'SOME_CONTACT_ID'
  });

Expected Behavior

Should return single contact.

Actual Behavior

Uncaught Error: no such column: contact_id (code 1), whilte compiling: SELECT sort_key, photo_uri, nickname, send_to,......
Fatal Error

screenshot_2018-03-21-21-42-38-970_host exp exponent

Reproducible Demo

Contact API is not working in snack.expo - not even getting of all contacts. So cannot reproduce there. 😕

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
schazerscommented, Mar 22, 2018

Ah, I’m sorry, I made a silly mistake - I tested on an iOS device, not an Android one. It looks like there may be an bug - thank you for the report! We’ll look into it.

@esamelson - are you the right person to report this to? If not, would you mind forwarding to whomever is? This snack seems to work fine on iOS but breaks on android: https://snack.expo.io/ByHARLe9G

1reaction
esamelsoncommented, Mar 23, 2018

Hi @jurosh - sorry about this. Next time we do an Android release, it will include this fix for SDK 25. We don’t always announce minor releases, so I’ll do my best to keep you posted!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Contacts - Expo Documentation
isAvailableAsync() Returns whether the Contacts API is enabled on the current device. This method does not check the app permissions.
Read more >
REST API - Telerivet
Any service that can be triggered for a contact can be invoked via this method, whether or not the service actually sends a...
Read more >
Blazor, HttpClientFactory, and Web API | C# Tutorials Blog
To use the GetContactByIdAsync() method, simply pass the id value of the contact whose information you want to retrieve to the method. Contact ......
Read more >
ASP.NET Core Logging with Serilog and SQL Server
Below is a web API action method for getting and returning a record (a contact in this case). We log when the contact...
Read more >
expo-contacts - npm
Start using expo-contacts in your project by running `npm i expo-contacts`. ... getContactByIdAsync(contactId: string, fields: FieldType[]): ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found