[Apple] Guess string encoding when creating an NSString with UTF8 fails#1891
Merged
goaway merged 2 commits intoenvoyproxy:mainfrom Oct 21, 2021
Merged
[Apple] Guess string encoding when creating an NSString with UTF8 fails#1891goaway merged 2 commits intoenvoyproxy:mainfrom
goaway merged 2 commits intoenvoyproxy:mainfrom
Conversation
And log when an NSString could not be created to help debug occurrences in production. Signed-off-by: JP Simard <[email protected]>
Contributor
Author
|
Could a maintainer please retry the failed CI workflows? They failed due to this GitHub incident which is now resolved. |
Signed-off-by: JP Simard <[email protected]>
jpsim
added a commit
to jpsim/envoy-mobile
that referenced
this pull request
Oct 21, 2021
* origin/main: [Apple] Guess string encoding when creating an NSString with UTF8 fails (envoyproxy#1891) Link android dev document in a doctree (envoyproxy#1892) bazel: Remove rules_jvm_external dep on JAVA_HOME (envoyproxy#1890) release: 0.4.3.20211020 (envoyproxy#1887) Add debug instructions and sample bazelproject (envoyproxy#1888) bazel: Use hermetic JDK 11 (envoyproxy#1863) envoy: bump upstream to c687308 (envoyproxy#1886) docs: how to test with local envoy (envoyproxy#1876) network: implement initial heuristic for binding alternate interface (envoyproxy#1858) Assign an int to each log level (envoyproxy#1885) envoy: bump upstream to a5b3af2 (envoyproxy#1884) android: stub out jni logging by default (envoyproxy#1879) CI: Add local JDK to asan/tsan builds (envoyproxy#1878) Make JniBridgeUtility public (envoyproxy#1880) swift: Fix Swift version in podspec (envoyproxy#1875) Signed-off-by: JP Simard <[email protected]>
Contributor
|
I think that the approach in this PR may work but I'm worried that we will never be able to tell whether it fixed the issue or not. How/Where are we going to see added logs? |
Contributor
Author
I believe we'd only be able to capture this locally for now. We'll need to come up with a mechanism to emit logger events from within a C header context. That's why I left the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
envoy_datavalues convert to a nilNSStringvalue. It's possible these headers aren't encoded in valid UTF-8. So in the case where the string conversion fails, we can attempt to haveNSStringguess an encoding. I've added a log with some debugging breadcrumbs in the case where a string could be created with a fallback encoding, and in the case where that fallback fails as well.