Skip to content

Opening an app URL for a space you can't access shows a raw JavaScript error and no way to close the app #4255

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Opening an app URL for a space the current user can't resolve (e.g. an editor URL copied from someone else's address bar) shows a raw JavaScript error, and the app top bar with the close button is gone, so only Esc or the browser's back button get you out. useDriveResolver returns no space for an alias the user can't see, useAppDefaults builds a context with space undefined, and AppWrapper still calls getFileInfo, which crashes in web-client/src/webdav/utils.ts. The bare /text-editor route crashes in useGetResourceContext (id.toString() without a fileId). AppWrapper shows error.message as is and hides the top bar on any loading error.

Reproduction Steps

  1. Log in as dennis
  2. Open /text-editor/project/doesnotexist/x.md
  3. Or open an editor URL copied from another user's address bar, e.g. /text-editor/personal/lynn/<folder>/inner.txt?fileId=…, also when lynn shared that folder with dennis
  4. Or open /text-editor without a path

Expected Outcome

The same "Resource not found" screen you get for a file that doesn't exist in a space you can see (e.g. /text-editor/personal/admin/<unknown-name>), like the preview already does.

Actual Outcome

The error screen shows Cannot read properties of undefined (reading 'webDavPath') (bare route: …(reading 'toString')), and there's no top bar or close button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions