fbsamples / fbinstant-samples

Sample projects for the Facebook Instant Games platform
Other
257 stars 139 forks source link

FBInstant.payments.purchaseAsync Error #31

Open yucccc opened 3 years ago

yucccc commented 3 years ago

I use FBInstant.payments.purchaseAsync and this error occurs image The version used is https://connect.facebook.net/en_US/fbinstant.6.2.js

The demo used is the code provided in GitHub

yucccc commented 3 years ago

My local development method is as follows:

  1. Open https link For example: https://localhost:8000
  2. Then embed the link in https://www.facebook.com/embed/instantgames/YOUR_APPID/player?game_url=<My link https://localhost:8000>
  3. The above problem occurs when you click to pay
AlanWilms commented 3 years ago

Hi @yucccc,

Just to get a better understanding, did you already call FBInstant.initializeAsync(), FBInstant.startGameAsync(), and FBInstant.payments.onReady() before FBInstant.payments.purchaseAsync?

yucccc commented 3 years ago

@AlanWilms

Yes, I follow the normal call sequence, I am using the official demo. This error looks like some method is incompatible. It shows a pop-up window that is loading for a while, and then it disappears and an error is reported.

setActiveWrapper is undefined in ModalLayer

I tried Google Chrome and Firefox are the same

yucccc commented 3 years ago

@AlanWilms I found a related question in the community https://developers.facebook.com/community/threads/492959575110030/ but it was not answered

AlanWilms commented 3 years ago

@yucccc

Thanks for providing the details. Let me investigate further and get back to you afterwards

AlanWilms commented 3 years ago

in-app-purchases test I tried with the instructions for both the hosted version (yarn upload --project in-app-purchases) and the local version (yarn run-dist --project in-app-purchases) after setting up a payouts account in developers.facebook.com and adding the app_id to the config.json and was unable to reproduce the issue.

RuinErickai commented 1 year ago

When I was testing the payment, it popped up like this
image How do I fix this、