Invoking a method from onSubmit

Sudhir August 7, 2022

We are developing a forge plugin, when are trying to `invoke` a method from a form's on submit, the method gets invoked but we are not getting any response back and instead we see the following error in the browser console.


global-bridge.js:1 Uncaught Error: No handler found for post message response for message: close from in

The same invoke works from any useEffect /form load methods.

Is using invoke not supported from button or form events?


code extract:

<form className="form" onSubmit={onSubmit}>
   <label for="uid"><b>ID :  </b></label>
   <input type="text" placeholder="Enter Id" name="uid" required />
   <button type="submit" onclick >Trace</button>

// The submit code: import { view, invoke, router } from '@forge/bridge';
const onSubmit = async (data) => {
invoke('getDetails', { payload: { id:[0].value }, context: context } ).then((data) => console.log(data)); };


1 answer

0 votes
Luana Büschelmann March 15, 2023

I am struggling with the same problem, is there any solution or workaround?

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events