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.

Initializing task consumer 'expo.modules.location.a.b' failed.

See original GitHub issue

🐛 Bug Report

Environment


Expo CLI 2.14.0 environment info:
    System:
      OS: macOS 10.14.4
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 11.8.0 - /usr/local/bin/node
      Yarn: 1.13.0 - /usr/local/bin/yarn
      npm: 6.8.0 - /usr/local/bin/npm
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5264788
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      @storybook/react-native: ^4.1.4 => 4.1.6 
      expo: ^32.0.0 => 32.0.1 
      react: 16.5.0 => 16.5.0 
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1 

Steps to Reproduce

Define task in App.js file (not in Class)

TaskManager.defineTask('TEST', ({ data: { locations }, error }) => {
  console.log(locations)
  Alert.alert('New location')
  if (error) {
    console.log(error.message)
    return
  }
  console.log('Received new locations', locations)
})

Next, in componentDidMount of App, we start tracking location:

await Location.startLocationUpdatesAsync('TEST', {
      distanceInterval: 50,
      accuracy: Location.Accuracy.Highest,
    })

Expected Behavior

Starts tracking location updates

Actual Behavior

Crashes and throws Error: Initializing task consumer 'expo.modules.location.a.b' failed.

IMPORTANT NOTE:

This crash only happens in production, it works fine in development.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
xanderdeseyncommented, Apr 4, 2019

Hi guys, I figured out what the problem was: Proguard. Add this rule to your proguard-rules.pro file and it will work:

-keep class expo.modules.location.** { *; }

If you look at the source, some voodoo is happening with retrieving the name of the constructor and calling that (which proguard messes up with their obfuscation).

I think this should be mentioned in the docs.

0reactions
github-actions[bot]commented, Feb 17, 2022

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Execution failed for task ':expo-modules-core ... - Stack Overflow
I tried a ton of ways. Finally, I find out where is the problem from. It's come from javac , I don't have...
Read more >
Fixed Problem Reports - Siemens PLM
PR Number Description Application Fun... 1936413 Turning Gouge caused by retract CAM DO... 1998116 Harness_OffsetRoutingEnvironmentSelectionError ROUTING_GENERAL PATH 2135959 Blend cannot be made by Face Blend. DESIGN...
Read more >
US20100228674A1 - Cryptographic module for secure processing ...
The modules encipher the information stored in the central database for all of the on-line VBI system customers and are capable of preventing...
Read more >
Available CRAN Packages By Name
ArArRedux, Rigorous Data Reduction and Error Propagation of Ar40 / Ar39 Data ... autohrf, Automated Generation of Data-Informed GLM Models in Task-Based ...
Read more >
Command Line Interface - Check Point Software Technologies
cp_conf sic init <Activation Key> [norestart] # Initialize. SIC cp_conf sic cert_pull <SmartCenter Server name/IP> <module object name> # Pull certificate ...
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