Production Forge app getting error: "Unexpected token u in JSON at position 0"

Nagaraja (MicroGenesis TechSoft)
Atlassian Partner
August 19, 2024

We are encountering an issue with our Forge app in the production environment. The following error is being logged:

{ "message":"Unexpected token u in JSON at position 0", "name":"FUNCTION_ERR", "stack":"SyntaxError: Unexpected token u in JSON at position 0\n at JSON.parse ()\n at run (index.js:31205:28)",

}

1 answer

1 vote
Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 19, 2024

Hello @Nagaraja (MicroGenesis TechSoft) 

This question is more suitable for developer community: https://community.developer.atlassian.com/

P.S What I've found: "The error "Unexpected token u in json at position 0" suggests you're trying to parse undefined as JSON in your test or script. "

Nagaraja (MicroGenesis TechSoft)
Atlassian Partner
August 19, 2024

Hello Nikola,

However, I am not passing any JSON data at this stage. I have created an event listener that triggers the main logic only when a Jira ticket is created, updated, or commented on. The issue is specific to one site where this error occurs, and as a result, the main logic is not triggered, meaning no action is taken on the Jira ticket. The error happens before anything else is processed.

Screenshot 2024-08-19 135235.pngScreenshot 2024-08-19 135307.png

Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 19, 2024

Understood, please refer to the developer community. Thank you!

Nagaraja (MicroGenesis TechSoft)
Atlassian Partner
August 19, 2024

Ok Thank you

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events