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.

tf.ready() crashing React Native (Expo managed) app with no error

See original GitHub issue

This was working fine yesterday, but started crashing today. No changes to package.json. Only known upgrade was Expo CLI upgrade to 6.0.1 (early than today). No other known new software installed between yesterday and today.

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): No. Example code is crashing also.

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Started with macOS Monterey 12.4, upgraded to 12.5 with same result

  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: iPhone 12 Pro, iOS 15.6

  • TensorFlow.js installed from (npm or script link): yarn

  • TensorFlow.js version (use command below): From the pose-detection example

    "@mediapipe/pose": "~0.4.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@tensorflow-models/pose-detection": "2.0.0",
    "@tensorflow/tfjs": "3.18.0",
    "@tensorflow/tfjs-react-native": "0.8.0",
    "expo": "~45.0.6",
    "expo-camera": "^12.2.0",
    "expo-file-system": "^14.0.0",
    "expo-gl": "^11.3.0",
    "expo-gl-cpp": "^11.3.0",
    "expo-screen-orientation": "~4.2.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-fs": "2.14.1",
    "react-native-gesture-handler": "~2.2.1",
    "react-native-svg": "12.3.0"
  • Browser version: n/a
  • Tensorflow.js Converter Version: n/a

Describe the current behavior App crashing without error on the call to await tf.ready();

Describe the expected behavior await tf.ready() is successful

Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/CodePen/any notebook.

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
jinjingforevercommented, Aug 4, 2022

Hi @darringrove

Sorry, I was busy with some other projects…

I took a look, and it is probably caused by this bug. Apparently, expo go app was updated 3 days ago, which added the support to expo sdk 46. But for some reason, it crashes apps that uses expo-gl and expo sdk 45. I updated pose-detection to expo sdk 46 and it seems to work now (PR). Please give it a try. Thanks!

1reaction
darringrovecommented, Aug 3, 2022

@rthadur @jinjingforever I’m not sure if this is a clue or not. I noticed in some other threads that calling tf.setBackend solved crashing problems.

I tried console.log(tf.getBackend()); before await tf.ready(). It returns undefined.

I tried await tf.setBackend('cpu'); before await tf.ready() (not sure this is the right backend), but with this tf.ready() returned, but then await posedetection.createDetector crashed the app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tensorflow - react native app crashes when tf.ready called
App crashes when tf.ready() is called. no error is logged in console. If i comment tf.ready() everything works fine. am i doing something...
Read more >
Troubleshooting build errors and crashes
A reference for troubleshooting build errors and crashes when using EAS Build. ... If you are working on a managed app and the...
Read more >
[Solved]-React-native iOS app crashes when taking picture ...
Coding example for the question React-native iOS app crashes when taking picture-React Native.
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
Bug :128538 - "sys-apps/coreutils: /bin/hostname should be installed from ... could not be found by inherit()" status:UNCONFIRMED resolution: severity:normal ...
Read more >
Build apps in Expo, monitor stability in Bugsnag
Bugsnag for Expo provides complete visibility into crashes through our React Native support.
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