in-app-purchase
in-app-purchase copied to clipboard
RangeError: Maximum call stack size exceeded
Ref: https://github.com/voltrue2/in-app-purchase/issues/247
Versions: node v10.15.3 pm2 v4.1.2 in-app-purchase ^1.11.4 request 2.88.0
Some of our users receipts could not validate their receipts. This error only occurs in Apple receipts.
What can cause this error?
Log:
iapService.validate(receipt) onError: RangeError: Maximum call stack size exceeded 0|Server | at String.toString (<anonymous>) 0|Server | at isPlainObject (/var/www/vhosts/socket/node_modules/extend/index.js:17:20) 0|Server | at extend (/var/www/vhosts/socket/node_modules/extend/index.js:95:27) 0|Server | at extend (/var/www/vhosts/socket/node_modules/extend/index.js:104:51) 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:88:5 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12 0|Server | at /var/www/vhosts/socket/node_modules/request/index.js:100:12
Please check https://github.com/request/request/issues/2828
Seeing the same issue occur, the underlying issue with the Request module appears to be related to reqeust.defaults
. Suggest explicitly ensuring that requestDefaults
is not included in the configuration object used in iap.config(config)
This should avoid the issue.