The .requestJira method of the Jira Cloud REST API not execute in the Forge environment

Hello,

Can someone help me understand/debug why when deployed to Atlassian Forge Development/Staging environment my code stops at line 9, on requestJira method:

In my local it works fine, but when deployed to Forge environment, in logs I see it to print line 8 log, and it stops without any error or anything. Any idea how can I debug this?

1 async function createPairs(req, cloudId){
2    const {projectIds} = req.payload;
3    const jql = `project IN (${projectIds.join(', ')})`;
4    console.log('JQL:', jql);
5    const queryParams = new URLSearchParams({
6        jql: jql, startAt: '0', maxResults: '10', fields: 'key, summary, project'
7    });
8    console.log('QueryParams', queryParams)
9    const response = await api.asApp().requestJira(route`/rest/api/3/search?${queryParams}`);
10    console.log('Search Ideas', response)
11   const data = await response.json();
12    console.log("search project", data)
13    const issues = data.issues;
14    const embeddings = await Promise.all(issues.map(issue => getEmbedding(issue.fields.summary)));
15    console.log('Embeddings Step')
16   const upsertResults = await upsertVectors(embeddings, issues, cloudId);
17    console.log('Upsert Step')
18   const vectorMetadataMap = {};
19   issues.forEach((issue, i) => {
20        vectorMetadataMap[issue.key] = { project: issue.fields.project.name };
21   });
22    const threshold = 0.8;
23    const topK = 5;
24    await sleep(60000)
25    const similarPairs = await findSimilarPairs(upsertResults, vectorMetadataMap, threshold,  topK, cloudId);
26    console.log(`Number of pairs with cosine similarity > ${threshold}: ${similarPairs.length}`);
27    console.log('Example similar pairs:', similarPairs.slice(0, 2));
28    await storeSimilarPairs(similarPairs);
29    await updateSelectedProjects (req);
}

P.S. Maybe it has something to do with runtime? my manifest runtime is “name: nodejs18.x”, my local runtime is nodejs20.x. I upgraded local runtime, because of Forge tunnel issue, it didn’t work with nodejs18.x runtime on my local.

P.P.S. Even with try catch, it returns no error in logs.

Even i have the same issue. When i use requestJira of @forge/bridge in the jsx file it works fine. but when i try to use api.asUser i always get {“code”:401,“message”:“Unauthorized; scope does not match”}
my Env:
Forge: 10.0.1
local Node: v20.15.0
Manifest runtime: nodejs18.x

permissions:
  scopes:
    - read:jira-work
    - manage:jira-configuration
    - manage:jira-project

Not sure where is the issue. I am newbe to forge

Issue is detected. Was the runtime limitation problem. However, at least a message in logs would be helpful to detect such cases.