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 https://poc.atlassian.net in https://tasd7asdc.cdn.prod.atlassian-dev.net/base-c1arsdf4d/modal/index.html
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> {message} </form>
// The submit code: import { view, invoke, router } from '@forge/bridge';
const onSubmit = async (data) => { invoke('getDetails', { payload: { id: data.target[0].value }, context: context } ).then((data) => console.log(data)); };
I am struggling with the same problem, is there any solution or workaround?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.