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

getCountryCode methods are not implementing countryCode platform interface method #147230

Closed
vmeretin opened this issue Apr 23, 2024 · 7 comments · Fixed by flutter/packages#6636
Assignees
Labels
p: in_app_purchase Plugin for in-app purchase P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. r: fixed Issue is closed as already fixed in a newer version team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team

Comments

@vmeretin
Copy link

What package does this bug report belong to?

in_app_purchase

What target platforms are you seeing this bug on?

Android, iOS

Have you already upgraded your packages?

Yes

Dependency versions

pubspec.lock
  in_app_purchase:
    dependency: "direct main"
    description:
      name: in_app_purchase
      sha256: "960f26a08d9351fb8f89f08901f8a829d41b04d45a694b8f776121d9e41dcad6"
      url: "https://pub.dev"
    source: hosted
    version: "3.2.0"
  in_app_purchase_android:
    dependency: transitive
    description:
      name: in_app_purchase_android
      sha256: "15800e366f80bc8e5e15b960f52aac337722e3c5d9a46bf1157d010cfc606938"
      url: "https://pub.dev"
    source: hosted
    version: "0.3.4"
  in_app_purchase_platform_interface:
    dependency: transitive
    description:
      name: in_app_purchase_platform_interface
      sha256: "1d353d38251da5b9fea6635c0ebfc6bb17a2d28d0e86ea5e083bf64244f1fb4c"
      url: "https://pub.dev"
    source: hosted
    version: "1.4.0"
  in_app_purchase_storekit:
    dependency: transitive
    description:
      name: in_app_purchase_storekit
      sha256: eee35ad057c91f6d0e08db840ade03a9db6121beb03469590296f719f5936e68
      url: "https://pub.dev"
    source: hosted
    version: "0.3.14"

Steps to reproduce

Upgrade in_app_purchase to 3.2.0 version

Expected results

InAppPurchasePlatform.instance.countryCode() is working

Actual results

InAppPurchasePlatform.instance.countryCode() is not working

Code sample

Code sample
InAppPurchasePlatform.instance.countryCode()

Screenshots or Videos

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-arm64, locale ru-RU)
    • Flutter version 3.19.5 on channel stable at /Users/vmeretin/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (4 weeks ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/vmeretin/dev/android-sdk/
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/vmeretin/dev/android-sdk/
    • ANDROID_SDK_ROOT = /Users/vmeretin/dev/android-sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] IntelliJ IDEA Community Edition (version 2024.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 79.0.3
    • Dart plugin version 241.15845

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 124.0.6367.62
    ! Error: Browsing on the local area network for vmeretin. Ensure the device is unlocked and attached with a
      cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Apr 23, 2024
@darshankawar
Copy link
Member

@vmeretin
This PR seems to have recently merged flutter/packages#6540.
The plugin changelog does show that countryCode api is added: https://pub.dev/packages/in_app_purchase/changelog#320

Check the same in latest master version and with latest plugin version.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 23, 2024
@vmeretin
Copy link
Author

In platform interface method is called countryCode , but in platform implementations method is called getCountryCode (Android) and getCountryCode (iOS).

So method is not working correctly and always throw UnimplementedError.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 24, 2024
@darshankawar
Copy link
Member

Thanks for the update.

@darshankawar darshankawar added p: in_app_purchase Plugin for in-app purchase package flutter/packages repository. See also p: labels. team-ecosystem Owned by Ecosystem team and removed in triage Presently being triaged by the triage team labels Apr 24, 2024
@stuartmorgan stuartmorgan added P1 High-priority issues at the top of the work list triaged-ecosystem Triaged by Ecosystem team labels Apr 30, 2024
@stuartmorgan
Copy link
Contributor

I missed that the implementation PR didn't @override, which would have turned this into an analyzer error.

@reidbaker
Copy link
Contributor

@vmeretin thank you for the bug and I am embarrassed I messed this up. Fix coming in shortly.

auto-submit bot pushed a commit to flutter/packages that referenced this issue May 2, 2024
- **Rename getCountryCode to country code for ios and android IAP**
- **Add changelog**
fixes flutter/flutter#147230
@darshankawar darshankawar added the r: fixed Issue is closed as already fixed in a newer version label May 3, 2024
vashworth pushed a commit to vashworth/packages that referenced this issue May 6, 2024
- **Rename getCountryCode to country code for ios and android IAP**
- **Add changelog**
fixes flutter/flutter#147230
stuartmorgan added a commit to stuartmorgan/packages that referenced this issue May 13, 2024
Updates the Android example app to use the replacement for the
deprecated `getCountryCode`. Also udpates the deprecations method for
`getCountryCode` to point to the correct variant of the platform
interface method.

Follow-up to flutter/flutter#147230
auto-submit bot pushed a commit to flutter/packages that referenced this issue May 13, 2024
Updates the Android example app to use the replacement for the deprecated `getCountryCode`. Also udpates the deprecations method for `getCountryCode` to point to the correct variant of the platform interface method.

Follow-up to flutter/flutter#147230
@bayu889900

This comment was marked as off-topic.

TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this issue May 22, 2024
- **Rename getCountryCode to country code for ios and android IAP**
- **Add changelog**
fixes flutter/flutter#147230
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this issue May 22, 2024
Updates the Android example app to use the replacement for the deprecated `getCountryCode`. Also udpates the deprecations method for `getCountryCode` to point to the correct variant of the platform interface method.

Follow-up to flutter/flutter#147230
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2024
arc-yong pushed a commit to Arctuition/packages-arc that referenced this issue Jun 14, 2024
- **Rename getCountryCode to country code for ios and android IAP**
- **Add changelog**
fixes flutter/flutter#147230
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: in_app_purchase Plugin for in-app purchase P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. r: fixed Issue is closed as already fixed in a newer version team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants