facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

Build fail due to faulty upper/lowercase conversion in different languages #559

Open tkaplan9 opened 5 years ago

tkaplan9 commented 5 years ago

I have initialized a new android project and I installed react-native-fbsdk on my project, after doing all the necessary configuration steps provided in the main page here, facebook getting started page, and the quick start for android page I am not able to run my project, even without writing any code.

Here's the error message I'm getting:

> Task :react-native-fbsdk:generateDebugRFile FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-fbsdk:generateDebugRFile'.
> Illegal char <?> at index 7: ..\..\l?brary_man?fest\debug\AndroidManifest.xml

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with
Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:comm
and_line_warnings

BU?LD FAILED in 3s
10 actionable tasks: 2 executed, 8 up-to-date
error Could not install the app on the device, read the error above for details.

Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag
for more details.

Solution

Turns out the problem is about the library_manifest issue, my computer's language is set as Turkish. After changing my computer's display language to English and restarting the computer I deleted node_modules and npm installed in the project and now it works.

I assume when installing react-native-fbsdk files there is a conversion from uppercase to lowercase for the filenames and this is the cause of the problem, since in Turkish there are two different letter "I"s. "I"s lowercase counterpart is "ı" and "i"s uppercase counterpart is "İ". Surely enough the "library_manifest" in the same file path has "i"s in it now in the working version. It used to be "lıbrary_manıfest", and I assume it showed "?" instead of "ı" in the console due to "ı" not being recognized.

I kindly demand a fix for computer's regarding languages that have the letters "i/ı". As it took me quite a long time to fix this issue and i hope in the future others who use computers with such languages won't have to face this problem.