# Model loading issue

**URL:** <https://forum.babylonjs.com/t/model-loading-issue/34450>\
**Category:** Bugs\
**Created:** [October 3, 2022, 6:25pm UTC](https://forum.babylonjs.com/t/model-loading-issue/34450 "2022-10-03T18:25:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chandru1214](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@Chandru1214](https://forum.babylonjs.com/u/Chandru1214)\
**Post date:** [October 3, 2022, 6:25pm UTC](https://forum.babylonjs.com/t/model-loading-issue/34450/1 "2022-10-03T18:25:33Z")

</div>

Hi,  
I am trying to add Babylon react native package in my react native project.  
I’m getting error when I’m trying to load gltf, glb model.  
I shared error screenshot.

 ![Screenshot 2022-10-03 at 11.53.57 PM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/6/665eda648bc8c0a4dfad2cc081bf53ac7a2b699d.png)

 ![Screenshot 2022-10-04 at 12.02.45 AM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/4/64ec66bf808c9034699ac407f0f81215d7fecba5.png)

_I used following NPM’s:_

“@babylonjs/core”: “^5.10.0”,  
“@babylonjs/loaders”: “^5.10.0”,  
“@babylonjs/react-native”: “^1.2.0”,  
“@babylonjs/react-native-iosandroid-0-65”: “^1.2.0”,  
“react”: “17.0.2”,  
“react-native”: “0.65.0”,  
“react-native-permissions”: “^3.0.0”,

I tried with BaybylonJS latest NPM versions also still getting same issue.

My latest NPM versions

“@babylonjs/core”: “^5.26.1”,  
“@babylonjs/loaders”: “^5.26.1”,  
“@babylonjs/react-native”: “^1.3.5”,  
“@babylonjs/react-native-iosandroid-0-65”: “^1.3.5”,  
“react”: “17.0.2”,  
“react-native”: “0.65.0”,  
“react-native-permissions”: “^3.6.1”

I don’t know why this error is keep coming.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [October 3, 2022, 7:40pm UTC](https://forum.babylonjs.com/t/model-loading-issue/34450/2 "2022-10-03T19:40:59Z")

</div>

cc @ryantrem

---

<div class="post-metadata">

**Author:** ![ryantrem](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ryantrem/32/34010_2.png) [@ryantrem](https://forum.babylonjs.com/u/ryantrem)\
**Post date:** [October 3, 2022, 11:52pm UTC](https://forum.babylonjs.com/t/model-loading-issue/34450/3 "2022-10-03T23:52:29Z")

</div>

It looks to me like the recent change [Add type on blob creation (#12912) · BabylonJS/Babylon.js@209855c (github.com)](https://github.com/BabylonJS/Babylon.js/commit/209855cb589e59645f45596928d4243701f221f8#) introduced the call to `getResponseHeader`, and this function is not implemented in Babylon Native’s [XmlHttpRequest native polyfill](https://github.com/BabylonJS/BabylonNative/blob/master/Polyfills/XMLHttpRequest/Source/XMLHttpRequest.cpp#L97-L107).

@Chandru1214 can you try:

“@babylonjs/core”: “^5.21.0”,  
“@babylonjs/loaders”: “^5.21.0”,

That is the newest version that does not include the change that introduced the call to `getResponseHeader`.

@bghgary - thoughts on this? Do we want to change BJS to not call `getResponseHeader` in for this scenario (not sure if there is another option), or do we want to implement `getResponseHeader` in the Babylon Native XmlHttpRequest native polyfill?

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [October 4, 2022, 12:08am UTC](https://forum.babylonjs.com/t/model-loading-issue/34450/4 "2022-10-04T00:08:32Z")

</div>

I noticed this issue last Friday after [fixing the `console` issue](https://github.com/BabylonJS/BabylonNative/pull/1140) which is also something that broke Babylon Native from the JS side. I think we can just implement this method on XMLHttpRequest. It shouldn’t be too hard. In the meantime, we should use the older versions.

---

<div class="post-metadata">

**Author:** ![Chandru1214](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@Chandru1214](https://forum.babylonjs.com/u/Chandru1214)\
**Post date:** [October 4, 2022, 10:13am UTC](https://forum.babylonjs.com/t/model-loading-issue/34450/5 "2022-10-04T10:13:10Z")

</div>

I have tried with below npm version, it’s working fine.  
“@babylonjs/core”: “5.21.0”,  
“@babylonjs/loaders”: “5.21.0”,  
Thanks you.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [October 4, 2022, 10:29am UTC](https://forum.babylonjs.com/t/model-loading-issue/34450/6 "2022-10-04T10:29:41Z")

</div>

maybe we can also think of a way to define proper typings for both web and native to know what’s available where and avoid those issues in the future? Or is it an issue that doesn’t pop up too often?
