Question

STORE_PROBLEM when running using `flutter run`

  • 7 February 2022
  • 3 replies
  • 170 views

Badge +3

We did RevenueCat Flutter SDK setup to start selling IAPs in our hybrid application, but we're having a lot of problems when testing the purchases in the iOS Simulators. We already read the discussions across this STORE_PROBLEM issue #1, #2, and many others, but we are trying to debug it deeper because we strongly believe that a misleading configuration exists, but we can't say if it's with RevenueCat Flutter's SDK or with Flutter itself.

 

We found out that the error disappear when running the Flutter iOS app (ios/Runner.xcworkspace) directly through XCode, not through `flutter run ….` CLI. After the build is made through XCode, further builds made using `flutter run ...` work as expected. It seems that when trying to run using `flutter run` first, some files are not being copied or configuration is not being correctly made, which causes this `STORE_PROBLEM` error to happen. We couldn't find this difference between  XCode and Flutter builds, but we're still investigating what can be possible happening.

 

This behavior is extremely bizarre and we're trying to figure out if this problem is with Flutter build system or with RevenueCat SDK. It seems to be with Flutter, but we are sharing here in the community our findings and keep anyone who's struggling with this issue updated with our findings and possible workarounds.

 

We were suspecting that the `Configuration.storekit` or the certificate were not being copied to the generated `.ipa` when using `flutter run`, but the files are correctly copied and attached to the resulting IPA. It has been pretty difficult to find out what's happening, but we are still searching for alternatives.


3 replies

Userlevel 3
Badge +8

Hi @Olympus Software,

Thanks for sharing the workaround that you found. Would you be able to share debug logs for the error you get when you try with `flutter run`? Sometimes the underlying error can give more information about the source of the issue. 

Badge +3

When running using Flutter run directly, the error is:

 

PlatformException(2, There was a problem with the App Store., {code: 2, message: There was a problem with the App Store., readable_error_code: STORE_PROBLEM, userCancelled: false, underlyingErrorMessage:
UNKNOWN_ERROR, readableErrorCode: STORE_PROBLEM}, null).
Debug Data: null

But when running through XCode, it works perfectly. We strongly believe that this `STORE_PROBLEM` is related with the `Configuration.storekit` file that for some unknown reason may be corrupted or not accessible when using `flutter run`.

We are trying to create a reproducible example with a sample app to submit here and in Flutter's repository. We are focused in finding a solution, because this error is REALLY annoying.

Badge +3

Hey guys, we are pretty much confident that this issue is happening to almost - if not all - Flutter developers. There is any possibility to have a RevenueCat engineer to help us figure out why this issue is happening?

Reply