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.

Failed to discover platform for executable TSBackgroundFetch

See original GitHub issue

Your Environment

  • Plugin version:4.0.2
  • Platform: iOS
  • OS version: 14.4.2
  • Device manufacturer / model: iphone SE
  • React Native version (react-native -v): 0.64
  • Plugin config

Expected Behavior

When i archive the app i expect it to not throw a macho error. and to archive the app successfully

Actual Behavior

App build correcty though it throws an macho error.

Steps to Reproduce

  1. Install react-native-background-fetch
  2. set it up and make it work
  3. archive the app
  4. Recive macho error.

Context

Im using transistorsoft /react-native-background-geolocation together with this library.

Debug logs

IDEDistrubution.verbose.log

2021-04-22 14:55:50 +0000 Unable to determine platform from macho “/Users/joakimwennergren/Library/Developer/Xcode/Archives/2021-04-22/ActiveQuiz 2021-04-22, 16.54.xcarchive/Products/Applications/ActiveQuiz.app/ActiveQuiz-mobile-app/node_modules/react-native-background-fetch/ios/RNBackgroundFetch/TSBackgroundFetch.xcframework/ios-arm64_x86_64-maccatalyst/TSBackgroundFetch.framework”. Failed with error: “Failed to discover platform for executable /Users/joakimwennergren/Library/Developer/Xcode/Archives/2021-04-22/ActiveQuiz 2021-04-22, 16.54.xcarchive/Products/Applications/ActiveQuiz.app/ActiveQuiz-mobile-app/node_modules/react-native-background-fetch/ios/RNBackgroundFetch/TSBackgroundFetch.xcframework/ios-arm64_x86_64-maccatalyst/TSBackgroundFetch.framework/TSBackgroundFetch”

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
joakimwennergrencommented, Apr 26, 2021

I found the issue at last. Under build phases -> copy bundle resources ,somehow i managed to have included the whole working directory. I removed this directory from the list and it actually works to archive now.

This was not an issue with the library so i’m closing this issue now.

0reactions
joakimwennergrencommented, Apr 23, 2021

Is your error similar to this?

No i’m not using carthage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error upon app archive: Found an unexpected Mach-O header ...
Failed with error: "Failed to discover platform for executable ... From the Technical Note, here's how you can find out if a binary...
Read more >
Analysis Report Jojob Corporate Carpooling_v1.21_apkpure ...
Source: com.transistorsoft.tsbackgroundfetch.BackgroundFetchConfig$Builder;->load:29, API Call: android.content.SharedPreferences.getString ...
Read more >
exception: gradle task assembledevdebug failed with exit code 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with...
Read more >
Periodic Callbacks in The Background for Both IOS and android
adb logcat *:S ReactNative:V ReactNativeJS:V TSBackgroundFetch:V ... With Kivy, you can develop platform-independent applications that compile for iOS, ...
Read more >
Error: Could not find or load main class hello_2 Caused by: java ...
Check your build.gradle file and update the application block: application { // Define the main class for the application. // insert the entire...
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