-
Notifications
You must be signed in to change notification settings - Fork 121
Path issue with Code Push #35
Comments
@Kerumen have you tried this? https://docs.bugsnag.com/platforms/react-native/showing-full-stacktraces/ |
@cooperka Yes and it works for Release and Debug. But when I upload my app on code push it doesn't work. |
I just tried this out myself (we're also using CodePush) and it's pretty nasty. I was able to correctly symbolicate crashes by specifying the exact CodePush file URL when uploading sourcemaps (see snippet below) but that won't scale... every file URL could potentially be different for CodePush updates. Maybe if BugSnag accepted a glob for Here are the steps that will work for a single device, assuming you know the saved file location of the CodePush update binary on the device (e.g. when using a simulator) to use for code-push release-react YOUR_APP ios --sourcemapOutput ios/main.jsbundle.map Quickly copy curl https://upload.bugsnag.com/ \
-F apiKey=YOUR_API_KEY \
-F appVersion=1.0.0 \
-F minifiedUrl="file:///Users/yourself/Library/Developer/CoreSimulator/Devices/SIMULATOR_ID/data/Containers/Data/Application/APPLICATION_ID/Library/Application%20Support/CodePush/SOME_HASH/CodePush/main.jsbundle" \
-F sourceMap=@ios/main.jsbundle.map \
-F minifiedFile=@/Users/yourself/Downloads/main.jsbundle \
-F overwrite=true What a rough process. It would be great to hear from some BugSnag owners on this one. @kattrali do you have any advice? What do you think about accepting globs for |
Yes with the exact path that would work but I can't find it because when it's installed on CodePush it has the own device UUID in it so I can't guess it in advance. By the way, when you run |
Thanks for the report, @Kerumen and for looking into it, @cooperka. We’re working on a better solution for this, but its good to know that file globs might be a workable solution. What do you think about potentially having an identifier for a given push, (like |
@kattrali a |
This has been fixed via #52, which is going out shortly 🎉 Thank you for the debugging help! |
Thanks for the update @kattrali! The PR isn't very detailed, and looks like it only changed the logic on iOS -- could you please explain how it will work now with CodePush? Do we just need to specify |
Ah, no problem. There was an error in the logic for generating and stripping the base path on iOS, resulting in the source maps not matching what was sent in the stracktrace. I changed it to do proper URL quoting. Regarding the source map IDs suggestion, I mistakenly thought that was in another issue. This is something we’re working on. Would you mind sending a note via support@bugsnag.com so we can keep you posted, as this isn’t something I can fix on the library side? The fix might potentially be specifying the CodePush identifier in the |
Will do, thanks again :) |
@kattrali would you mind re-opening this issue until the real fix you're working on is added, just to prevent confusion? It's still an issue, though I understand it can't be resolved through this library alone. |
So I just came across this issue because we've just started using CodePush and realized that our sourcemaps broke (we didn't upload the CodePush bundle and maps to Bugsnag). Reading this though, it doesn't seem there is solution yet on how to deal with this, right? |
@dwilt Sorry about the confusion, I thought I'd updated this issue when we rolled out more comprehensive code push support. But yes, there is a solution! You can use the |
@kattrali Thanks for the response. I have been reading the blog post and documentation for this and I still can't get it it work. Here's my JS: configuration.codeBundleId = `1.4.0-1492206275`; and here is my upload script:
You can see that I have the I have put a button in the JS that fires an error so I can test this. I see the error come into Bugsnag but it's not sourcemapped. When I upload a non-code-push version (using
Any ideas? |
Also what's the point of this line?
I changed |
@dwilt The If you upgrade to the latest notifier you should be able to get source maps working with a code bundle id |
The line The field is optional and doesn't have to be provided. See the |
@bullmo Thanks for the response.
Can you give me an example of the latest notifier? I'm a bit lost at what you mean. Also, thanks for the response about the source map line. |
@dwilt By latest notifier I mean the latest version of bugsnag-react-native (which is 2.2.0). Please note that this works with react native v0.40.0 or later |
@bullmo Got it. I tried updating (to 2.2.0) and I'm still not seeing the errors. I can see the source maps are uploaded successfully and the |
@dwilt Looking at that stacktrace it seems that the release ( I can see that you currently have a thread ongoing in support around the source map issues. I'll continue this in there and get more info to help diagnose the issue |
@bullmo We've also had unending troubles with getting sourcemaps working in production with CodePush.
|
@iamtommcc It looks like the filename reported when using CodePush is including the full path to the bundle file rather than just the name of the bundle file. This means that it's not matching against just "main.jsbundle". We can look into whether we can strip these paths from the error report so that it's more consistent (and easier to read). In the meantime if you use wildcards for the |
@iamtommcc if you get it working via @bullmo's suggestion, would you mind sharing how you're getting this all to work? We are still unable to have this working. |
I recently incorporated codepush into our app, and needed to upgrade bugsnag. I was running into the same issue, where the stacktrace contains the full @bullmo 's suggestion worked for me, adding
This works ^ Ideally, bugsnag doesn't include the entire path of the jsbundle, not sure if that's possible. |
@duhseekoh thanks so much for pointing out the asterisk. This seems to have been what we were missing! |
Yeah, we got it working with the asterisk too - hooray! The source maps are often 10-20 lines misalinged, but that's probably another issue. I think the docs should probably be updated to include the asterisk as currently they explicitly tell you to use just |
Yea, we're noticing that too. They are actually quite misaligned. So misaligned that we aren't even relying on them anymore actually :( |
@iamtommcc @dwilt would you mind sending an example of a misaligned stacktrace to support@bugsnag.com so we can take a look at the report and the source map and see if this is something we can fix? |
Here's one. The filename is completely wrong. This is an image file that it's saying there is an error |
Thanks! |
Hi, does anyone know why I still got |
@andriantosg Thanks for the report, I split your question into a separate issue. |
I use code-push for my application and when an error is generated the path is not well parsed. It looks like this:
Sentry with their client raven strip the path with a regex. I didn't find anything similar in the source code so I couldn't set up a PR.
The text was updated successfully, but these errors were encountered: