Use preview features

Hey together :slight_smile:

I’m completely new to forge and also totally lost regarding some problem :sweat:
My situation is, that we have to use forge to build a custom app for our company.
This app should communicate with a self hosted Java backend (build with spring) via REST services.

I’ve found this way to handle it:
https://developer.atlassian.com/platform/forge/apis-reference/ui-api-bridge/invokeRemote/

But when I’m trying
import { invokeRemote } from "@forge/bridge";
it only says, the import cannot be found.
I’m onto the current CLI version.

After realising, that this invokeRemote feature is only accessable in preview I’ve tried several approaches to enable it, but nothing worked.

This is my manifest.yaml:

  jira:issueAction:
    - key: jiracustomui-hello-world-issue-action
      resource: main
      resolver:
        function: resolver
      viewportSize: large
      title: jiracustomui
  function:
    - key: resolver
      handler: index.handler
  endpoint:
    - key: jiratoabacus
      remote: jiratoabacusRemote
      route:
        path: '/test'
      auth:
        appUserToken:
          enabled: true
        appSystemToken:
          enabled: false
resources:
  - key: main
    path: static/hello-world/build
permissions:
  scopes:
    - read:jira-work
    - read:app-user-token
    - storage:app
  content:
    styles:
      - unsafe-inline
  external:
    fetch:
      backend:
        - 'https://[...].io'
app:
  id: [...]
remotes:
  - key: jiratoabacusRemote
    baseUrl: 'https://[...].io/api/test'

Can you please help and explain to me what I am doing wrong and how can I do it right? :slight_smile:

If you need further informations, feel free to comment :slight_smile:

Thx in advance and kind regards
Martin

Hi @martinkeller

Can you please confirm which version of the "@forge/bridge": "^3.1.0" package you have installed in your package.json. We have a public reference app available here if this is helpful as well and you haven’t seen it?

2 Likes

Hey Pat :slight_smile:

Thx for the reference app. I’ll take a look onto it!

The problem could be solved with the example! Thx @Pat :slight_smile: