-
Notifications
You must be signed in to change notification settings - Fork 25
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
Failed to execute 'readAsText' on 'FileReader': parameter 1 is not of type 'Blob'. #11
Comments
Any solution to this? |
@mcmatan could you provide full stack trace? and also the |
Hi @sibelius Loving this library so far! So this is what I am doing. After a purchase is successful, I am calling this function for validating the receipt
Its throwing error on
I get the following receiptData |
Hi, yes I've solved this, the error seems to be because of the fetch req, not the URL this library is using. const url = Env.isDebug() ? "https://sandbox.itunes.apple.com/verifyReceipt" : "https://buy.itunes.apple.com/verifyReceipt"; Body: "receipt-data": receiptData, And this are the responses you can get: 0 : Valid |
@mcmatan do you mind sending a PR fixing this? |
@sibelius I didn't use the library for it at all... I've just made a vanilla request with fetchBlob to the end point I've mentioned, I can if you want, but this means using the fetchBlob library, are you ok with it? |
I'm ok with it |
K I'll try to do it soon |
here's example using RNFetchBlob:
|
I solved it by resetting the window.XMLHttpRequest to it's original state after finished using the fetch blob for uploading my image to cloud. const Blob = FetchBlob.polyfill.Blob; return new Promise((resolve, reject) => { Hope it helps :) |
Using https://github.com/chirag04/react-native-in-app-utils for purchasing, and:
InAppUtils.receiptData((error, receiptData)=> {
if(error) {
} else {
IOSReceiptValidator.validate(receiptData).then(function (result) {
}).catch(function (error) {
});
}
For getting last receipt, when trying to validate, getting this error (While debugging on real device in Chrome)
Failed to execute 'readAsText' on 'FileReader': parameter 1 is not of type 'Blob'.
The text was updated successfully, but these errors were encountered: