Can not use Forge bridge invoke in Connect on Forge app.

Hieu Nguyen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 20, 2025

Hi,
I'm developing a Connect on Forge app for Jira Cloud. I imported the invoke function from @Forge/bridge to use in the code file of connect modules in the remotes/connect folder to call to forge modules and got the error Uncaught BridgeAPIError: Unable to establish a connection with the Custom UI bridge. 

Do you have any idea of what problem could be?

Screenshot 2025-01-20 154222.pngScreenshot 2025-01-20 154737.png

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2025

Hi @Hieu Nguyen 

There may be several root causes for this error. Did you try forge tunnel? Do you get a similar connection error when you use tunnel?

As the error states, Forge apps do not work directly without being embedded in the Atlassian context. However, I trust you have already configured the Bitbucket connection correctly in your manifest file, and it has been well configured.

@forge/bridge can only be used in Custom UI components, It does not work outside a Custom UI context, I mean for backend or resolver calls, you can use @forge/api instead of bridge.

Last, I'd strongly suggest posting these kinds of developer questions on the Atlassian Developer Community, as you can receive more answers.

Hieu Nguyen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 20, 2025

@Tuncay Senturk Thank you so much!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events