makeplane / makeplane/plane

[bug]: Adding a file asset to a issue via API crashes the webapp

Open
#5,828 3 comments 0 reactions 2 assignees View on GitHub

@NarayanBavisetti is already working on this.

Since Oct 24, 2024.

⚙️backend 🏠self-hosted 🐛bug
Dominant language
TypeScript
Stars
59.6k
Forks
5.8k
Avg merge
1d 22h
Merged PRs (30d)
49

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current behavior

The app crashes when opening a issue that got an asset attached via api

Screenshot 2024-10-14 at 21 12 36
Full js error

```

[Error] TypeError: undefined is not an object (evaluating 'e.lastIndexOf') — 5135-60eae4df96c25e64.js:1:345616
(anonymous function) (2364-0c2c79aac8387d55.js:1:4069)
l_ (618f8807-aec0e6ea0493cb1c.js:1:56412)
(anonymous function) (618f8807-aec0e6ea0493cb1c.js:1:56765)
nB (618f8807-aec0e6ea0493cb1c.js:1:31532)
nV (618f8807-aec0e6ea0493cb1c.js:1:31625)
aq (618f8807-aec0e6ea0493cb1c.js:1:73413)
aY (618f8807-aec0e6ea0493cb1c.js:1:74059)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73771)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74334)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74334)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:75298)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74429)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:75298)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74429)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:75298)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74429)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74334)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74334)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73771)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73771)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:73734)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74407)
a9 (618f8807-aec0e6ea0493cb1c.js:1:84636)
aY (618f8807-aec0e6ea0493cb1c.js:1:74103)
(anonymous function) (618f8807-aec0e6ea0493cb1c.js:1:107757)
is (618f8807-aec0e6ea0493cb1c.js:1:108310)
nb (618f8807-aec0e6ea0493cb1c.js:1:26968)
nw (618f8807-aec0e6ea0493cb1c.js:1:27578)
(anonymous function) (618f8807-aec0e6ea0493cb1c.js:1:28611)

</p>
</details> 


### Steps to reproduce

Create an issue and get its id 
Make POST request to `https://domain.com/api/v1/workspaces/<workspace>/projects/<project-id>/issues/<issue-id>/issue-attachments/ ` with a 'asset' body 
Get correct 200 response and asset created 

{
"id": "7080c1c0-fcc9-4f75-b0fd-a8d463ed6c7a",
"created_at": "2024-10-14T15:10:33.222406+02:00",
"updated_at": "2024-10-14T15:10:33.222428+02:00",
"deleted_at": null,
"attributes": {},
"asset": "https://domain.com/uploads/10fc538e-33c9-4227-8661-f4d6971ada05/file.png",
"external_source": null,
"external_id": null,
"created_by": "redacted",
"updated_by": "redacted",
"project": "eb40810e-redacted",
"workspace": "10fc568e-39c9-redacted",
"issue": "6d42cd23-redacted"
}

Go to UI and try to open the issue
App crashes


### Environment

Production

### Browser

Safari

### Variant

Self-hosted

### Version

v0.23.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.