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

Fix iOS dropping envelopes with UTF16 characters #150

Merged
merged 3 commits into from
Mar 14, 2022

Conversation

lucas-zimerman
Copy link
Collaborator

@lucas-zimerman lucas-zimerman commented Mar 10, 2022

@lucas-zimerman lucas-zimerman marked this pull request as ready for review March 10, 2022 17:04
@lucas-zimerman
Copy link
Collaborator Author

It may be time consuming but ideally we should have an integration tests testing the integration of the Capacitor + Native SDKs.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the sample event break before this change?

@@ -89,6 +89,16 @@ public class SentryCapacitor: CAPPlugin {
call.resolve()
}

@objc func getStringBytesLength(_ call: CAPPluginCall) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this called from JS for both iOS and Android?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but only Android implemented it

public void getStringBytesLength(PluginCall call) {

in this case on iOS it was falling back to the value set in JS, which worked for most cases but not all of them.

@lucas-zimerman
Copy link
Collaborator Author

Did the sample event break before this change?

No because the same was only using UTF8 characters.

@bruno-garcia bruno-garcia changed the title Fix iOS dropping events if envelope contains UTF16 character or higher Fix iOS dropping envelopes with UTF16 characters Mar 14, 2022
@bruno-garcia bruno-garcia merged commit d8b690d into main Mar 14, 2022
@bruno-garcia bruno-garcia deleted the fix/ios-envelope-size branch March 14, 2022 18:24
@github-actions
Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.
Example:

## Unreleased

### Fixes/Features

- Fix iOS dropping envelopes with UTF16 characters ([#150](https://github.com/getsentry/sentry-capacitor/pull/150))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 3bc52f5

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

Successfully merging this pull request may close these issues.

Special characters in breadcrumb contents cause events to never be sent
2 participants