Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

react-native-fetch-blob override on the native XMLHttpRequest #569

Open
mongy92 opened this issue Oct 23, 2017 · 4 comments
Open

react-native-fetch-blob override on the native XMLHttpRequest #569

mongy92 opened this issue Oct 23, 2017 · 4 comments

Comments

@mongy92
Copy link

mongy92 commented Oct 23, 2017

Hi Everyone , i have Problem when i use "React-native-fetch-blob" with "react-native-google-places-autocomplete" ..
the Problem is react-native-fetch-blob override on the native XMLHttpRequest
when i use react-native-fetch-blob it give me this Problem ..
22215221_1810003175696537_2126190077_n
and when i uninstall react-native-fetch-blob or when i remove this Line of Code
window.XMLHttpRequest = RNFetchBlob.polyfill.XMLHttpRequest;
the problem solved
22809784_1828998260463695_823543485_n
.. Plz can any One Help me
i Use
"react-native": "0.46.4",
"react-native-fetch-blob": "^0.10.8",
"react-native-google-places-autocomplete": "^1.3.6",

Thanks

@wdragon
Copy link

wdragon commented Nov 15, 2017

I have noticed the same issue.

@Aqueelmiq
Copy link

I have noticed this problem as well

@baltuonis
Copy link

Same problem. Did you find solution?

@baltuonis
Copy link

Found the fix!

The problem is - that react-native-google-places-autocomplete sets undefined Referrer header.

You need to set origin in query prop of Autocomplete componentet (which translates to Referrer in HTTP request)

 query={{

            key: AppConfig.googleApiKey,
            ....
            origin: 'http://mywebsite.com'
          }}

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

4 participants