Forge storage conversion issues

Hey,

I’ve discovered this really weird behavior when trying to use this endpoint to convert something from storage format to any other format (see possible targets in linked doc):

No matter what target format i use I get a response “401 unauthorized” most of the times. But i don’t always get that response, which is really weird. I can do the exact same thing 10 times and i will get a 200 with the right content once or twice and the other times I’ll get a 401.
According to the docs the oAuth scope read:confluence-content.all is required for this endpoint, the same scope is required for the inline tasks endpoint, which works 100% of the times, so the scope is definitely present.

If you want to try this out yourself I set up a sample project using both endpoints and logging the results for the conversion api. See https://github.com/ItzBubschki/forgeConversionIssue.
Check the readme for more information on how to use this repo to reproduce this issue.

Am I doing something wrong or is this an issue in Atlassian’s backend?

Cheers,
Laurin

5 Likes

Hi @LaurinNiemeyer,

I cloned your repo and registered, deployed and installed your app, pressed “convert something”, authorised my app, and then pressed “convert something” a few more times, and received 10 calls returned status code 200. each time.

Are you still experiencing this issue? Are you able to run npm install and then try again to see if there are any issues with the node_modules possibly? If you are still experiencing the issue, I can pass this onto the team that owns the API to see if they can find anything in the logs.

1 Like

Hi @LaurinNiemeyer,

Is it possible that you are hitting the problem described in https://ecosystem.atlassian.net/browse/FRGE-212 ?

If the content you are trying to access has space or page-level visibility restrictions, your app might not be able to access it via the API.

1 Like

Hey @HeyJoe,

thanks for your reply.
I already tried both “asApp” and “asUser” but neither of them worked. I also tried giving my app all possible scopes but it still behaved as described. The Content I’m trying to convert is for test purposes hardcoded: <span>this will likely fail</span> so I don’t think I’m accessing restricted content.
From what I can read in the Issue which you linked it seems like the users always get a “401 unauthorized” which also isn’t the case for me, as I only get a 401 in 80% of the tries.

Cheers,
Laurin

1 Like

Hey @kchan,

thanks for your reply.

I don’t understand how it is possible that it works for you but not for me.
I’m on a newly created instance with only this app installed. I deleted the app from the apps overview and created a new one. I gave the app all oAuth scopes that were listed on the scope page. I tried the forge api version 0.7.0 and 1.0.0, but nothing worked. I’m still getting a few 200 and even more 401.

As it seems like this is working for you, I can try to record a demo and upload it if that helps.

Cheers,
Laurin

1 Like

Hi @LaurinNiemeyer, sorry for the delay. I have been very busy over the last few days. I will get to this soon!

1 Like

Hi @LaurinNiemeyer, we believe we have found the issue and have made a temporary fix, and are doing further investigation for a longer term fix at the moment. Would you be able to try again?

2 Likes

Hi @kchan,

I Updated to the most recent version of forge and @forge/api but even after re-installing the app it still doesn’t work and responds with a 401 in 8 out of 10 cases.

Is @forge/api 1.0.1 the correct version or is there a different version that I’m supposed to use?

1 Like