Reports screen might not properly show up #194

Closed
opened 2022-10-10 20:05:14 +00:00 by norm · 4 comments
Owner

I get this error when trying to load up the reports screen in the control panel:

Uncaught TypeError: P(...).slice is not a function
    at Proxy.<anonymous> (url.vue:55:2)
    at qn (runtime-core.esm-bundler.js:890:44)
    at An.O [as fn] (runtime-core.esm-bundler.js:5602:57)
    at An.run (reactivity.esm-bundler.js:185:25)
    at Q.a.update (runtime-core.esm-bundler.js:5716:56)
    at Q (runtime-core.esm-bundler.js:5730:9)
    at te (runtime-core.esm-bundler.js:5512:9)
    at ue (runtime-core.esm-bundler.js:5470:17)
    at k (runtime-core.esm-bundler.js:5060:21)
    at H (runtime-core.esm-bundler.js:5256:13)

Seems to occur when there's at least one unresolved report.

I get this error when trying to load up the reports screen in the control panel: ``` Uncaught TypeError: P(...).slice is not a function at Proxy.<anonymous> (url.vue:55:2) at qn (runtime-core.esm-bundler.js:890:44) at An.O [as fn] (runtime-core.esm-bundler.js:5602:57) at An.run (reactivity.esm-bundler.js:185:25) at Q.a.update (runtime-core.esm-bundler.js:5716:56) at Q (runtime-core.esm-bundler.js:5730:9) at te (runtime-core.esm-bundler.js:5512:9) at ue (runtime-core.esm-bundler.js:5470:17) at k (runtime-core.esm-bundler.js:5060:21) at H (runtime-core.esm-bundler.js:5256:13) ``` Seems to occur when there's at least one unresolved report.
Author
Owner

Some more (hopefully) useful info:

runtime-core.esm-bundler.js:38 [Vue warn]: Unhandled error during execution of render function 
  at <Url url="http://localhost:3000/notes/94n3c12ck4" > 
  at <AbuseReport key="966pm1oml4" report= Objectassignee: nullassigneeId: nullcomment: "test"createdAt: "2022-10-10T19:06:26.950Z"forwarded: falseid: "966pm1oml4"reporter: {id: '94h5rd8j6d', name: null, username: 'norm', host: null, avatarUrl: 'http://localhost:3000/files/thumbnail-33d6c971-f193-46cf-b43c-5243a1072803', …}reporterId: "94h5rd8j6d"resolved: falsetargetUser: {id: '94n3bn9yk0', name: null, username: 'test', host: null, avatarUrl: 'http://localhost:3000/identicon/94n3bn9yk0', …}targetUserId: "94n3bn9yk0"urls: (2) ['http://localhost:3000/notes/94n3c12ck4', 'http://localhost:3000/users/94n3bn9yk0'][[Prototype]]: Object onResolved=fn<h> > 
  at <BaseTransition mode="out-in" appear=false persisted=false  ... > 
  at <Transition name="fade" mode="out-in" style= Objectmargin-top: "var(--margin)"[[Prototype]]: Object > 
  at <Pagination ref_key="reports" ref=Ref< Proxy > pagination= Objectendpoint: "admin/abuse-user-reports"limit: 10params: kc {dep: Set(1), __v_isRef: true, __v_isReadonly: true, _dirty: false, _setter: ƒ, …}[[Prototype]]: Object  ... > 
  at <Spacer content-max=900 > 
  at <StickyContainer> 
  at <Abuses key="abuses" > 
  at <AsyncComponentWrapper key="abuses" > 
  at <Index key="1665432409204" initialPage="abuses" > 
  at <AsyncComponentWrapper key="1665432409204" initialPage="abuses" > 
  at <KeepAlive max=5 > 
  at <RouterView> 
  at <Universal> 
  at <AsyncComponentWrapper>
Some more (hopefully) useful info: ``` runtime-core.esm-bundler.js:38 [Vue warn]: Unhandled error during execution of render function at <Url url="http://localhost:3000/notes/94n3c12ck4" > at <AbuseReport key="966pm1oml4" report= Objectassignee: nullassigneeId: nullcomment: "test"createdAt: "2022-10-10T19:06:26.950Z"forwarded: falseid: "966pm1oml4"reporter: {id: '94h5rd8j6d', name: null, username: 'norm', host: null, avatarUrl: 'http://localhost:3000/files/thumbnail-33d6c971-f193-46cf-b43c-5243a1072803', …}reporterId: "94h5rd8j6d"resolved: falsetargetUser: {id: '94n3bn9yk0', name: null, username: 'test', host: null, avatarUrl: 'http://localhost:3000/identicon/94n3bn9yk0', …}targetUserId: "94n3bn9yk0"urls: (2) ['http://localhost:3000/notes/94n3c12ck4', 'http://localhost:3000/users/94n3bn9yk0'][[Prototype]]: Object onResolved=fn<h> > at <BaseTransition mode="out-in" appear=false persisted=false ... > at <Transition name="fade" mode="out-in" style= Objectmargin-top: "var(--margin)"[[Prototype]]: Object > at <Pagination ref_key="reports" ref=Ref< Proxy > pagination= Objectendpoint: "admin/abuse-user-reports"limit: 10params: kc {dep: Set(1), __v_isRef: true, __v_isReadonly: true, _dirty: false, _setter: ƒ, …}[[Prototype]]: Object ... > at <Spacer content-max=900 > at <StickyContainer> at <Abuses key="abuses" > at <AsyncComponentWrapper key="abuses" > at <Index key="1665432409204" initialPage="abuses" > at <AsyncComponentWrapper key="1665432409204" initialPage="abuses" > at <KeepAlive max=5 > at <RouterView> at <Universal> at <AsyncComponentWrapper> ```
Owner

Maybe should add this to the contributing guide or something, but you can go to packages/client/ and run npx vite build --mode development and you should get more sensible names and/or file paths in error messages.

Maybe should add this to the contributing guide or something, but you can go to `packages/client/` and run `npx vite build --mode development` and you should get more sensible names and/or file paths in error messages.
Owner

I think the problem was introduced in 16e9cf91f7 and is that there is a url variable which - for the template - shadows the property of the same name. URL.prototype.slice does not exist.

I think the problem was introduced in 16e9cf91f777e07cb375202e1b644106294a08b1 and is that there is a `url` variable which - for the template - shadows the property of the same name. `URL.prototype.slice` does not exist.
Author
Owner

Maybe should add this to the contributing guide or something, but you can go to packages/client/ and run npx vite build --mode development and you should get more sensible names and/or file paths in error messages.

This does already seem to be the case when running yarn dev (which calls the watch script in packages/client/): 91c043689b/packages/client/package.json (L6)

> Maybe should add this to the contributing guide or something, but you can go to `packages/client/` and run `npx vite build --mode development` and you should get more sensible names and/or file paths in error messages. This does already seem to be the case when running `yarn dev` (which calls the `watch` script in `packages/client/`): https://akkoma.dev/FoundKeyGang/FoundKey/src/commit/91c043689b20dc8666b78295f72a0a8941ca3634/packages/client/package.json#L6
norm closed this issue 2022-10-11 14:45:25 +00:00
Sign in to join this conversation.
No Label
feature
fix
upkeep
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: FoundKeyGang/FoundKey#194
No description provided.