Android crash when axios POST

SDK Version: 48.0.4
Platforms: Android (it works on iOS)

“axios”: “^1.4.0”,

When I call the following hook, the app (ExpoGo and production) crash:

export default useAPI = async (prompto) => {
const APIKEY = await authStorage.getToken();
let risposta = await axios.post(“https://api.openai.com/v1/chat/completions”, {
“model”: “gpt-3.5-turbo”,
“messages”: prompto,
“temperature”: 0.5,
“max_tokens”: 500,
“top_p”: 0.3,
“frequency_penalty”: 0.5,
“presence_penalty”: 0.0
}, {
headers: {
“Content-Type”: “application/json”,
“Authorization”: Bearer ${APIKEY}
}
});
return risposta.data
};

…actually wasn’t an axio issue but a Lottie issue!
“lottie-react-native”: “^5.1.6”,

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.