Comments (5)
We're actually looking at updating the sourcemap implementation right now for other benefits (slightly faster linking, fewer tiny files on disk, and drop the mostly-unneeded old protobuf dependency in gwt-servlet), and can take a look at this at the same time if there is some way to reproduce this, or at least broken symbolMap/sourcemap files to work from? Those files plus the frame info (obf method name, file name, line and column numbers) should make it possible to see where the mismatch is, and hopefully reproduce and fix it.
I've never dug too deeply on this part, but it looks like the symbolmap is first used to rewrite from the obfuscated/generated js method name, then augment with sourcemaps. If I'm reading this right, the fact that you see qualified paths (com/google/common/base/Joiner.java
etc) rather than just the bare file name (Widget.java
or Joiner.java
) suggests that you're not just getting the symbolmap data, as that reads after the last index of /
in the uri:
gwt/user/src/com/google/gwt/core/server/StackTraceDeobfuscator.java
Lines 257 to 261 in d77e85c
Instead, the bad path seems to be coming from sourcemaps. Any chance you're customizing the linker in any way, which might alter the offsets...?
from gwt.
Sadly I cannot share the code or symbolMap/sourcemap. It is also pretty large since a permutation is about 10MB. The above example was produced on iOS. I could try checking if it is always iOS/webkit or if other browsers also have the problem and if it is always using a qualified path if the filename is wrong.
At least I can say that no custom linker is used, just the default one of GWT.
First I thought it could be JsInliner but then some really wild combinations occurred, like the one above, that cannot be explained with inlining. It looks like a more fundamental problem either in GWT or in the app.
from gwt.
We don't need the full thing to analyze, see what might be wrong, just enough to accurately point the finger? Otherwise we're pretty limited to finding someone else who can share some files.
In theory, just the stack trace (with all the details, like the one you shared above except pre-deobfuscation), the relevant symbolmap lines (again, only maps to com.google.common and com.google.gwt classes and methods)... and the sourcemap info. That is a bit harder to decompose, but at least if you confirm the first two, you will know that symbolmaps are probably not to blame, and that we're looking at a sourcemap issue of some kind.
They certainly can be decomposed though - the java api in sourcemap-rebased.jar isn't too terrible to walk if you want to do it yourself. Alternatively, as I said in my other comment, we'll be updating that jar soon, and maybe the issue will resolve itself from some change to closure-compiler in the last ~8 years...
from gwt.
Any actual details you can share on this? Otherwise, consider pulling from #9936 (and leaving compiler.embedSourceMaps
to false, since you aren't interested in that).
Also just in case, you don't think this is a dup of #9038? I'm assuming that you checked, but maybe you missed that one? Just in case, that would seem to add a constant offset somewhere in your stack, which could produce what you're seeing (but you could only confirm with access to the compiled JS). At a brief glance, that should only happen if you happen to be generating prod code as non-OBFUSCATED.
Given that only frames that are correct are those with no sourcemap details added, it seems plausible that this is the same issue? Can you confirm other compiler settings, etc, so we can hunt this down while we're working on sourcemaps?
from gwt.
Not really. Poking around takes too long at work since compiling the app is about 10-15 minutes and I actually forgot to check the issue tracker if only specific browsers are affected. I am basically waiting for an exception that can easily be reproduced and has a broken stack trace. Then I can checkout the source of that production build, modify the server and log both JS and deobfuscated stack traces using various browsers.
I can't remember how it works but I think I have never seen a broken stack trace during development using Chrome + SDM. In development exceptions are directly logged to browser console.
from gwt.
Related Issues (20)
- Tutorial: webAppCreator deprecated but necessary for tutorials HOT 2
- Need a method to run DevMode on systems without GUI support HOT 1
- SuperDevListener is not correctly build includeJsInteropExports/excludeJsInteropExports args
- Issue with tomcat version of GWT 2.11 for class javax.validation.Path HOT 8
- JDK 17 and GIN HOT 16
- SDM BindException: Address already in use
- GWT compiling issue in java 11 HOT 2
- Spurious incremental CompilerTest failure
- GWT 2.11 and Jetty 9.4.54.v20240208 error running in IntelliJ 2024.1 Ultimate HOT 3
- SDM (Super Dev Mode) does not work with a strong CSP (Content Security Policy)
- Draft compile with compiler.stackMode=strip seems to break stack trace deobfuscation with sourcemaps HOT 1
- Upgrade to HtmlUnit 3.9.0 or 4.1.0 HOT 2
- Upgrade icu4j to a version > 63.1
- Memory leak in stored exceptions HOT 8
- Issue with com.google.gwt.i18n.client.TimeZone in GWT 2.11 for Africa/Cairo Time Zone HOT 4
- Add Java 9 BigInteger methods sqrt and sqrtAndRemainder
- GWT from 2.9 to 2.11 Migration Issue Could not find com.google.gwt:gwt-codeserver:2.11.0. HOT 1
- Remove onLoadErrorFn/onPropertyErrorFn, or make them easier to disable
- Upgrading to GWT 2.10.1 is causing IncompatibleRemoteServiceException HOT 1
- GWT Issue with JDK 17 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt.