<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article RUM JavaScript Agent returns 'URL is not a constructor' error in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/RUM-JavaScript-Agent-returns-URL-is-not-a-constructor-error/ta-p/294549</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H2&gt;Summary&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Applications monitored by RUM generate JavaScript errors referring to&amp;nbsp;'URL is not a constructor' when using RUM Agent 1.329 or higher. This is caused by the RUM Agent&amp;nbsp;using the&amp;nbsp;&lt;CODE&gt;URL&lt;/CODE&gt;&amp;nbsp;constructor to validate origins.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;Problem&lt;/H2&gt;
&lt;P&gt;Following the release of RUM JavaScript Agent 1.329, some customers have reported encountering JavaScript errors on pages related to '&lt;STRONG&gt;URL is not a constructor&lt;/STRONG&gt;.' This&amp;nbsp;&lt;SPAN&gt;occurs because the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;URL&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;object on the affected page has been overridden by non‑standard code. In other words, something on the application side replaces the native&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;URL&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;constructor with a custom implementation, and that breaks the JS Agent’s ability to function correctly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;Resolution&lt;/H2&gt;
&lt;P&gt;To resolve the issue, the override of the&amp;nbsp;&lt;CODE&gt;URL&lt;/CODE&gt;&amp;nbsp;constructor will need to be removed so the browser’s default implementation is restored.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As a temporary solution, you can update your RUM application to use version 1.327 of the RUM JavaScript agent. See how to&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.dynatrace.com/docs/observe/digital-experience/web-applications/additional-configuration/rum-javascript-version" target="_self" rel="noopener noreferrer"&gt;Control the RUM JavaScript version&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;What's next&lt;/H2&gt;
&lt;P&gt;This issue arises in version 1.329 because the RUM agent&amp;nbsp;&lt;SPAN&gt;the JS Agent uses the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;URL&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;constructor to validate origins. This is part of the default, browser‑supported API surface. Please check this Mozilla documentation for more information:&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/URL" target="_self"&gt;Developer Mozilla API URL.&lt;/A&gt;&lt;/SPAN&gt;&lt;EM style="font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;If this article did not help, please open a support ticket, mention that this article was used and provide the following in the ticket:&lt;/P&gt;
&lt;DIV class="p-client_container"&gt;
&lt;DIV class="p-ia4_client_container"&gt;
&lt;DIV class="p-ia4_client p-ia4_client--with-search-in-top-nav p-ia4_client--workspace-switcher-rail-visibletest p-ia4_client--sidebar-wide p-ia4_client--narrow-feature-on"&gt;
&lt;DIV class="p-client_workspace_wrapper" role="tabpanel" aria-label="Dynatrace"&gt;
&lt;DIV class="p-client_workspace" role="tabpanel" aria-label="DMs"&gt;
&lt;DIV class="p-client_workspace__layout"&gt;
&lt;DIV class="active-managed-focus-container" role="none"&gt;
&lt;DIV class="p-view_contents p-view_contents--primary" tabindex="-1" role="dialog" aria-label="Conversation with Anton Konikov"&gt;
&lt;DIV class="tabbed_channel__Abx5r"&gt;
&lt;DIV class="tabbed_channel__Abx5r"&gt;
&lt;DIV class="channel_tab_panel__zJ5Bt c-tabs__tab_panel c-tabs__tab_panel--active c-tabs__tab_panel--full_height" role="none" data-qa="tabs_content_container"&gt;
&lt;DIV class="p-file_drag_drop__container"&gt;
&lt;DIV class="p-workspace__primary_view_body"&gt;
&lt;DIV class="p-message_pane p-message_pane--classic-nav p-message_pane--scrollbar-float-adjustment p-message_pane--with-bookmarks-bar" data-qa="message_pane"&gt;
&lt;DIV role="presentation"&gt;
&lt;DIV class="c-virtual_list c-virtual_list--scrollbar c-message_list c-message_list--floating c-message_list--dark c-scrollbar c-scrollbar--fade" role="presentation"&gt;
&lt;DIV class="c-scrollbar__hider" role="presentation" data-qa="slack_kit_scrollbar"&gt;
&lt;DIV class="c-scrollbar__child" role="presentation"&gt;
&lt;DIV class="c-virtual_list__scroll_container" tabindex="-1" role="list" data-qa="slack_kit_list" aria-label="Anton Konikov (direct message, active)"&gt;
&lt;DIV id="1734101723.604509" class="c-virtual_list__item" tabindex="0" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1734101723.604509"&gt;
&lt;DIV class="c-message_kit__background p-message_pane_message__message c-message_kit__message p-message_pane_message__message--last" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--above"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;UL class="p-rich_text_list p-rich_text_list__bullet p-rich_text_list--nested" data-stringify-type="unordered-list" data-list-tree="true" data-indent="0" data-border="1" data-border-radius-top-cap="0"&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Link to the RUM Application in your Environment&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Link to the JavaScript Error in your Environment&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;A .HAR file of a page where the problem occurs&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 04 Mar 2026 11:58:33 GMT</pubDate>
    <dc:creator>Ana_Alvear</dc:creator>
    <dc:date>2026-03-04T11:58:33Z</dc:date>
    <item>
      <title>RUM JavaScript Agent returns 'URL is not a constructor' error</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/RUM-JavaScript-Agent-returns-URL-is-not-a-constructor-error/ta-p/294549</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H2&gt;Summary&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Applications monitored by RUM generate JavaScript errors referring to&amp;nbsp;'URL is not a constructor' when using RUM Agent 1.329 or higher. This is caused by the RUM Agent&amp;nbsp;using the&amp;nbsp;&lt;CODE&gt;URL&lt;/CODE&gt;&amp;nbsp;constructor to validate origins.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;Problem&lt;/H2&gt;
&lt;P&gt;Following the release of RUM JavaScript Agent 1.329, some customers have reported encountering JavaScript errors on pages related to '&lt;STRONG&gt;URL is not a constructor&lt;/STRONG&gt;.' This&amp;nbsp;&lt;SPAN&gt;occurs because the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;URL&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;object on the affected page has been overridden by non‑standard code. In other words, something on the application side replaces the native&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;URL&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;constructor with a custom implementation, and that breaks the JS Agent’s ability to function correctly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;Resolution&lt;/H2&gt;
&lt;P&gt;To resolve the issue, the override of the&amp;nbsp;&lt;CODE&gt;URL&lt;/CODE&gt;&amp;nbsp;constructor will need to be removed so the browser’s default implementation is restored.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As a temporary solution, you can update your RUM application to use version 1.327 of the RUM JavaScript agent. See how to&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.dynatrace.com/docs/observe/digital-experience/web-applications/additional-configuration/rum-javascript-version" target="_self" rel="noopener noreferrer"&gt;Control the RUM JavaScript version&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;What's next&lt;/H2&gt;
&lt;P&gt;This issue arises in version 1.329 because the RUM agent&amp;nbsp;&lt;SPAN&gt;the JS Agent uses the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;URL&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;constructor to validate origins. This is part of the default, browser‑supported API surface. Please check this Mozilla documentation for more information:&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/URL" target="_self"&gt;Developer Mozilla API URL.&lt;/A&gt;&lt;/SPAN&gt;&lt;EM style="font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;If this article did not help, please open a support ticket, mention that this article was used and provide the following in the ticket:&lt;/P&gt;
&lt;DIV class="p-client_container"&gt;
&lt;DIV class="p-ia4_client_container"&gt;
&lt;DIV class="p-ia4_client p-ia4_client--with-search-in-top-nav p-ia4_client--workspace-switcher-rail-visibletest p-ia4_client--sidebar-wide p-ia4_client--narrow-feature-on"&gt;
&lt;DIV class="p-client_workspace_wrapper" role="tabpanel" aria-label="Dynatrace"&gt;
&lt;DIV class="p-client_workspace" role="tabpanel" aria-label="DMs"&gt;
&lt;DIV class="p-client_workspace__layout"&gt;
&lt;DIV class="active-managed-focus-container" role="none"&gt;
&lt;DIV class="p-view_contents p-view_contents--primary" tabindex="-1" role="dialog" aria-label="Conversation with Anton Konikov"&gt;
&lt;DIV class="tabbed_channel__Abx5r"&gt;
&lt;DIV class="tabbed_channel__Abx5r"&gt;
&lt;DIV class="channel_tab_panel__zJ5Bt c-tabs__tab_panel c-tabs__tab_panel--active c-tabs__tab_panel--full_height" role="none" data-qa="tabs_content_container"&gt;
&lt;DIV class="p-file_drag_drop__container"&gt;
&lt;DIV class="p-workspace__primary_view_body"&gt;
&lt;DIV class="p-message_pane p-message_pane--classic-nav p-message_pane--scrollbar-float-adjustment p-message_pane--with-bookmarks-bar" data-qa="message_pane"&gt;
&lt;DIV role="presentation"&gt;
&lt;DIV class="c-virtual_list c-virtual_list--scrollbar c-message_list c-message_list--floating c-message_list--dark c-scrollbar c-scrollbar--fade" role="presentation"&gt;
&lt;DIV class="c-scrollbar__hider" role="presentation" data-qa="slack_kit_scrollbar"&gt;
&lt;DIV class="c-scrollbar__child" role="presentation"&gt;
&lt;DIV class="c-virtual_list__scroll_container" tabindex="-1" role="list" data-qa="slack_kit_list" aria-label="Anton Konikov (direct message, active)"&gt;
&lt;DIV id="1734101723.604509" class="c-virtual_list__item" tabindex="0" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1734101723.604509"&gt;
&lt;DIV class="c-message_kit__background p-message_pane_message__message c-message_kit__message p-message_pane_message__message--last" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--above"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;UL class="p-rich_text_list p-rich_text_list__bullet p-rich_text_list--nested" data-stringify-type="unordered-list" data-list-tree="true" data-indent="0" data-border="1" data-border-radius-top-cap="0"&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Link to the RUM Application in your Environment&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Link to the JavaScript Error in your Environment&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;A .HAR file of a page where the problem occurs&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Mar 2026 11:58:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/RUM-JavaScript-Agent-returns-URL-is-not-a-constructor-error/ta-p/294549</guid>
      <dc:creator>Ana_Alvear</dc:creator>
      <dc:date>2026-03-04T11:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: RUM JavaScript Agent returns 'URL is not a constructor' error</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/RUM-JavaScript-Agent-returns-URL-is-not-a-constructor-error/tac-p/295910#M1090</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;There should be a resolution from Dynatrace, as this issue did not occur in versions prior to 1.329.&lt;/P&gt;&lt;P&gt;Additionally, the proposed solution — removing the override of the URL constructor — would require action from each organization’s development team. Since the application works without errors when RUM is disabled, this may lead many teams to simply deactivate RUM instead of modifying their code.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2026 11:42:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/RUM-JavaScript-Agent-returns-URL-is-not-a-constructor-error/tac-p/295910#M1090</guid>
      <dc:creator>Puche</dc:creator>
      <dc:date>2026-03-09T11:42:00Z</dc:date>
    </item>
  </channel>
</rss>

