Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Web/Resgrid.Web/Areas/User/Views/Shared/_UserLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@

@if (Resgrid.Config.ExternalErrorConfig.SentryPerfSampleRate > 0 && !String.IsNullOrWhiteSpace(Resgrid.Config.ExternalErrorConfig.ExternalErrorServiceUrlForWebsite))
{
<script src="https://browser.sentry-cdn.com/7.116.0/bundle.min.js"></script>
<script src="~/lib/sentry/bundle.min.js"></script>
<script>
if (window["Sentry"] && Sentry) {
Sentry.init({
dsn: '@Resgrid.Config.ExternalErrorConfig.ExternalErrorServiceUrlForWebsite',
integrations: [new Sentry.Integrations.Breadcrumbs({ console: false })],
integrations: [Sentry.breadcrumbsIntegration({ console: false })],
tracesSampleRate: @Resgrid.Config.ExternalErrorConfig.SentryPerfSampleRate
});
});
}
</script>
<script src="https://sentry.resgrid.net/js-sdk-loader/8a935a7e61f257ce1a3b9131600ecb29.min.js" crossorigin="anonymous"></script>
}

@if (!String.IsNullOrWhiteSpace(Resgrid.Config.TelemetryConfig.PostHogUrl) && !String.IsNullOrWhiteSpace(Resgrid.Config.TelemetryConfig.PostHogApiKey))
Expand Down
9 changes: 9 additions & 0 deletions Web/Resgrid.Web/libman.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,15 @@
"lib/countly.js",
"lib/countly.min.js"
]
},
{
"provider": "filesystem",
"library": "vendor/sentry/",
"destination": "wwwroot/lib/sentry/",
"files": [
"bundle.min.js",
"bundle.min.js.map"
]
Comment on lines +319 to +325
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Verify filesystem-provider source files exist"
fd -p '^vendor/sentry/bundle\.min\.js$'
fd -p '^vendor/sentry/bundle\.min\.js\.map$'

echo "Verify publish step runs libman restore"
fd -p 'Resgrid.Web.csproj' -x rg -n 'PrepublishScript|libman restore'

Repository: Resgrid/Core

Length of output: 256


Missing vendor/sentry files will cause libman restore to fail during publish.

The vendor/sentry/ directory referenced in this libman.json entry does not exist in the repository. Since PrepublishScript in Resgrid.Web.csproj correctly invokes libman restore before publish, this configuration will fail when the build pipeline attempts to copy non-existent files.

Either add the vendor/sentry source files to the repository, remove this libman.json entry, or switch to a package manager source (e.g., npm, NuGet) instead of the filesystem provider.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Web/Resgrid.Web/libman.json` around lines 319 - 325, The libman.json entry
referencing the filesystem provider "vendor/sentry/" is pointing to a
non-existent source and will cause libman restore to fail during the
PrepublishScript invoked by Resgrid.Web.csproj; fix this by either adding the
missing vendor/sentry files into the repository at vendor/sentry/, removing the
sentry entry from libman.json, or changing the provider to a valid package
source (e.g., "provider": "unpkg" or switching to npm) and updating the
"library" and "files" fields accordingly so libman restore can succeed.

}
]
}
3 changes: 3 additions & 0 deletions Web/Resgrid.Web/vendor/sentry/bundle.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Web/Resgrid.Web/vendor/sentry/bundle.min.js.map

Large diffs are not rendered by default.

Loading