Commit cd899a1
authored
fix(report): set explicit assetPrefix to avoid runtime publicPath error (#2345)
* fix(report): set explicit assetPrefix to avoid runtime publicPath error
Without an explicit output.assetPrefix, rsbuild defaults to 'auto',
which relies on document.currentScript.src at runtime. Combined with
inlineScripts: true the src is empty, and some browsers throw
'Automatic publicPath is not supported in this browser' when the bundle
tries to resolve asset paths. This surfaced in 1.7.x when reports moved
to the html-and-external-assets layout (with externalized screenshots).
Setting assetPrefix: './' makes rspack emit relative paths and skip the
runtime auto-detection path entirely.
* feat(core): warn when ReportMergingTool meets a version-mismatched source report
Users who install @midscene/android and @midscene/core at different
versions (commonly 'latest' on core while pinning android to a prepatch)
end up with ReportMergingTool loaded from the older @midscene/core at
the package root while the agent generates reports from the newer core
nested under @midscene/android. Before #2153's per-execution append
model, mergeReports read only the last <script type="midscene_web_dump">
tag per source file, which silently drops every intermediate action and
leaves the merged report with nothing but the test's final step.
Peek at the source report's sdkVersion on append and log a clear warning
when it differs from the merger's own getVersion(), so the mismatch
surfaces before the user spends time debugging an empty-looking report.1 parent 5d98966 commit cd899a1
2 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
61 | 79 | | |
62 | 80 | | |
63 | 81 | | |
| |||
72 | 90 | | |
73 | 91 | | |
74 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
75 | 108 | | |
76 | 109 | | |
77 | 110 | | |
| |||
0 commit comments