Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

FBInstant.payments.purchaseAsync Error #31

Open
yucccc opened this issue Jul 29, 2021 · 7 comments
Open

FBInstant.payments.purchaseAsync Error #31

yucccc opened this issue Jul 29, 2021 · 7 comments

Comments

@yucccc
Copy link

yucccc commented Jul 29, 2021

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
Copy link
Author

yucccc commented Jul 30, 2021

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
Copy link

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
Copy link
Author

yucccc commented Aug 2, 2021

@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
Copy link
Author

yucccc commented Aug 2, 2021

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

@AlanWilms
Copy link

@yucccc

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

@AlanWilms
Copy link

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants