Skip to content

[Ember] You must pass a url that begins with the application's rootURL with hash location #18543

@rreckonerr

Description

@rreckonerr

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/ember

SDK Version

10.31.0

Framework Version

ember-source 5.12

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

  1. Use the "hash" location type in a newly created ember app

Expected Result

There should be no console You must pass a url that begins with the application's rootURL error.

Actual Result

Uncaught (in promise) Error: Assertion Failed: You must pass a url that begins with the application's rootURL "/"

Additional Context

The issue was introduced in 7947e34 , the EmberRouterMain interface includes implementation field, which is in fact optional and not included by default in predefined ember location types, see https://github.com/emberjs/ember.js/blame/848cc6a309c57794c12086458f6d6e04f2be2482/packages/%40ember/routing/location.ts#L12 and https://github.com/emberjs/ember.js/blob/848cc6a309c57794c12086458f6d6e04f2be2482/packages/%40ember/routing/hash-location.ts . The current workaround is to redefine a app/locations/hash.js as

import HashLocation from "@ember/routing/hash-location";

export default class Hash extends HashLocation {
  implementation = "hash";
}

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

Labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions