-
Notifications
You must be signed in to change notification settings - Fork 786
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
Unexpected char in header #573
Comments
Same problem. Good explanation. My user has |
Same here, the 'i' causes problems with another header, but the problem is the same: |
same problem with Joplin app. |
a temporary workaround about the issue joltup#573
this project seems to be unmaintained but i made a pull request anyway: #762 |
.toLowerCase() function on an Android system with Turkish language causes a bug. Please see: joltup#573 Error message starts with "Error RNFetchBlob request error: Unexpected char 0x131 at ...". -> 0x131 is ı (dotless i). .toLowerCase() function works and does its job in a correct way. However, dotless i and normal i aren't considered equal, naturally. Only workaround, as far as i can find out, is this.
Not setting locale for language/country neutral operation may cause bug depending on the default locale. See https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#ROOT Note: I am just searching for `toLowerCase()` and `toUppercase()` in my project's dependencies and send the same PR, in order to potentially raise the awareness. Although I've seen the lack of explicit locale has caused issues for us, I am not sure if wix/Detox is actually affected. Example related issue: joltup/rn-fetch-blob#573
Not setting locale for language/country neutral operation may cause bug depending on the default locale. See https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#ROOT Note: I am just searching for toLowerCase() and toUppercase() in my project's dependencies and send the same PR, in order to potentially raise the awareness. Although I've seen the lack of explicit locale has caused issues for us, I am not sure if react-native-share is actually affected. Example related issue: joltup/rn-fetch-blob#573
Not setting locale for language/country neutral operation may cause bug depending on the default locale. See https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#ROOT Note: I am just searching for toLowerCase() and toUppercase() in my project's dependencies and send the same PR, in order to potentially raise the awareness. Although I've seen the lack of explicit locale has caused issues for us, I am not sure if react-native-share is actually affected. Example related issue: joltup/rn-fetch-blob#573
## [7.3.5](v7.3.4...v7.3.5) (2022-02-02) ### Bug Fixes * **android:** use Locale.ROOT when changing case in java ([#1152](#1152)) ([afd908c](afd908c)), closes [joltup/rn-fetch-blob#573](joltup/rn-fetch-blob#573)
Summary: Not setting locale for language/country neutral operation may cause bug depending on the default locale. See https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#ROOT Note: I am just searching for toLowerCase() and toUppercase() in my project's dependencies and send the same PR, in order to just be considered. Although I've seen the lack of explicit locale has caused issues for us, I am not sure if react-native is actually affected. I haven't checked for `String.format()` yet. Example related issue: joltup/rn-fetch-blob#573 ## Changelog [Android] [Fixed] - Use root locale when converting string case. Pull Request resolved: #33028 Reviewed By: ShikaSD Differential Revision: D33943446 Pulled By: cortinico fbshipit-source-id: d5be9392ea7c21a33436acac5b5e8c50b7c7e31e
Not setting locale for language/country neutral operation may cause bug depending on the default locale. See https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#ROOT Note: I am just searching for `toLowerCase()` and `toUppercase()` in my project's dependencies and send the same PR, in order to potentially raise the awareness. Although I've seen the lack of explicit locale has caused issues for us, I am not sure if wix/Detox is actually affected. Example related issue: joltup/rn-fetch-blob#573
Telefonun dilini(uygulamanın değil) bir kereliğine ingilizceye alıp senkronizasyon yapınca sorun çözülüyor. Sonra türkçe yapabilirsiniz. 😬 |
şimdi denedim. ilk sefer de problem çözülmüş gibi göründü. fakat yeni not ekleyince aynı hatayı verdi: |
Şifre ekleyince ya da şifreyi değiştirince yeniden ilk sefer için telefonun dilini ingilizceye çevirip bir kere daha senkronize etmek gerekiyor |
1 similar comment
Şifre ekleyince ya da şifreyi değiştirince yeniden ilk sefer için telefonun dilini ingilizceye çevirip bir kere daha senkronize etmek gerekiyor |
I don't understand Turkish but this issue was fixed in this fork: https://github.com/RonRadtke/react-native-blob-util |
Not setting locale for language/country neutral operation may cause bug depending on the default locale. See https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#ROOT Note: I am just searching for toLowerCase() and toUppercase() in my project's dependencies and send the same PR, in order to potentially raise the awareness. Although I've seen the lack of explicit locale has caused issues for us, I am not sure if react-native-share is actually affected. Example related issue: joltup/rn-fetch-blob#573
## [7.3.5](react-native-share/react-native-share@v7.3.4...v7.3.5) (2022-02-02) ### Bug Fixes * **android:** use Locale.ROOT when changing case in java ([#1152](react-native-share/react-native-share#1152)) ([afd908c](react-native-share/react-native-share@afd908c)), closes [joltup/rn-fetch-blob#573](joltup/rn-fetch-blob#573)
Summary: Not setting locale for language/country neutral operation may cause bug depending on the default locale. See https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#ROOT Note: I am just searching for toLowerCase() and toUppercase() in my project's dependencies and send the same PR, in order to just be considered. Although I've seen the lack of explicit locale has caused issues for us, I am not sure if react-native is actually affected. I haven't checked for `String.format()` yet. Example related issue: joltup/rn-fetch-blob#573 ## Changelog [Android] [Fixed] - Use root locale when converting string case. Pull Request resolved: facebook#33028 Reviewed By: ShikaSD Differential Revision: D33943446 Pulled By: cortinico fbshipit-source-id: d5be9392ea7c21a33436acac5b5e8c50b7c7e31e
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-native-share](https://react-native-share.github.io/react-native-share/) ([source](https://github.com/react-native-community/react-native-share)) | [`^7.3.2` -> `^7.9.1`](https://renovatebot.com/diffs/npm/react-native-share/7.3.2/7.9.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-share/7.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-share/7.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-share/7.3.2/7.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-share/7.3.2/7.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>react-native-community/react-native-share (react-native-share)</summary> ### [`v7.9.1`](https://github.com/react-native-share/react-native-share/releases/tag/v7.9.1) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.9.0...v7.9.1) ##### Bug Fixes - **android:** show extra dialog on Android, when users share a video to instagram ([#​1277](https://github.com/react-native-community/react-native-share/issues/1277)) ([acd283e](https://github.com/react-native-community/react-native-share/commit/acd283e9a9a0a6732b6fa1362a27b757b15441b3)) ### [`v7.9.0`](https://github.com/react-native-share/react-native-share/releases/tag/v7.9.0) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.8.0...v7.9.0) ##### Features - **ios:** Share a link for Messenger on iOS ([#​1268](https://github.com/react-native-community/react-native-share/issues/1268)) ([91be736](https://github.com/react-native-community/react-native-share/commit/91be7369e08cb3f5094ae42e1d8605dc1fd7528a)) ### [`v7.8.0`](https://github.com/react-native-share/react-native-share/releases/tag/v7.8.0) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.7.1...v7.8.0) ##### Features - **ios:** support added for instagram direct message ([#​1255](https://github.com/react-native-community/react-native-share/issues/1255)) ([146126b](https://github.com/react-native-community/react-native-share/commit/146126b6fef2bf8357ed5fbe319171216c4e1a97)) ### [`v7.7.1`](https://github.com/react-native-share/react-native-share/releases/tag/v7.7.1) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.7.0...v7.7.1) ##### Bug Fixes - **ios:** successCallback usages ([#​1257](https://github.com/react-native-community/react-native-share/issues/1257)) ([d3cfaef](https://github.com/react-native-community/react-native-share/commit/d3cfaefaf356b7fa99b142cde53e9f509ec859dd)) ### [`v7.7.0`](https://github.com/react-native-share/react-native-share/releases/tag/v7.7.0) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.6.6...v7.7.0) ##### Features - **windows:** support the new c++ react native for windows implement… ([#​1254](https://github.com/react-native-community/react-native-share/issues/1254)) ([c64f78d](https://github.com/react-native-community/react-native-share/commit/c64f78dfb8fc65d5c7ca5e33a5bbca6fc6107914)) ### [`v7.6.6`](https://github.com/react-native-share/react-native-share/releases/tag/v7.6.6) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.6.5...v7.6.6) ##### Bug Fixes - **android:** add background type for instagram video story sharing ([#​1248](https://github.com/react-native-community/react-native-share/issues/1248)) ([3d9312b](https://github.com/react-native-community/react-native-share/commit/3d9312bbde17326dd787b4947b308964beb2b1e2)) ### [`v7.6.5`](https://github.com/react-native-share/react-native-share/releases/tag/v7.6.5) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.6.4...v7.6.5) ##### Bug Fixes - **release:** force [#​1242](https://github.com/react-native-community/react-native-share/issues/1242) release ([40d7bd4](https://github.com/react-native-community/react-native-share/commit/40d7bd430603388533b05d9a6d7814e9add622bc)) ### [`v7.6.4`](https://github.com/react-native-share/react-native-share/releases/tag/v7.6.4) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.6.3...v7.6.4) ##### Bug Fixes - **android:** facebook stories ([#​1231](https://github.com/react-native-community/react-native-share/issues/1231)) ([8fcf8c2](https://github.com/react-native-community/react-native-share/commit/8fcf8c21dbc6d58ce8fc8dc256571ae498d3c1ab)) ### [`v7.6.3`](https://github.com/react-native-share/react-native-share/releases/tag/v7.6.3) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.6.2...v7.6.3) ##### Bug Fixes - **typing:** remove "method" typing ([#​1227](https://github.com/react-native-community/react-native-share/issues/1227)) ([a5b2710](https://github.com/react-native-community/react-native-share/commit/a5b27107c4e357f3b62199a3d63e2555af6d2ca9)) ### [`v7.6.2`](https://github.com/react-native-share/react-native-share/releases/tag/v7.6.2) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.6.1...v7.6.2) ##### Bug Fixes - **test:** validating semantic-release update ([d37af55](https://github.com/react-native-community/react-native-share/commit/d37af55d3b76139371e050befeb5eb8acebf6d96)) ### [`v7.6.1`](https://github.com/react-native-share/react-native-share/releases/tag/v7.6.1) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.6.0...v7.6.1) ##### Bug Fixes - **ios:** use https in place of https for facebook/instagram/whatsapp ([#​1215](https://github.com/react-native-community/react-native-share/issues/1215)) ([3d60abc](https://github.com/react-native-community/react-native-share/commit/3d60abc5c0a5ab81a8d0ddda11b7b27a38f84d6a)) ### [`v7.6.0`](https://github.com/react-native-share/react-native-share/releases/tag/v7.6.0) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.5.0...v7.6.0) ##### Features - singleShare supports for Viber ([#​1213](https://github.com/react-native-community/react-native-share/issues/1213)) ([c8e6219](https://github.com/react-native-community/react-native-share/commit/c8e621953f2264476cae8d178eadcc110616d2c0)) ### [`v7.5.0`](https://github.com/react-native-share/react-native-share/releases/tag/v7.5.0) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.4.1...v7.5.0) ##### Features - singleShare supports urls for email ([#​1204](https://github.com/react-native-community/react-native-share/issues/1204)) ([7910eea](https://github.com/react-native-community/react-native-share/commit/7910eea500ae3eb54e5b760abdf0f00323242e30)) ### [`v7.4.1`](https://github.com/react-native-share/react-native-share/releases/tag/v7.4.1) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.4.0...v7.4.1) ##### Bug Fixes - **ios:** remove old style double-quote imports ([#​1198](https://github.com/react-native-community/react-native-share/issues/1198)) ([96e93ce](https://github.com/react-native-community/react-native-share/commit/96e93ce487a51b60391b8de7551ec11655e6ebbe)) ### [`v7.4.0`](https://github.com/react-native-share/react-native-share/releases/tag/v7.4.0) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.3.9...v7.4.0) ##### Features - **task:** share with new task android ([#​1195](https://github.com/react-native-community/react-native-share/issues/1195)) ([7ace66e](https://github.com/react-native-community/react-native-share/commit/7ace66edf1cd6c3fb358d3fce8f9681536c7cd8e)) ### [`v7.3.9`](https://github.com/react-native-share/react-native-share/releases/tag/v7.3.9) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.3.8...v7.3.9) ##### Bug Fixes - **ios:** Replace initWithURLs with initForExportingURLs on iOS 15+ ([#​1181](https://github.com/react-native-community/react-native-share/issues/1181)) ([bf0a51e](https://github.com/react-native-community/react-native-share/commit/bf0a51eb8696ef34ee4012d492ea472d29a18c8a)) ### [`v7.3.8`](https://github.com/react-native-share/react-native-share/releases/tag/v7.3.8) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.3.7...v7.3.8) ##### Bug Fixes - **ios:** custom title got over written by meta data ([#​1184](https://github.com/react-native-community/react-native-share/issues/1184)) ([54a80d0](https://github.com/react-native-community/react-native-share/commit/54a80d0c259657389e1b593cffc5262fe0b0e4b8)) ### [`v7.3.7`](https://github.com/react-native-share/react-native-share/releases/tag/v7.3.7) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.3.6...v7.3.7) ##### Bug Fixes - whatsapp single share ([#​1171](https://github.com/react-native-community/react-native-share/issues/1171)) ([a57639a](https://github.com/react-native-community/react-native-share/commit/a57639a042fe81d998cb7f12024fd61136a1b1b9)) ### [`v7.3.6`](https://github.com/react-native-share/react-native-share/releases/tag/v7.3.6) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.3.5...v7.3.6) ##### Bug Fixes - Add mime type when using sticker image ([#​1140](https://github.com/react-native-community/react-native-share/issues/1140)) ([9389d2d](https://github.com/react-native-community/react-native-share/commit/9389d2d263b700d9e824aed9ae2a2d1bf8f3632c)) ### [`v7.3.5`](https://github.com/react-native-share/react-native-share/releases/tag/v7.3.5) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.3.4...v7.3.5) ##### Bug Fixes - **android:** use Locale.ROOT when changing case in java ([#​1152](https://github.com/react-native-community/react-native-share/issues/1152)) ([afd908c](https://github.com/react-native-community/react-native-share/commit/afd908c30d97cfb7b61712eda489a40775cf9044)), closes [joltup/rn-fetch-blob#573](https://github.com/joltup/rn-fetch-blob/issues/573) ### [`v7.3.4`](https://github.com/react-native-share/react-native-share/releases/tag/v7.3.4) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.3.3...v7.3.4) ##### Bug Fixes - support unknown whatsapp number ([4a56221](https://github.com/react-native-community/react-native-share/commit/4a56221c96383f8175e59e41844aecafae37fe90)) ### [`v7.3.3`](https://github.com/react-native-share/react-native-share/releases/tag/v7.3.3) [Compare Source](https://github.com/react-native-community/react-native-share/compare/v7.3.2...v7.3.3) ##### Bug Fixes - **android:** instagram stories added image/jpeg ([#​1137](https://github.com/react-native-community/react-native-share/issues/1137)) ([880b00d](https://github.com/react-native-community/react-native-share/commit/880b00da35b462a439f51df79dce1e9af59bca60)), closes [/github.com/react-native-share/react-native-share/issues/1084#issuecomment-932348328](https://github.com//github.com/react-native-share/react-native-share/issues/1084/issues/issuecomment-932348328) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone America/Los_Angeles. 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/valora-inc/wallet). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <valorabot@valoraapp.com> Co-authored-by: Jean Regisser <jean.regisser@gmail.com>
Environment
library version: 0.11.2
react: 16.13.0
react-native: 0.61.5
OS: Android
Description
there is this strange problem we are facing while trying to make a post request on android:
the header key we pass to the
JS
API is:'X-MOBILE-APP-VERSION'
however on the
native
side RNFetchBlob tries to set the header as:x-mobıle-app-versıonnull
this issue happens only when device's language is set to Turkish and the header is in caps. ( presumably ,depending on the header, other non ASCII languages should face the same problem)
Speculation
seems to be originating from
.toLowerCase()
inRNFetchBlobReq.java
StackTrace:
Error RNFetchBlob request error: Unexpected char 0x131 at 5 in header name: x-mobıle-app-versıonnull node_modules/rn-fetch-blob/index.js:307:25 node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:483:12 value node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:135:28 node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:8 value node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:134:17 value [native code] value
CodeSample
the following lines seems to be the problem:
The text was updated successfully, but these errors were encountered: