-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Source-map-explorer error #118
Comments
Same here. Tried downgrading, but made no difference. Haven't been able to find a solution for this one. |
I installed this version as a dev dependency, and ran locally to fix + "react-native-bundle-visualizer": "3.1.0", |
@JHeigle @gabimoncha Can you guys tell are you using react-native cli or expo? Also the react-native-bundle-visualizer version that is being used. |
seen the same issue. RN 0.71.2 and react-native-bundle-visualizer 3.1.3 tried with 3.1.0 and have a different error message, so it seems there is a difference in behavior between 3.1.0 and 3.1.3:
ok I see 3.1.3 is supposed to fix RN 0.71 compatibility, I guess this is why I had different behavior. unfortunately seems none version works for me. @hurali97 related repo if you want to try locally: https://github.com/GaloyMoney/galoy-mobile |
@nicolasburtey Thanks for the repro. I briefly took a look at that and looks like it's probably related to how I will try to comeback soon with an update. 👍 |
Same here, no metro overrides, completely new project =(
|
Not working |
I'm using react-native-cli and |
This is probably related to this: #116 Try this temp fix: #116 (comment) The latest metro has a fix for this issue. see the linked PR on the above issue here (although I don't know what it means for in terms of a new release for this package) |
@frankcalise thanks for the the comment. But I'm not sure I understand what should I do? |
Hey folks, Sorry for not being active. But I think I can devote some time to it now. I will be testing this on:
Let's see how far do I get in terms of investigating and then getting it fixed 🤞 |
Hi guys, I have a few comments to discuss:
I need some confirmation from the community, does latest I tried on my system and it works without any fuss. So I will wait until I get some confirmations if that's the case for others and then reverting the changes of setting minification to false in this PR, so that we benefit from minification while visualizing the bundles. |
@hurali97 thanks for looking into it some, I am not sure if that's the only issue as it's stated it started w/ RN 70 version but at least in my case my project is still on RN 68. I was able to work around the issue though as noted in my previous comment above. |
@scrungrth Okay, so 3.1.0 works for you on react-native 0.68 ? 🤔 So it's probably possible that 3.1.3 doesn't work for some folks and it's ideally safe to revert that change. Given that, if things work for you on 3.1.0, you should be good with the new release of this package which will revert the changes introduced in the last 3.1.3 release. As far as I have researched and investigated minification changes by metro is the root cause of this issue and should be fine with latest RN but let's see. |
I confirm that 3.1.0 is working for 0.67.5 too |
@gabimoncha Thanks for verifying that 🎉 . I believe 3.1.2 will be fine as well. Since it doesn't introduce any new API. We can revert 3.1.3 which sets minify false. And then we will be good to go. I will test some pieces again, and will try to do a release in a couple days. |
Thanks. Will check that and get back to you |
That is correct. 3.1.2 is working @hurali97 |
I found out that it works fine on version 3.1.3 with React Native v0.71.4 when you disable the
edit: Oh, I see there was a PR that actually added the |
Hey folks, I have pushed a fix, which reverts the If someone wants to help in testing, please remove the existing package and install it from the following command:
I tested this on the latest react-native: 0.71.6 and expo SDK: 48.0.10, and it works fine. I have also added a troubleshooting section to use v3.1.3, if they encounter negative line error, which may appear in versions around >=0.70.0 & <=0.71.3. Also, tested on RN64 and expo SDK 42, all green there as well. I will be releasing a new version with this fix soon 🤞 |
CRNA RN 0.71.6 and it works great, thank you! |
I was running into My environment is a bit complex being Just interested if anyone has any ideas with how to troubleshoot this. |
This worked for me with Expo SDK 48 and RN 0.71.8. |
Works for me Thanks! 🥰🥰🏆 |
This works for me on Expo SDK 48.0.19 and RN 0.71.8. Thanks! Will the new version be released soon? |
It also works for me with the fix of @hurali97. Any update on this? |
@hurali97 Your update also worked for me ) |
react-native: 0.72.^
|
You can also run |
work for me |
not work for Expo 49 |
Confirm that this is working for |
I'm using react-native-cli and I ran
|
It started working for me after I've upgraded react-redux from 8 to 9. |
Add this line: node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js return explore(
{
code: bundleOutput,
map: bundleOutputSourceMap
},
{
onlyMapped,
noBorderChecks: true, // <----------- Add this line
output: {
format,
filename: bundleOutputExplorerFile,
},
}
); |
3.1.3 fails with react native 0.73.6, same kind of error. npx react-native-bundle-visualizer info Writing bundle output to:, /var/folders/f3/z6y52mn91vv4bgtp0qsk7tvr0000gn/T/react-native-bundle-visualizer/modalview/ios.bundle |
I added the noBorderChecks line and it runs, but there's no treemap, pretty much a blank window |
Same here. No details in the tree structure even after applying the patch.
|
npx source-map-explorer ios.bundle --no-border-checks |
It worked, thanks 👍🏼 |
nothing worked for me. devDependencies after running this : npx react-native-bundle-visualizer --platform android Generating bundle... info Writing bundle output to:, /var/folders/f3/nd_q0dz1475_r3z6hbmh_3zh0000gp/T/react-native-bundle-visualizer/AwesomeProject/android.bundle |
Error with react-native 0.73.8 |
error with 0.73.8 |
Works but empty tree map on 0.74.3 |
Works but empty tree map on 0.74.1 |
这样之后我这里运行起来了 |
It would appear that Instead of detecting Applying the following hack to function computeFileSizes(sourceMapData, options, coverageRanges) {
const { consumer, codeFileContent: fileContent } = sourceMapData;
const sourceMapComment = getSourceMapComment(fileContent);
const sourceContent = fileContent.replace(sourceMapComment, '').trim();
- const eol = helpers_1.detectEOL(fileContent);
+ const eol = '\n';//helpers_1.detectEOL(fileContent);
const lines = sourceContent.split(eol); This allows exploration of a generated bundle source map to complete without enabling |
same error === error === { |
I confirm this is fixing the error, Thank you very much ! |
combining this with the EOL fix makes my tree map at least have my src folder included (as opposed to having none) around 19% still unmaped though 😞 Edit: btw, I was curious about which parts of the sources where referencing |
Hello,
Recently, we moved to yarn workspace monorepo although I'm not sure if this is happening because of it since I haven't used the library in some time.
There lib is generating the bundle and sourcemap, but it seems to be corrupted.
The text was updated successfully, but these errors were encountered: