Sourcemaps path on iOS


#1

Hi,
We have an app running on Android and iOS through Cordova, we have hooked it up with Sentry and are trying to get sourcemaps to work.

We figured things out on Android, but I don’t how to work around an issue on iOS. The path of the file where the problem occurs is something like file:///var/containers/Bundle/Application/{uid}/MyApp.app/www/app.min.js. But the {uid} part of that path changes from device to device.

This means I can’t upload the corresponding sourcemap, since I can’t know all the possibles pathes. I haven’t found a way around this in the docs either. Did I miss something? Is there a different way to approach the problem?


#2

Do you about our new Cordova SDK incl. docs which should take care about all of this?

But the prefix should be app:/// and the sourcemap must be uploaded with the prefix ~/


#3

Do you about our new Cordova SDK incl. docs which should take care about all of this?

Yes! Unfortunately we can’t upgrade to cordova 7.0 at the moment.

But the prefix should be app:///

Sorry I didn’t get that, what should have the prefix app:/// ?


#4

I’m still very interested to learn more about this app:/// prefix, especially since I don’t see it mentioned in the docs :slight_smile:


#5

So we treat app:/// in a special way on the server and we haven’t really documented it.
But you can see the implementation details here:


In the Cordova SDK we remove the file:/// prefix and replace it with app:/// on the server when you uploaded the sourcemaps with ~/

28

With all that in place, we should be able to symbolicate your stack traces correctly.


#6

Thanks for your help! It took us a while to get back onto it, but here we are.

It aaaaalmost works — we have proper stacktraces \o/ but no sourcemaps /o\

On an issue, I have the following error message:

Source code was not found for app.js.map
{"url": "app.js.map"}

But for that release, here are my artifacts:

Any idea what might have gone wrong there?


#7

Does this issue help you?


#8

I’m afraid not. I am using releases, but the issues and the artifacts are both tagged with the same release number.


#9

Can you link an event here?


#10

Unfortunately not, we’re running a private instance. Here’s a screenshot of one though, if it helps:


#11

Really sorry to keep pestering you with that, but is there anything else that could help us identify what the issue is? We’re quite lost as to what could be at fault here :confused: