# Unexpected end of JSON when source map disabled

**URL:** <https://devforum.zoom.us/t/unexpected-end-of-json-when-source-map-disabled/19264>\
**Category:** Web\
**Created:** [May 27, 2020, 3:50pm UTC](https://devforum.zoom.us/t/unexpected-end-of-json-when-source-map-disabled/19264 "2020-05-27T15:50:54Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 19, 2020, 12:35am UTC](https://devforum.zoom.us/t/unexpected-end-of-json-when-source-map-disabled/19264/14 "2020-06-19T00:35:23Z")

</div>

Hey @prantikde,

I was able to reproduce the issue using your repo, however, I was not able to solve it. This seems to be an issue with react or the way it optimizes it’s build.

Like @grahaampeterson said, it works when enabling source maps.

Maybe this Stack Overflow will help:

> <https://stackoverflow.com/questions/43841807/how-to-enable-source-maps-in-create-react-app>

> [@avand](#):
>
> We’re seeing the same issue on our end. The SDK throws an unhandled exception and when we debug locally we see the correct value for the return of function `r` but when we deploy to production, we get the error because `r` returns an empty array:

I will talk to our Web SDK engineerings to see if this is the reason it is not working in a production build. (CS-1971)

Thanks,  
Tommy

---

_[View the full topic](https://devforum.zoom.us/t/unexpected-end-of-json-when-source-map-disabled/19264)._
