Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo 51, can't build #78

Open
Nesquik opened this issue Jun 28, 2024 · 10 comments
Open

Expo 51, can't build #78

Nesquik opened this issue Jun 28, 2024 · 10 comments

Comments

@Nesquik
Copy link

Nesquik commented Jun 28, 2024

Hi there, while building locally a development apk:
eas build --profile development --platform android --local
I'm getting the following error:

[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Build file '/private/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/99ad5cb1-2cfd-4671-91de-b618846028b5/build/node_modules/@flyskywhy/react-native-gcanvas/android/build.gradle' line: 29
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred evaluating project ':flyskywhy_react-native-gcanvas'.
[RUN_GRADLEW] > Project with path ':android:gcanvas_library' could not be found in project ':flyskywhy_react-native-gcanvas'.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace
[RUN_GRADLEW] option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] > Get more help at https://help.gradle.org.
[RUN_GRADLEW] BUILD FAILED in 23s
[RUN_GRADLEW] 15 actionable tasks: 15 executed
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Build failed
Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
npx exited with non-zero code: 1

I'm on Mac OS.
Any workaround? Thanks

@flyskywhy
Copy link
Owner

Maybe you did not edit android/settings.gradle and react-native.config.js as described in 'flyskywhy/react-native-gcanvas/README.md'?

@Nesquik
Copy link
Author

Nesquik commented Jul 7, 2024

Thanks for the reply, I had actually added them but still had the error.

The issue was deeper and related to the fact that I'm not running the bare workflow but the fully managed, so not having the ios/android folders commited to my project those changes wouldn't actually stick.

To solve permanently I dug deeper into plugins and added the includes in the gradle.settings permanently by following what was done here: https://github.com/microsoft/react-native-code-push/blob/3e208623a62f50c06454cd51d3a1cf3595fd3bcc/plugin/src/android/settingsDependency.ts

in my project, via a Expo Plugin.

Now, the project builds, and I've brought the FrequencyHistogram into my project, and with some difficulties I've managed to use it, great! Android looks fine, even though I'm having some issues running both the code and my state and keeping performance acceptable.

Besides that, I'm now working on the iOS part and I've added another plugin, following this kind of code:
https://github.com/bndkt/react-native-widget-extension/blob/ee9d8974831025fa888868c38b4244529d58e428/plugin/src/withPodfile.ts#L6

I've only added the last part which pretty much sums to this:

      podFileContent = podFileContent
        .concat(`\n\n# >>> Inserted by my app \n`)
        .concat(
          `pod "GCanvas", :path => "../node_modules/@flyskywhy/react-native-gcanvas/GCanvas.podspec"`
        )
        .concat(`\n# >>> Inserted by my app `);

At this point the build gives this kind of error:

[RUN_FASTLANE] › Compiling @flyskywhy/react-native-gcanvas Pods/GCanvas » GPath2D.cpp
[RUN_FASTLANE] › Compiling @flyskywhy/react-native-gcanvas Pods/GCanvas » GPath.cpp
[RUN_FASTLANE] 
❌  (ios/Pods/GCanvas/core/src/gcanvas/GPath.cpp:41:5)

  39 |     endAngle = endAngle + delta;
  40 | 
> 41 |     assert((newStartAngle >= 0 && newStartAngle < pi2));
     |     ^ use of undeclared identifier 'assert'
  42 | 
  43 |     if (anticlockwise && startAngle - endAngle >= pi2) {
  44 |         endAngle = startAngle - pi2;

By investigating the issue (I'm no C++ developer) it looks like some .h files are missing in the original repo. Got any hints?
Thanks!

@Nesquik
Copy link
Author

Nesquik commented Jul 7, 2024

This is the fastlane error before erroring out, which I guess depends on the above:

[RUN_FASTLANE] ▸ ** BUILD FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸        CompileC /var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/b777a47b-442d-4056-927e-5d28cdcfcbd1/build/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GCanvas.build/Objects-normal/x86_64/GPath.o /var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/b777a47b-442d-4056-927e-5d28cdcfcbd1/build/ios/Pods/GCanvas/core/src/gcanvas/GPath.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** BUILD FAILED **
[RUN_FASTLANE] 
[RUN_FASTLANE] 
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE]  CompileC /var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/b777a47b-442d-4056-927e-5d28cdcfcbd1/build/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GCanvas.build/Objects-normal/x86_64/GPath.o /var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/b777a47b-442d-4056-927e-5d28cdcfcbd1/build/ios/Pods/GCanvas/core/src/gcanvas/GPath.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE] 
[RUN_FASTLANE] +---------------------------------------+
[RUN_FASTLANE] |           Build environment           |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path  | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.220.0                 |
[RUN_FASTLANE] | sdk         | iPhoneOS17.4.sdk        |
[RUN_FASTLANE] +-------------+-------------------------+

@Nesquik
Copy link
Author

Nesquik commented Jul 7, 2024

Right about now I have tried building a development-simulator build on Expo's servers and I get this kind of message error instead:

Screenshot 2024-07-07 at 14 50 15

Previous error was generated by a

 eas build --profile development-simulator --platform ios --local 

instead.

@Nesquik
Copy link
Author

Nesquik commented Jul 7, 2024

I have fixed the above, I lost several hours on this but the issue was due to me not re-running

yarn build plugin

to transpile the iOS plugin Typescript code to Javascript. ;(

Now, the very last issue resides on local compilation, when running the development-simulator build locally I get into this error:

[...]
RUN_FASTLANE] ⚠️  ld: ignoring duplicate libraries: '-lc++'
[RUN_FASTLANE] ⚠️  ld: search path '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/16ba7810-bf24-4195-8835-ea5327c72a69/build/ios/Pods/GCanvas' not found
[...]

That seems to break compilation locally:

[RUN_FASTLANE] ▸ ** ARCHIVE FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸        PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/nesquik/Library/Developer/Xcode/DerivedData/Funtimes-frhawfpihvdzjjbkyzajbyjtkssh/Build/Intermediates.noindex/ArchiveIntermediates/Funtimes/IntermediateBuildFilesPath/Funtimes.build/Release-iphoneos/Funtimes.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Funtimes' from project 'Funtimes')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** ARCHIVE FAILED **
[RUN_FASTLANE] 
[RUN_FASTLANE] 
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE]  PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/nesquik/Library/Developer/Xcode/DerivedData/Funtimes-frhawfpihvdzjjbkyzajbyjtkssh/Build/Intermediates.noindex/ArchiveIntermediates/HOWErgo/IntermediateBuildFilesPath/Funtimes.build/Release-iphoneos/Funtimes.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Funtimes' from project 'Funtimes')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE] 
[RUN_FASTLANE] +---------------------------------------+
[RUN_FASTLANE] |           Build environment           |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path  | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.220.0                 |
[RUN_FASTLANE] | sdk         | iPhoneOS17.4.sdk        |

Any ideas?

@Nesquik
Copy link
Author

Nesquik commented Jul 7, 2024

Actually, I think the build is failing locally due to this:

[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/default.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/grad.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/pattern.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/radiation.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/shadow.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/texture.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE] ▸ ** ARCHIVE FAILED **

Got any hints?

@flyskywhy
Copy link
Owner

This is the fastlane error before erroring out, which I guess depends on the above:

[RUN_FASTLANE] ▸ ** BUILD FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸        CompileC /var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/b777a47b-442d-4056-927e-5d28cdcfcbd1/build/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GCanvas.build/Objects-normal/x86_64/GPath.o /var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/b777a47b-442d-4056-927e-5d28cdcfcbd1/build/ios/Pods/GCanvas/core/src/gcanvas/GPath.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** BUILD FAILED **
[RUN_FASTLANE] 
[RUN_FASTLANE] 
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE]  CompileC /var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/b777a47b-442d-4056-927e-5d28cdcfcbd1/build/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GCanvas.build/Objects-normal/x86_64/GPath.o /var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/b777a47b-442d-4056-927e-5d28cdcfcbd1/build/ios/Pods/GCanvas/core/src/gcanvas/GPath.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE] 
[RUN_FASTLANE] +---------------------------------------+
[RUN_FASTLANE] |           Build environment           |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path  | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.220.0                 |
[RUN_FASTLANE] | sdk         | iPhoneOS17.4.sdk        |
[RUN_FASTLANE] +-------------+-------------------------+

The reason why can not support x64 in emulator was described here #28 (comment)

@flyskywhy
Copy link
Owner

flyskywhy commented Jul 8, 2024

Actually, I think the build is failing locally due to this:

[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/default.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/grad.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/pattern.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/radiation.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/shadow.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE]     no rule to process file '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/7d7ba4f1-48c6-44fb-9ec7-d884da48a034/build/node_modules/@flyskywhy/react-native-gcanvas/core/src/gcanvas/shaders/texture.glsl' of type 'text' for architecture 'arm64' (in target 'GCanvas' from project 'Pods')
[RUN_FASTLANE] ▸ ** ARCHIVE FAILED **

Got any hints?

Please try move 'core/src/gcanvas/shaders/.' in @flyskywhy/react-native-gcanvas/GCanvas.podspec from s.source_files to s.public_header_files, and tell me the result.

@Nesquik
Copy link
Author

Nesquik commented Jul 8, 2024

I've moved them, the warnings disappeared but it's still crashing.
Now honestly I've no idea how to debug the .sh crashing, I'm having some tough times finding on Google how to: :-)

[RUN_FASTLANE] › Compiling Funtimes » main.m
[RUN_FASTLANE] › Linking   Funtimes » Funtimes
[RUN_FASTLANE] ⚠️  ld: ignoring duplicate libraries: '-lc++'
[RUN_FASTLANE] ⚠️  ld: search path '/var/folders/c9/47rlcmqj1f5c9mcc5777bkbw0000gn/T/eas-build-local-nodejs/2f62d9f0-f70e-4eef-8087-f35f0dbf0246/build/ios/Pods/GCanvas' not found
[RUN_FASTLANE] › Generating debug Funtimes » Funtimes.app.dSYM
[RUN_FASTLANE] › Executing Funtimes » Bundle React Native code and images
[RUN_FASTLANE]     Bundler cache is empty, rebuilding (this may take a minute)
[RUN_FASTLANE] ⚠️  Script has ambiguous dependencies causing it to run on every build.
   To fix, go to: Xcode » Funtimes/Funtimes » Build Phases » 'Upload Debug Symbols to Sentry'
   Either: Uncheck "Based on dependency analysis", or select output files to trigger the script

[RUN_FASTLANE] ▸ ** ARCHIVE FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸        PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/nello/Library/Developer/Xcode/DerivedData/Funtimes-dpwakjhvbmspllcvdlhmgsjwoyjb/Build/Intermediates.noindex/ArchiveIntermediates/Funtimes/IntermediateBuildFilesPath/Funtimes.build/Release-iphoneos/Funtimes.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Funtimes' from project 'Funtimes')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** ARCHIVE FAILED **
[RUN_FASTLANE] 
[RUN_FASTLANE] 
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE]  PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/nello/Library/Developer/Xcode/DerivedData/Funtimes-dpwakjhvbmspllcvdlhmgsjwoyjb/Build/Intermediates.noindex/ArchiveIntermediates/Funtimes/IntermediateBuildFilesPath/Funtimes.build/Release-iphoneos/Funtimes.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Funtimes' from project 'Funtimes')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE] 
[RUN_FASTLANE] +---------------------------------------+
[RUN_FASTLANE] |           Build environment           |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path  | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.220.0                 |
[RUN_FASTLANE] | sdk         | iPhoneOS17.5.sdk        |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] 

@Nesquik
Copy link
Author

Nesquik commented Jul 8, 2024

On a positive note the application is properly building if I run an npx expo prebuild, a npx pod-install and then use Xcode to Product > Archive (albeit I have to manually select the development team and toggling a few environment vars sometimes) to get the .ipa.

I'm a bit of a loss, I'm still investigating if I can better debug the RUN_FASTLANE step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants