# Sourcemaps - not mapping for all errors

**URL:** <https://discuss.elastic.co/t/sourcemaps-not-mapping-for-all-errors/310125>\
**Category:** Elastic Observability\
**Created:** [July 20, 2022, 9:45am UTC](https://discuss.elastic.co/t/sourcemaps-not-mapping-for-all-errors/310125 "2022-07-20T09:45:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamunaptroid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamunaptroid/32/63795_2.png) [@Hamunaptroid](https://discuss.elastic.co/u/Hamunaptroid)\
**Post date:** [July 20, 2022, 9:45am UTC](https://discuss.elastic.co/t/sourcemaps-not-mapping-for-all-errors/310125/1 "2022-07-20T09:45:21Z")

</div>

Hello,

I would like to follow up with the thread which was closed already - it seemed like problem with sourcemaps was fixed, but it seems it isn't working 100%.

> [@Uploading sourcemaps from AIX webserver](https://discuss.elastic.co/t/uploading-sourcemaps-from-aix-webserver/303526):
>
> Hello, I can't figure out how to upload sourcemaps to kibana. \*\*Config for APM\*\* // using full condition instead of PROD variable (webpack will remove this code if syntax is like this) if (process.env.NODE\_ENV === 'production') { window.amp = initApm({ // Set required service name (allowed characters: a-z, A-Z, 0-9, -, \_, and space) serviceName: `web-fe - ${window.location.hostname}`.replaceAll('.', '-'), // Set custom APM Server URL (default: http://localhost:8200) serverUrl…

I have managed to get it working partially with help of elk team on this forum, but not all errors are mapped - sourcemaps are only working for specific errors.

This is example of error that is not working 100%, but as you can see there are some sourcemaps  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b4144c2b94dbc086ab00b5087ba0bf217dac265a.jpeg)

metadata:

```auto
@timestamp
@timestamp	2022-07-18T15:12:14.902Z
agent
agent.name	rum-js
agent.version	5.12.0
client
client.ip	10.10.221.223
ecs
ecs.version	1.12.0
error
error.culprit	javascript/utils/apiHelpers.js in requestDidEnd
error.exception.message	fetch failed with response: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
error.exception.type	Error
error.grouping_key	ba0e3dd950c5658c8f643321aebf1cdc
error.id	8bc9accabfee7667f0e2276aac2d207d
event
event.ingested	2022-07-18T15:12:16.780Z
message
message	fetch failed with response: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
observer
observer.ephemeral_id	f56f977e-a379-4003-9883-1499b7c0bb07
observer.hostname	mvafls1
observer.id	c9ef030a-e37d-4442-9475-b1d0691fb8db
observer.type	apm-server
observer.version	7.17.0
observer.version_major	7
processor
processor.event	error
processor.name	error
service
service.language.name	javascript
service.name	mva-fe - dev-mva-lab
service.version	108.0.0
source
source.ip	10.10.200.201
source.port	47277
timestamp
timestamp.us	1658157134902720
url
url.domain	dev.mva.lab
url.full	https://dev.mva.lab:8443/portal/gui/inv-file/523/detail
url.original	https://dev.mva.lab:8443/portal/gui/inv-file/523/detail
url.original.text	https://dev.mva.lab:8443/portal/gui/inv-file/523/detail
url.path	/portal/gui/inv-file/523/detail
url.port	8443
url.scheme	https
user_agent
user_agent.device.name	Other
user_agent.name	Firefox
user_agent.original	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
user_agent.original.text	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
user_agent.os.full	Windows 10
user_agent.os.name	Windows
user_agent.os.version	10
user_agent.version	101.0.

```

This is error that won't map anything

![image](https://us1.discourse-cdn.com/elastic/original/3X/6/6/662377307b52caa42f2b44ec8c7a94f2ba66788b.png)

metadata:

```auto
@timestamp
@timestamp	2022-07-20T08:55:26.202Z
agent
agent.name	rum-js
agent.version	5.12.0
client
client.ip	10.10.221.223
ecs
ecs.version	1.12.0
error
error.culprit	portal/gui/static/js/main.4f27a0f1.chunk.js
error.exception.message	fetch failed with response: SyntaxError: Unexpected end of JSON input
error.exception.type	Error
error.grouping_key	49d842a4fd6feb84f7df6e3dd74525c4
error.id	38f8b6f00d8cc4b69e513a487f5e3803
event
event.ingested	2022-07-20T08:55:26.876Z
message
message	fetch failed with response: SyntaxError: Unexpected end of JSON input
observer
observer.ephemeral_id	bb81d664-2185-473a-a9ca-57e6750534e6
observer.hostname	mvafls1
observer.id	c9ef030a-e37d-4442-9475-b1d0691fb8db
observer.type	apm-server
observer.version	7.17.0
observer.version_major	7
parent
parent.id	a75d26fd4edea527
processor
processor.event	error
processor.name	error
service
service.language.name	javascript
service.name	mva-fe - dev-mva-lab
service.version	108.0.0
source
source.ip	10.10.200.201
source.port	59207
timestamp
timestamp.us	1658307326202587
trace
trace.id	efa6c3e74f6335023babf96071a7ef9d
transaction
transaction.id	a75d26fd4edea527
transaction.sampled	true
transaction.type	route-change
url
url.domain	dev.mva.lab
url.full	https://dev.mva.lab:8443/portal/gui/inv-file/5334/detail
url.original	https://dev.mva.lab:8443/portal/gui/inv-file/5334/detail
url.original.text	https://dev.mva.lab:8443/portal/gui/inv-file/5334/detail
url.path	/portal/gui/inv-file/5334/detail
url.port	8443
url.scheme	https
user_agent
user_agent.device.name	Other
user_agent.name	Electron
user_agent.original	Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/10.3.0 Chrome/18.3.0 Safari/537.36
user_agent.original.text	Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/10.3.0 Chrome/18.3.0 Safari/537.36
user_agent.os.name	Linux
user_agent.version	18.3.0

```

Any ideas ?

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 8:36am UTC](https://discuss.elastic.co/t/sourcemaps-not-mapping-for-all-errors/310125/2 "2022-11-04T08:36:16Z")

</div>


