# Issue Panel crashes on Issue Update

**URL:** <https://community.developer.atlassian.com/t/issue-panel-crashes-on-issue-update/71494>\
**Category:** Forge\
**Tags:** errorlog, issue-update, issue-panel, jira-cloud, error, rest-api, forge\
**Created:** [July 25, 2023, 8:39am UTC](https://community.developer.atlassian.com/t/issue-panel-crashes-on-issue-update/71494 "2023-07-25T08:39:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon34840456](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@anon34840456](https://community.developer.atlassian.com/u/anon34840456)\
**Post date:** [July 25, 2023, 8:39am UTC](https://community.developer.atlassian.com/t/issue-panel-crashes-on-issue-update/71494/1 "2023-07-25T08:39:57Z")

</div>

Hi there,

I am currently working on an Issue Panel module for my App.  
Since it’s a very simple implementation, I am using the UI-Kit…

Within the Issue Panel a function is called which updates a value in the Issue Panel causing a rerender.  
Also within the Issue Panel, a new assignee is assigned for the issue. With Assigning the Issue, the Issue automatically updates. The update makes my Issue Panel crash. The Error Message is not that helpful: “Unexpected error in app An error occurred while trying to load this app.”

It seems, the Issue Update is the cause for the Problem. I wrapped all of my corresponding functions in try/catch blocks, but there are no Error logs in my console.

```auto
const SomeIssuePanelComponent = () => {
    const [someGroupMembers, setSomeGroupMembers] = useState([]);
    const [pickedUser, setPickedUser] = useState(null);
    const context = useProductContext();

    useEffect(async () => {
        setSomeGroupMembers(await getAllPotentialAgents());
        setPickedUser(
            await getAnIssueProperty(context.platformContext.issueId)
        );
    }, []);

    const anIssuePanelFunction = async (formProps) => {
        try {
            const issueId = context.platformContext.issueId;
            const AppUser = await getAppUser();
                let promises = [];
                promises.push(
                    saveAnIssueProperty(formProps.user, issueId)
                );
                promises.push(
                    sendNotification(formProps.user, issueId)
                );
                await Promise.all(promises);
                setPickedUser(formProps.user);
                await assignIssue(issueId, appUser.accountId);
        } catch (error) {
            console.log(error);
        }
    };

    return (
        <Fragment>
            {someGroupMembers.length > 0 && (
                <Fragment>
                    <Form
                        onSubmit={anIssuePanelFunction}
                        submitButtonAppearance="primary"
                    >
                        <Select
                            label="Set User and Notify"
                            name="user"
                        >
                            <Fragment>
                                {someGroupMembers.map((user) => (
                                    <Fragment>
                                        <Option
                                            label={user.displayName}
                                            value={user.accountId}
                                        />
                                    </Fragment>
                                ))}
                            </Fragment>
                        </Select>
                    </Form>
                    {pickedUser && (
                        <Fragment>
                            <Text>
                                Current User:
                                <User accountId={pickedUser} />
                            </Text>
                        </Fragment>
                    )}
                </Fragment>
            )}
        </Fragment>
    );
};

```

Thanks in advance,  
Adrian

---

<div class="post-metadata">

**Author:** ![fbusso-folderit](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@fbusso-folderit](https://community.developer.atlassian.com/u/fbusso-folderit)\
**Post date:** [August 3, 2023, 1:20pm UTC](https://community.developer.atlassian.com/t/issue-panel-crashes-on-issue-update/71494/3 "2023-08-03T13:20:38Z")

</div>

Hi! Were you able to solve this issue?

---

<div class="post-metadata">

**Author:** ![anon34840456](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@anon34840456](https://community.developer.atlassian.com/u/anon34840456)\
**Post date:** [August 3, 2023, 2:05pm UTC](https://community.developer.atlassian.com/t/issue-panel-crashes-on-issue-update/71494/4 "2023-08-03T14:05:04Z")

</div>

No.  
I also was not able to find the cause.

---

<div class="post-metadata">

**Author:** ![fbusso-folderit](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@fbusso-folderit](https://community.developer.atlassian.com/u/fbusso-folderit)\
**Post date:** [August 3, 2023, 2:09pm UTC](https://community.developer.atlassian.com/t/issue-panel-crashes-on-issue-update/71494/5 "2023-08-03T14:09:13Z")

</div>

Does this happen only when accessing the issue via the “View issue” button after creating it? Or does it always happen?

---

<div class="post-metadata">

**Author:** ![anon34840456](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@anon34840456](https://community.developer.atlassian.com/u/anon34840456)\
**Post date:** [August 3, 2023, 2:20pm UTC](https://community.developer.atlassian.com/t/issue-panel-crashes-on-issue-update/71494/6 "2023-08-03T14:20:56Z")

</div>

It’s occurring when updating the Issue via the API. The re-render of the issue is somehow creating an error in the customui frontend.

---

<div class="post-metadata">

**Author:** ![fbusso-folderit](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@fbusso-folderit](https://community.developer.atlassian.com/u/fbusso-folderit)\
**Post date:** [August 3, 2023, 2:33pm UTC](https://community.developer.atlassian.com/t/issue-panel-crashes-on-issue-update/71494/7 "2023-08-03T14:33:00Z")

</div>

I’m having the same issue, but only only the first time I run my app in a new ticket.
