New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong source map is generated #6946

Closed
digeff opened this Issue Apr 12, 2016 · 70 comments

Comments

Projects
None yet
@digeff
Contributor

digeff commented Apr 12, 2016

The source maps generated by the react-native packager seem to not be generated properly. We've seen in several projects that the mapping to/from around the React Tags code seems to not be correct.

For example, a user reported this issue: Microsoft/vscode-react-native#206 (comment) in our project, and the root cause of the issue is because the source map file generated by the react-native packager is not correctly mapping to the original source code (The original source code has 76 lines, and the .map files point to line 85 on that file).

@satya164

This comment has been minimized.

Show comment
Hide comment
@satya164

satya164 Apr 16, 2016

Collaborator

Could you provide an example repo where we can reproduce this issue?

Collaborator

satya164 commented Apr 16, 2016

Could you provide an example repo where we can reproduce this issue?

@digeff

This comment has been minimized.

Show comment
Hide comment
@digeff

digeff Apr 18, 2016

Contributor

Yes, @gilesbradshaw was having this issue on his app, and he told us we can install it by doing:

git clone https://github.com/gilesbradshaw/ua-ql-mobile.git awesome2
cd awesome2
npm i

In Microsoft/vscode-react-native#206 (comment) he describes exactly where to put the breakpoint to reproduce this issue (Which is also where the source maps aren't being correctly generated).

Contributor

digeff commented Apr 18, 2016

Yes, @gilesbradshaw was having this issue on his app, and he told us we can install it by doing:

git clone https://github.com/gilesbradshaw/ua-ql-mobile.git awesome2
cd awesome2
npm i

In Microsoft/vscode-react-native#206 (comment) he describes exactly where to put the breakpoint to reproduce this issue (Which is also where the source maps aren't being correctly generated).

@gilesbradshaw

This comment has been minimized.

Show comment
Hide comment
@gilesbradshaw

gilesbradshaw Apr 18, 2016

Thanks for looking let me know if you cannot replicate with that repo

gilesbradshaw commented Apr 18, 2016

Thanks for looking let me know if you cannot replicate with that repo

@janicduplessis

This comment has been minimized.

Show comment
Hide comment
@janicduplessis

janicduplessis Apr 19, 2016

Collaborator

I also had this issue recently where sources maps were off by ~10-20 lines. It only happened in component files with jsx.

Collaborator

janicduplessis commented Apr 19, 2016

I also had this issue recently where sources maps were off by ~10-20 lines. It only happened in component files with jsx.

@mroswald

This comment has been minimized.

Show comment
Hide comment
@mroswald

mroswald Apr 22, 2016

Contributor

The more import-statements, jsx-syntax or es6-classes in the module, the more difference is between correct lines and the generated source map.

Contributor

mroswald commented Apr 22, 2016

The more import-statements, jsx-syntax or es6-classes in the module, the more difference is between correct lines and the generated source map.

@digeff

This comment has been minimized.

Show comment
Hide comment
@digeff

digeff May 10, 2016

Contributor

@satya164 Any updates on this?

Contributor

digeff commented May 10, 2016

@satya164 Any updates on this?

@spikebrehm

This comment has been minimized.

Show comment
Hide comment
@spikebrehm

spikebrehm Jul 19, 2016

Contributor

I've found a different symptom: the source maps are pointing to the entirely wrong files. Has anyone else experienced this?

Contributor

spikebrehm commented Jul 19, 2016

I've found a different symptom: the source maps are pointing to the entirely wrong files. Has anyone else experienced this?

@JaxGit

This comment has been minimized.

Show comment
Hide comment
@JaxGit

JaxGit Aug 3, 2016

@spikebrehm we are experiencing the same. At first by combining some of the imports we could get it back to work, however when the project goes, we lost more and more correct file mapping when debugging in Chrome. We have to try debugging in Nuclide to get to the exact breakpoints in exact files in those cases but it's not as powerful as Chrome.

JaxGit commented Aug 3, 2016

@spikebrehm we are experiencing the same. At first by combining some of the imports we could get it back to work, however when the project goes, we lost more and more correct file mapping when debugging in Chrome. We have to try debugging in Nuclide to get to the exact breakpoints in exact files in those cases but it's not as powerful as Chrome.

janicduplessis referenced this issue Sep 12, 2016

use babel sourcemaps in bundle server
Reviewed By: davidaurelio

Differential Revision: D3841557

fbshipit-source-id: a6d40cf224ba7c2fd0a8eb0f0e2f7cc4bf222bcb
@charpeni

This comment has been minimized.

Show comment
Hide comment
@charpeni

charpeni Nov 16, 2016

Collaborator

@facebook-github-bot label Icebox

Collaborator

charpeni commented Nov 16, 2016

@facebook-github-bot label Icebox

@charpeni

This comment has been minimized.

Show comment
Hide comment
@charpeni

charpeni Nov 16, 2016

Collaborator

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/wrong-source-map-is-generated

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

Collaborator

charpeni commented Nov 16, 2016

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/wrong-source-map-is-generated

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

@charpeni

This comment has been minimized.

Show comment
Hide comment
@charpeni
Collaborator

charpeni commented Nov 16, 2016

@facebook-github-bot

This comment has been minimized.

Show comment
Hide comment
@facebook-github-bot

facebook-github-bot Nov 16, 2016

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

facebook-github-bot commented Nov 16, 2016

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

@dbeard-groupon

This comment has been minimized.

Show comment
Hide comment
@dbeard-groupon

dbeard-groupon Mar 1, 2017

I also see this occurring. I'm getting completely wrong filenames from sourcemaps.

dbeard-groupon commented Mar 1, 2017

I also see this occurring. I'm getting completely wrong filenames from sourcemaps.

@vongohren

This comment has been minimized.

Show comment
Hide comment
@vongohren

vongohren Apr 27, 2017

I have the problem where iOS works, but android bundlemap is of with 10-20 lines. Is this a common issue around here? I created an issue on it: https://github.com/facebook/react-native

vongohren commented Apr 27, 2017

I have the problem where iOS works, but android bundlemap is of with 10-20 lines. Is this a common issue around here? I created an issue on it: https://github.com/facebook/react-native

@brunolemos

This comment has been minimized.

Show comment
Hide comment
@brunolemos

brunolemos Jun 13, 2017

Contributor

I'm having this... rn 0.44

Contributor

brunolemos commented Jun 13, 2017

I'm having this... rn 0.44

@symptomatik

This comment has been minimized.

Show comment
Hide comment
@symptomatik

symptomatik Sep 20, 2017

I too am having this issue - has anyone else been able to solve it? @brunolemos @vongohren - thanks!

symptomatik commented Sep 20, 2017

I too am having this issue - has anyone else been able to solve it? @brunolemos @vongohren - thanks!

@chefkefu

This comment has been minimized.

Show comment
Hide comment
@chefkefu

chefkefu Oct 11, 2017

Rn 0.48 still has this issue on android release build.

chefkefu commented Oct 11, 2017

Rn 0.48 still has this issue on android release build.

@hramos

This comment has been minimized.

Show comment
Hide comment
@hramos

hramos May 16, 2018

Contributor

I don't have anything to add - this was not on my radar.

Contributor

hramos commented May 16, 2018

I don't have anything to add - this was not on my radar.

@seanadkinson

This comment has been minimized.

Show comment
Hide comment
@seanadkinson

seanadkinson May 16, 2018

@cpetzel Curious if code-push is configured to use gzip when downloading the bundle, and whether that significantly reduces the 2x size factor for download.

seanadkinson commented May 16, 2018

@cpetzel Curious if code-push is configured to use gzip when downloading the bundle, and whether that significantly reduces the 2x size factor for download.

@rafeca

This comment has been minimized.

Show comment
Hide comment
@rafeca

rafeca May 31, 2018

Member

After investigating much more, I've found that this is actually caused by an issue when generating the source maps from metro. I'm going to land a commit that fixes it

Apologies for the issue 😞

Member

rafeca commented May 31, 2018

After investigating much more, I've found that this is actually caused by an issue when generating the source maps from metro. I'm going to land a commit that fixes it

Apologies for the issue 😞

EyMaddis added a commit to simpleTechs/metro that referenced this issue Jun 6, 2018

Fix Metro sourcemaps when minification is enabled
Summary:
In the old days, the module wrapping was done by just prepending a string to the module source code. I guess that in order to fix the sourcemaps, an offset was added. This is not needed anymore (and in fact is causing issues when generating the sourcemaps).

This should fix facebook/react-native#6946

Reviewed By: davidaurelio

Differential Revision: D8223377

fbshipit-source-id: 629a6bf69875a3faa25c79fb2744727dedfe0924
@avinashwigroup

This comment has been minimized.

Show comment
Hide comment
@avinashwigroup

avinashwigroup Jun 8, 2018

Is this issue solved now ? Do we need to use the latest react-native version ?

avinashwigroup commented Jun 8, 2018

Is this issue solved now ? Do we need to use the latest react-native version ?

@rafeca

This comment has been minimized.

Show comment
Hide comment
@rafeca

rafeca Jun 8, 2018

Member

It's fixed on master, but will not be available until next stable version of react-native (0.56.0)

Member

rafeca commented Jun 8, 2018

It's fixed on master, but will not be available until next stable version of react-native (0.56.0)

@anandwahed

This comment has been minimized.

Show comment
Hide comment
@anandwahed

anandwahed Jun 12, 2018

@rafeca with react-native 0.56.0 stable released does this fix added into it. I am not able to see it in the changelog of the 0.56.0 release

anandwahed commented Jun 12, 2018

@rafeca with react-native 0.56.0 stable released does this fix added into it. I am not able to see it in the changelog of the 0.56.0 release

@rafeca

This comment has been minimized.

Show comment
Hide comment
@rafeca

rafeca Jun 13, 2018

Member

@anandwahed yes, it should have been fixed there 😃

Member

rafeca commented Jun 13, 2018

@anandwahed yes, it should have been fixed there 😃

@jshearer

This comment has been minimized.

Show comment
Hide comment
@jshearer

jshearer Jun 20, 2018

Just in case anyone comes across this before RN bumps their metro dependency, I finally finally got working line numbers by adding this to my package.json file (make sure you use yarn not NPM)

"resolutions": {
    "react-native/metro": "0.39.1"
}

jshearer commented Jun 20, 2018

Just in case anyone comes across this before RN bumps their metro dependency, I finally finally got working line numbers by adding this to my package.json file (make sure you use yarn not NPM)

"resolutions": {
    "react-native/metro": "0.39.1"
}
@jrob-io

This comment has been minimized.

Show comment
Hide comment
@jrob-io

jrob-io Jun 21, 2018

I'm still experiencing this in 0.56.0-rc.2.
node_modules/metro-source-map/package.json has "version": "0.38.1", so this has the changes from @rafeca.

jrob-io commented Jun 21, 2018

I'm still experiencing this in 0.56.0-rc.2.
node_modules/metro-source-map/package.json has "version": "0.38.1", so this has the changes from @rafeca.

@ospfranco

This comment has been minimized.

Show comment
Hide comment
@ospfranco

ospfranco Jul 15, 2018

I've updated to 0.56, added the false minify flag and also tried to use 0.39.1 resolution method by jsheader, but I still cannot get the source-maps to match.

ospfranco commented Jul 15, 2018

I've updated to 0.56, added the false minify flag and also tried to use 0.39.1 resolution method by jsheader, but I still cannot get the source-maps to match.

@fractalwrench

This comment has been minimized.

Show comment
Hide comment
@fractalwrench

fractalwrench Jul 17, 2018

Contributor

We've tested this out in an example app that uses React Native 0.56, and it seems as though the original issue can still be reproduced. Here are the steps we followed to observe this behaviour:

  1. Build Android app in release mode:
react-native run-android --variant=release
  1. Generate sourcemaps:
react-native bundle \
--platform android \
--dev false \
--entry-file index.js \
--bundle-output android-release.bundle \
--sourcemap-output android-release.bundle.map
  1. Apply the sourcemaps to an error and inspect the line numbers:

screen shot 2018-07-17 at 10 41 22

@rafeca please let us know if you require any further information to reproduce this, or whether we're missing some additional step required to get things working - we're more than happy to help out.

Contributor

fractalwrench commented Jul 17, 2018

We've tested this out in an example app that uses React Native 0.56, and it seems as though the original issue can still be reproduced. Here are the steps we followed to observe this behaviour:

  1. Build Android app in release mode:
react-native run-android --variant=release
  1. Generate sourcemaps:
react-native bundle \
--platform android \
--dev false \
--entry-file index.js \
--bundle-output android-release.bundle \
--sourcemap-output android-release.bundle.map
  1. Apply the sourcemaps to an error and inspect the line numbers:

screen shot 2018-07-17 at 10 41 22

@rafeca please let us know if you require any further information to reproduce this, or whether we're missing some additional step required to get things working - we're more than happy to help out.

@HazAT

This comment has been minimized.

Show comment
Hide comment
@HazAT

HazAT Jul 27, 2018

This sadly is still broken 😞
I took the time and put together a "minimal" repro case including tests with our symbolication library symbolic getsentry/symbolic#78

See this repo: https://github.com/HazAT/react-native-source-map with the repro case.
The readme should explain how to run and test is locally.

Hope this helps debugging this issue since we (Sentry) still getting reports that this is broken.

HazAT commented Jul 27, 2018

This sadly is still broken 😞
I took the time and put together a "minimal" repro case including tests with our symbolication library symbolic getsentry/symbolic#78

See this repo: https://github.com/HazAT/react-native-source-map with the repro case.
The readme should explain how to run and test is locally.

Hope this helps debugging this issue since we (Sentry) still getting reports that this is broken.

@dawee

This comment has been minimized.

Show comment
Hide comment
@dawee

dawee Jul 27, 2018

As I understood it in my tests it's not a problem with sourcemap because if you see the line where the error is referenced in index.bundle it's already in the wrong place.

When you look at the symbolicated version using sourcemap, you just have to the original code pointed by index.bundle. So I think index.bundle.map and index.bundle are always coherent together.

Also, there's a similar behaviour when you work with iOS Simulator in dev version. When I tested it with a slow machine I could see dinstinctly a first red error page with the same wrong line number as I can see in sentry. A second after it's updated with the correct line number.

I don't know if any of this can help 😅.

dawee commented Jul 27, 2018

As I understood it in my tests it's not a problem with sourcemap because if you see the line where the error is referenced in index.bundle it's already in the wrong place.

When you look at the symbolicated version using sourcemap, you just have to the original code pointed by index.bundle. So I think index.bundle.map and index.bundle are always coherent together.

Also, there's a similar behaviour when you work with iOS Simulator in dev version. When I tested it with a slow machine I could see dinstinctly a first red error page with the same wrong line number as I can see in sentry. A second after it's updated with the correct line number.

I don't know if any of this can help 😅.

@chrisnovak

This comment has been minimized.

Show comment
Hide comment
@chrisnovak

chrisnovak Aug 1, 2018

Could we please reopen this? Upgraded to 0.56 and still no help :(

chrisnovak commented Aug 1, 2018

Could we please reopen this? Upgraded to 0.56 and still no help :(

@rafeca

This comment has been minimized.

Show comment
Hide comment
@rafeca

rafeca Aug 6, 2018

Member

Hey!

I've been trying to reproduce the issue in my test app but sourcemaps are working fine in that app.

This is the process I follow to verify that they work fine:

 # install the app on the device
$ yarn run prod

Then open the app on the device and write down the line/column numbers of the first trace

# generate the sourcemap file
$ react-native bundle --entry-file index.js --platform ios --dev false --bundle-output main.jsbundle --sourcemap-output main.map # generates the sourcemap

# Symbolicate the line/columns written down in the previous step
yarn run sourcemap main.map 309 494

Check that the correct line/column get printed in the console:

{ source: '.../rn-sample-app/App.js',
  line: 30,
  column: 20,
  name: 'Error' }

Feel free to send a PR to that repo with any change that makes the symbolication fail, this will help me debug the issue.

Additionally, I'm creating end to end tests for sourcemaps in the Metro repository, so anybody experiencing issues with sourcemaps can add a failing test case there to help me debug the issue.

Thanks!

Member

rafeca commented Aug 6, 2018

Hey!

I've been trying to reproduce the issue in my test app but sourcemaps are working fine in that app.

This is the process I follow to verify that they work fine:

 # install the app on the device
$ yarn run prod

Then open the app on the device and write down the line/column numbers of the first trace

# generate the sourcemap file
$ react-native bundle --entry-file index.js --platform ios --dev false --bundle-output main.jsbundle --sourcemap-output main.map # generates the sourcemap

# Symbolicate the line/columns written down in the previous step
yarn run sourcemap main.map 309 494

Check that the correct line/column get printed in the console:

{ source: '.../rn-sample-app/App.js',
  line: 30,
  column: 20,
  name: 'Error' }

Feel free to send a PR to that repo with any change that makes the symbolication fail, this will help me debug the issue.

Additionally, I'm creating end to end tests for sourcemaps in the Metro repository, so anybody experiencing issues with sourcemaps can add a failing test case there to help me debug the issue.

Thanks!

@chrisnovak

This comment has been minimized.

Show comment
Hide comment
@chrisnovak

chrisnovak Aug 6, 2018

We've been experiencing this issue on Android specifically. I'll try to reproduce on Android in your test app as soon as I have time.

chrisnovak commented Aug 6, 2018

We've been experiencing this issue on Android specifically. I'll try to reproduce on Android in your test app as soon as I have time.

@rafeca

This comment has been minimized.

Show comment
Hide comment
@rafeca

rafeca Aug 6, 2018

Member

Ok, from the thread I've seen people complaining for both iOS and Android.

If the issue can only be reproduced in Android, it may be related to the device itself (maybe JSC is reporting the stacktrace position incorrectly).

To verify that, can you please doublecheck if the original line/column reported in the error is correct?

Member

rafeca commented Aug 6, 2018

Ok, from the thread I've seen people complaining for both iOS and Android.

If the issue can only be reproduced in Android, it may be related to the device itself (maybe JSC is reporting the stacktrace position incorrectly).

To verify that, can you please doublecheck if the original line/column reported in the error is correct?

@HazAT

This comment has been minimized.

Show comment
Hide comment
@HazAT

HazAT Aug 7, 2018

@rafeca If I try to run your example repo on Android it fails.
I create an release build and put it on a device.

cd android && ./gradlew assembleRelease --stacktrace && \
jarsigner -verbose  -digestalg SHA1 -sigalg MD5withRSA -keystore your-keystore.keystore -storepass ***** app/build/outputs/apk/app-release-unsigned.apk release && \
adb install -r app/build/outputs/apk/app-release-unsigned.apk
react-native bundle --entry-file index.js --platform android --dev false --bundle-output main.jsbundle --sourcemap-output main.map
yarn run sourcemap main.map 306 751
{ source: '/Users/haza/Downloads/rn-test-app-master/App.js',
  line: 38,
  column: 10,
  name: 'createElement' }

tbh I am pretty sure under special circumstances this is also broken on iOS, I am just not sure how to reproduce it there.

HazAT commented Aug 7, 2018

@rafeca If I try to run your example repo on Android it fails.
I create an release build and put it on a device.

cd android && ./gradlew assembleRelease --stacktrace && \
jarsigner -verbose  -digestalg SHA1 -sigalg MD5withRSA -keystore your-keystore.keystore -storepass ***** app/build/outputs/apk/app-release-unsigned.apk release && \
adb install -r app/build/outputs/apk/app-release-unsigned.apk
react-native bundle --entry-file index.js --platform android --dev false --bundle-output main.jsbundle --sourcemap-output main.map
yarn run sourcemap main.map 306 751
{ source: '/Users/haza/Downloads/rn-test-app-master/App.js',
  line: 38,
  column: 10,
  name: 'createElement' }

tbh I am pretty sure under special circumstances this is also broken on iOS, I am just not sure how to reproduce it there.

@rafeca

This comment has been minimized.

Show comment
Hide comment
@rafeca

rafeca Aug 7, 2018

Member

Thanks for the info! 👍 After some fights I've been able to compile the app for Android in release mode and indeed I've been able to reproduce the problem.

If I check line 306, column 751 on the generated production bundle, that position does not correspond to the generated Error position, so the original line/columns that the JS vm are reporting are already wrong:

screen shot 2018-08-07 at 11 34 30

Actually, the symbolicated line/column (38:10), corresponds to the (wrong) original position, so the issue seems to be coming from JSC and Metro is just doing the right thing.

I recommend creating a different issue for this specific problem (since this issue refers to the sourcemap generation on Metro which was already fixed). Unfortunately I'm not going to be able to assist you with this new one, since this is not my area of expertise... but something I noticed is that this can potentially get fixed once RN upgrades the JSC version for Android.

Member

rafeca commented Aug 7, 2018

Thanks for the info! 👍 After some fights I've been able to compile the app for Android in release mode and indeed I've been able to reproduce the problem.

If I check line 306, column 751 on the generated production bundle, that position does not correspond to the generated Error position, so the original line/columns that the JS vm are reporting are already wrong:

screen shot 2018-08-07 at 11 34 30

Actually, the symbolicated line/column (38:10), corresponds to the (wrong) original position, so the issue seems to be coming from JSC and Metro is just doing the right thing.

I recommend creating a different issue for this specific problem (since this issue refers to the sourcemap generation on Metro which was already fixed). Unfortunately I'm not going to be able to assist you with this new one, since this is not my area of expertise... but something I noticed is that this can potentially get fixed once RN upgrades the JSC version for Android.

@dawee

This comment has been minimized.

Show comment
Hide comment
@dawee

dawee Aug 7, 2018

That's what I meant when I said "index.bundle.map and index.bundle are always coherent together". I really don't think it's a sourcemap issue, the line in the Error doesn't point to the good line in the bundle.

However, try to get the bundle used by you metro server by downloading it from localhost:

curl -L "http://localhost:8081/index.bundle?platform=ios&dev=false&minify=true" > index.ios.bundle.map

(the parameters here are just an example)

You'll see that the bundle you download is never the same you get using react-native bundle and with this one, the error line is correct.

dawee commented Aug 7, 2018

That's what I meant when I said "index.bundle.map and index.bundle are always coherent together". I really don't think it's a sourcemap issue, the line in the Error doesn't point to the good line in the bundle.

However, try to get the bundle used by you metro server by downloading it from localhost:

curl -L "http://localhost:8081/index.bundle?platform=ios&dev=false&minify=true" > index.ios.bundle.map

(the parameters here are just an example)

You'll see that the bundle you download is never the same you get using react-native bundle and with this one, the error line is correct.

@rafeca

This comment has been minimized.

Show comment
Hide comment
@rafeca

rafeca Aug 7, 2018

Member

However, try to get the bundle used by you metro server by downloading it from localhost:
curl -L "http://localhost:8081/index.bundle?platform=ios&dev=false&minify=true" > index.ios.bundle.map

The bundle generated by the devserver should be the same as the one generated by react-native build (using the same dev and minify params on both). The only thing that could change is the module ids (the numbers that are inserted at the end of each compiled file) if you generate several different bundles with the metro server (since these numbers are autoincremental), but they do not affect the sourcemaps.

Do you have any repro steps that make Metro generate different bundles? If so, that's an issue in Metro

Member

rafeca commented Aug 7, 2018

However, try to get the bundle used by you metro server by downloading it from localhost:
curl -L "http://localhost:8081/index.bundle?platform=ios&dev=false&minify=true" > index.ios.bundle.map

The bundle generated by the devserver should be the same as the one generated by react-native build (using the same dev and minify params on both). The only thing that could change is the module ids (the numbers that are inserted at the end of each compiled file) if you generate several different bundles with the metro server (since these numbers are autoincremental), but they do not affect the sourcemaps.

Do you have any repro steps that make Metro generate different bundles? If so, that's an issue in Metro

@rafeca

This comment has been minimized.

Show comment
Hide comment
@rafeca

rafeca Aug 7, 2018

Member

For any future reader landing here because potential sourcemap issues in Metro, I've just created an end to end test that ensures that SourceMaps work fine on a very similar scenario.

Member

rafeca commented Aug 7, 2018

For any future reader landing here because potential sourcemap issues in Metro, I've just created an end to end test that ensures that SourceMaps work fine on a very similar scenario.

@YeatsLu

This comment has been minimized.

Show comment
Hide comment
@YeatsLu

YeatsLu Aug 12, 2018

@rafeca @HazAT

I recommend creating a different issue for this specific problem (since this issue refers to the sourcemap generation on Metro which was already fixed). Unfortunately I'm not going to be able to assist you with this new one, since this is not my area of expertise... but something I noticed is that this can potentially get fixed once RN upgrades the JSC version for Android.

As you said, I think it is a issue about android jsc, so I open the issue #20628

YeatsLu commented Aug 12, 2018

@rafeca @HazAT

I recommend creating a different issue for this specific problem (since this issue refers to the sourcemap generation on Metro which was already fixed). Unfortunately I'm not going to be able to assist you with this new one, since this is not my area of expertise... but something I noticed is that this can potentially get fixed once RN upgrades the JSC version for Android.

As you said, I think it is a issue about android jsc, so I open the issue #20628

@HazAT

This comment has been minimized.

Show comment
Hide comment
@HazAT

HazAT Aug 13, 2018

The fix that @YeatsLu found works indeed.
Just tried it in my test repo and it works, this it the commit:
HazAT/react-native-source-map@a559cb5

So updating JSC for react-native fixes the source map issue for Android.
🎉

HazAT commented Aug 13, 2018

The fix that @YeatsLu found works indeed.
Just tried it in my test repo and it works, this it the commit:
HazAT/react-native-source-map@a559cb5

So updating JSC for react-native fixes the source map issue for Android.
🎉

hithacker added a commit to OpenCHS/openchs-client that referenced this issue Sep 27, 2018

@yaronlevi

This comment has been minimized.

Show comment
Hide comment
@yaronlevi

yaronlevi Oct 11, 2018

Any updates on when this fix will be released?

yaronlevi commented Oct 11, 2018

Any updates on when this fix will be released?

@ithustle

This comment has been minimized.

Show comment
Hide comment
@ithustle

ithustle Oct 18, 2018

@yaronlevi , update to RN 0.57.3, react and react-test-renderer to 16.6.0-alpha.8af6728.

ithustle commented Oct 18, 2018

@yaronlevi , update to RN 0.57.3, react and react-test-renderer to 16.6.0-alpha.8af6728.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment