Skip to content

[in_app_purchase_storekit] Fix type of error code returned from native code in SKReceiptManager.retrieveReceiptData - #6265

Merged
LouiseHsu merged 2 commits into
flutter:mainfrom
blaugold:iap-fix-error-code-type
Mar 5, 2024
Merged

[in_app_purchase_storekit] Fix type of error code returned from native code in SKReceiptManager.retrieveReceiptData#6265
LouiseHsu merged 2 commits into
flutter:mainfrom
blaugold:iap-fix-error-code-type

Conversation

@blaugold

@blaugoldblaugold commented Mar 5, 2024

Copy link
Copy Markdown
Contributor

The native code did not convert the integer code returned from FIAObjectTranslator getMapFromNSError to a string before passing it to FlutterError errorWithCode. This allowed an int to flow into a position where the corresponding Dart code expects a String.

Fixesflutter/flutter#144595

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

…e code in `SKReceiptManager.retrieveReceiptData`
@LouiseHsu

Copy link
Copy Markdown
Contributor

Ah, thanks a lot for the quick fix!! LGTM

@blaugold

Copy link
Copy Markdown
ContributorAuthor

@LouiseHsu Thanks for the review! Is there anything else left for me to do before this can be merged?

@LouiseHsu

Copy link
Copy Markdown
Contributor

Nope, go ahead and merge it :)

@blaugold

Copy link
Copy Markdown
ContributorAuthor

Great! Could you do that for me? 😊 I don't have the necessary permissions.

@LouiseHsu
LouiseHsu merged commit 2aa6e3f into flutter:mainMar 5, 2024
@LouiseHsu

Copy link
Copy Markdown
Contributor

oops, didnt realize!

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 5, 2024
auto-submitBot pushed a commit to flutter/flutter that referenced this pull request Mar 5, 2024
flutter/packages@0625827...2aa6e3f
2024-03-05 gabriel@terwesten.net [in_app_purchase_storekit] Fix type of error code returned from native code in `SKReceiptManager.retrieveReceiptData` (flutter/packages#6265)
2024-03-05 slowhand0309@gmail.com [video_player] Fix typo in readme (flutter/packages#6264)
2024-03-05 10687576+bparrishMines@users.noreply.github.com [pigeon] Separates message call code generation into separate methods in the SwiftGenerator (flutter/packages#5959)
2024-03-05 5384625+pzierahn@users.noreply.github.com [flutter_markdown] Fix WidgetSpan Support in MarkdownElementBuilder (flutter/packages#6225)
2024-03-04 stuartmorgan@google.com [webview_flutter] Make WebKitWebViewWidget unit tests stateless (flutter/packages#6228)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…e code in `SKReceiptManager.retrieveReceiptData` (flutter#6265)
The native code did not convert the integer `code` returned from
`FIAObjectTranslator getMapFromNSError` to a string before passing it to
`FlutterError errorWithCode`. This allowed an `int` to flow into a
position where the corresponding Dart code expects a `String`.
Fixesflutter/flutter#144595
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran the
auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages
repo does use `dart format`.)
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I updated `pubspec.yaml` with an appropriate new version according
to the [pub versioning philosophy], or this PR is [exempt from version
changes].
- [x] I updated `CHANGELOG.md` to add a description of the change,
[following repository CHANGELOG style].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates
[following repository CHANGELOG style]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
Co-authored-by: LouiseHsu <louisehsu@google.com>
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
…e code in `SKReceiptManager.retrieveReceiptData` (flutter#6265)
The native code did not convert the integer `code` returned from
`FIAObjectTranslator getMapFromNSError` to a string before passing it to
`FlutterError errorWithCode`. This allowed an `int` to flow into a
position where the corresponding Dart code expects a `String`.
Fixesflutter/flutter#144595
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran the
auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages
repo does use `dart format`.)
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I updated `pubspec.yaml` with an appropriate new version according
to the [pub versioning philosophy], or this PR is [exempt from version
changes].
- [x] I updated `CHANGELOG.md` to add a description of the change,
[following repository CHANGELOG style].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates
[following repository CHANGELOG style]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
Co-authored-by: LouiseHsu <louisehsu@google.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[in_app_purchase_storekit] Native code returns wrong type for error code in SKReceiptManager.retrieveReceiptData

2 participants

@blaugold@LouiseHsu